.claude/skills/env-setup/SKILL.md
Environment creation and refresh tool. Create mode sets up a new conda environment; refresh mode detects the current environment and syncs the Environment section of CLAUDE.md. Use when dependencies change or the environment needs initialization.
npx skillsauth add linzhe001/Harness-Research env-setupInstall 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.
Sub-commands:
create — Create a new conda environment from scratch as a maintenance actionrefresh — Detect current environment and update CLAUDE.md ## Environment section
For language behavior, see ../../shared/language-policy.md.
</context>
Ask the user (AskUserQuestion):
Create the conda environment:
conda create -n {env_name} python={python_version} -y
conda activate {env_name}
If dependency files exist:
pip install -r requirements.txt # or conda env update -f environment.yml
Set up wandb:
# Check if wandb is installed
pip show wandb 2>/dev/null
pip install wandbpython -c "import wandb; wandb.Api()" 2>&1
wandb login, or use AskUserQuestion to get the API key and then run:
wandb login {api_key}
python -c "import wandb; api = wandb.Api(); print(f'wandb logged in as: {api.default_entity}')"
Run the refresh logic (see below) to update CLAUDE.md.
refresh Mode ($ARGUMENTS contains "refresh" or no arguments)Auto-detect the environment (do not ask the user):
# Python version
python --version 2>/dev/null || python3 --version 2>/dev/null
# PyTorch + CUDA
python -c "import torch; print(f'PyTorch {torch.__version__}, CUDA {torch.version.cuda}')" 2>/dev/null
# GPU info
nvidia-smi --query-gpu=name,memory.total --format=csv,noheader 2>/dev/null
# Dependency files
ls pyproject.toml requirements*.txt setup.py environment.yml 2>/dev/null
# Key ML dependencies
pip list 2>/dev/null | grep -iE "torch|torchvision|numpy|opencv|pillow|scipy|timm|mmcv|open3d|plyfile|wandb|tensorboard|gsplat" 2>/dev/null
# Conda env name
echo $CONDA_DEFAULT_ENV 2>/dev/null
# wandb status
python -c "import wandb; api = wandb.Api(); print(f'wandb: {api.default_entity}')" 2>/dev/null || echo "wandb: not logged in"
Read the existing CLAUDE.md
Use the Edit tool to replace the ## Environment section
Only replace the content between ## Environment and the next ##.
Format:
## Environment
```bash
conda activate {env_name}
Do not touch any other sections of CLAUDE.md.
User-facing questions and summaries should follow ../../shared/language-policy.md, while commands, package names, keys, and paths remain in English. </instructions>
<constraints> - ONLY touch the `## Environment` section of CLAUDE.md — never modify other sections - ALWAYS auto-detect, never ask the user for version numbers - ALWAYS preserve the conda activate command - NEVER list internal/meta packages (pip, setuptools, wheel) - If CLAUDE.md doesn't exist, inform the user to run `/init-project init` first </constraints>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.