.claude/skills/init-project/SKILL.md
Project CLAUDE.md phased generator. init mode generates a minimal version (Environment + Workflow), update mode incrementally fills in content (Idea, Structure, etc.) after key stages.
npx skillsauth add linzhe001/Harness-Research init-projectInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
| Content | Finalized At | Mode | |---------|-------------|------| | Environment placeholder | init time | init | | Workflow overview | init time | init | | Idea description | After WF1 survey-idea | update | | Tech Stack details | After WF2 refine-arch | update | | Dataset paths and statistics | After WF4 data-prep | update | | Environment ground truth + Baseline metric references | After WF5 baseline-repro | update | | Project Structure + Core Artifacts | After WF6 build-plan | update | | Entry Scripts (lock entry scripts) | After WF7 first experiment | update |
If PROJECT_STATE.json exists, read it to determine current stage. If CLAUDE.md already exists, read it first. For the template format, see templates/claude-md-template.md. For language behavior, see ../../shared/language-policy.md. </context>
<instructions> ## init Mode ($ARGUMENTS is "init" or no arguments)Generate a minimal CLAUDE.md for the first time, containing only information that can be determined at this point.
Ask the user via AskUserQuestion:
Run the following commands in sequence (ignore any that fail):
python --version 2>/dev/null || python3 --version 2>/dev/null
python -c "import torch; print(f'PyTorch {torch.__version__}, CUDA {torch.version.cuda}')" 2>/dev/null
nvidia-smi --query-gpu=name,memory.total --format=csv,noheader 2>/dev/null
ls pyproject.toml requirements*.txt setup.py environment.yml 2>/dev/null
pip list 2>/dev/null | grep -iE "torch|torchvision|numpy|opencv|pillow|scipy|timm|mmcv|open3d|plyfile|wandb|tensorboard" 2>/dev/null
Write the following content:
# {project_name}
<!-- Idea description will be filled in after WF1 completion -->
## Environment
conda activate {env_name}
Python, PyTorch, CUDA, GPU, dependency versions...
## Tech Stack
<!-- Detailed tech stack will be filled in after WF2 completion -->
## Language Policy
- `interaction_language`: Match the language of the latest substantive user input unless the user explicitly requests another language.
- `artifact_language`: Use the same language as `interaction_language` for natural-language sections in generated docs and reports unless the user asks otherwise.
- Keep file names, paths, commands, code identifiers, JSON/YAML keys, schema fields, workflow IDs, metric keys, and placeholder tokens in English.
- Treat English wording in templates and examples as structural guidance only; localize headings and narrative text unless a field is explicitly marked English-only.
## Workflow
WF1(survey) → WF2(arch) → WF3(check) → WF4(data) → WF5(baseline) → WF6(plan) → WF7(code) → WF7.5(validate) → WF8(iterate) → WF9(final-exp) → WF10(release)
WF8 iteration loop: /iterate plan → /iterate code → /iterate run → /iterate eval → (NEXT_ROUND→repeat | DEBUG→debug round | CONTINUE→WF9 | PIVOT→WF2 | ABORT→stop)
Current stage: WF1 not_started
Do not write Project Structure or Core Artifacts (they do not exist before WF5). Do not write Idea description (not confirmed before WF1).
Read the existing CLAUDE.md and PROJECT_STATE.json, incrementally fill in based on the current stage:
Read the context_summary from docs/Feasibility_Report.md, extract the confirmed idea description.
Replace <!-- Idea description will be filled in after WF1 completion --> in CLAUDE.md with a one-sentence idea.
Read docs/Technical_Spec.md, extract:
Replace the placeholder content in ## Tech Stack in CLAUDE.md.
Read docs/Dataset_Stats.md, extract dataset paths, split information, key statistics.
Replace the placeholder content in ### Dataset Paths in CLAUDE.md.
Read docs/Baseline_Report.md, extract main baseline metrics.
Read the real environment information created during WF5, replace the placeholder content in ## Environment.
Add baseline references and evaluation protocol summary after the dataset paths section.
Read project_map.json, extract the top-level directory structure.
Fill in:
## Project Structure — top-level directory overview + description detail level annotations## Core Artifacts — project_map.json and PROJECT_STATE.json## Global Rule — project_map.json maintenance rule referenceWhen WF7 (code-expert) is complete and the first training/evaluation succeeds, scan the scripts/ directory and write the actual entry script paths into the ## Entry Scripts section of CLAUDE.md.
Steps:
.py and .sh files in the scripts/ directory## Entry Scripts
The following are locked core entry scripts. During iteration, **prioritize modifying these files**:
- Train: `scripts/train.py`
- Eval: `scripts/eval.py`
- Multi-scene: `scripts/train_all.py`
Auxiliary scripts (e.g., ablation runner, submission packager) may be created in `scripts/` as needed,
but core training/evaluation logic must remain in the above entry scripts.
This section takes effect for all subsequent /iterate code and /code-debug calls once written.
deps-changed ModeWhen dependency files change (prompted by the deps-update rule), only re-detect the environment and update the ## Environment section.
Equivalent to the effect of /env-setup refresh.
Every update also:
Current stage line## Language Policy section and keeps it aligned with ../../shared/language-policy.md## Custom section content (manually added by the user)development
WF7.5 training pipeline validation. Before entering WF8 iteration, first use Codex to review code for baseline equivalence, then run a 100-step smoke test to verify end-to-end pipeline functionality.
business
WF1 Inspiration survey and gap analysis. Takes the user's research idea, performs literature search, gap analysis, competitor analysis, and feasibility scoring, then outputs Feasibility_Report.md. Use when the user has a new CV research idea that needs a feasibility assessment.
tools
WF10 Submission/Release Tool. Multi-scene training, result packaging, filename validation, dry-run submission checks. Used after ablation experiments are complete and before competition submission.
development
WF2 Architecture refinement and MVP design. Reads the feasibility report, analyzes the base codebase architecture, designs plug-and-play new modules, defines the MVP, provides A/B/C alternative plans, and outputs Technical_Spec.md. Use when a research idea needs to be translated into a concrete technical architecture design.