init-project
1
总安装量
1
周安装量
#45498
全站排名
安装命令
npx skills add https://github.com/kdkyum/slurm-skills --skill init-project
Agent 安装分布
claude-code
1
Skill 文档
Initialize Research Project
Set up a new research project in the current working directory.
- Project name:
basename $(pwd)(e.g.,my-cool-project) - Package name: hyphens replaced by underscores (e.g.,
my_cool_project) - Description:
$ARGUMENTSif provided, else"Research project" - Assets:
~/.claude/skills/init-project/assets/ - Cluster info:
~/.claude/skills/slurm-info-summary/references/slurm-cluster-summary.md
Steps
1. Derive names
PROJECT_NAME=$(basename $(pwd))
PACKAGE_NAME=$(echo "$PROJECT_NAME" | tr '-' '_')
ASSETS="$HOME/.claude/skills/init-project/assets"
2. Create directory structure
mkdir -p notebooks "src/${PACKAGE_NAME}" attachements research_notes .claude/skills/report
touch "src/${PACKAGE_NAME}/__init__.py"
3. Copy static files (no substitution needed)
cp "${ASSETS}/report-SKILL.md" .claude/skills/report/SKILL.md
cp "${ASSETS}/plotting.py" "src/${PACKAGE_NAME}/plotting.py"
4. Copy and substitute CLAUDE.md
cp "${ASSETS}/CLAUDE.md.template" CLAUDE.md
sed -i "s|{{PROJECT_NAME}}|${PROJECT_NAME}|g; s|{{PACKAGE_NAME}}|${PACKAGE_NAME}|g" CLAUDE.md
5. Copy and substitute pyproject.toml
Use the skill argument ($ARGUMENTS) as description. If empty, use "Research project".
DESCRIPTION="<$ARGUMENTS or 'Research project'>"
cp "${ASSETS}/pyproject.toml.template" pyproject.toml
sed -i "s|{{PROJECT_NAME}}|${PROJECT_NAME}|g; s|{{PACKAGE_NAME}}|${PACKAGE_NAME}|g; s|{{DESCRIPTION}}|${DESCRIPTION}|g" pyproject.toml
6. Copy and substitute .mcp.json from template + cluster info
-
Read cluster summary at
~/.claude/skills/slurm-info-summary/references/slurm-cluster-summary.md.- If it does not exist, tell the user: “Run
/slurm-info-summaryfirst to gather cluster info.” and stop.
- If it does not exist, tell the user: “Run
-
Extract values for a single-GPU shared notebook job from the summary:
Variable What to look for Example (Raven) PARTITIONShared GPU partition (1 node, shared access, has GPUs) gpu1GPU_TYPEGPU model, lowercase a100CPUSPhysical cores per GPU (total physical cores / GPUs per node) 18MEM_MBMemory per GPU in MB (convert from GB if needed) 125000TIMEMax walltime for that partition 1-00:00:00 -
Detect CUDA module:
CUDA_MODULE=$(module avail cuda 2>&1 | grep -oP 'cuda/[\d.]+' | sort -V | tail -1)- If found: use the module name (e.g.,
cuda/12.6) - If empty: use empty string
""
- If found: use the module name (e.g.,
-
Copy template and substitute:
cp "${ASSETS}/.mcp.json.template" .mcp.json sed -i \ -e "s|{{PARTITION}}|${PARTITION}|g" \ -e "s|{{GPU_GRES}}|gpu:${GPU_TYPE}:1|g" \ -e "s|{{CPUS_PER_TASK}}|${CPUS}|g" \ -e "s|{{MEM_MB}}|${MEM_MB}|g" \ -e "s|{{TIME}}|${TIME}|g" \ -e "s|{{CUDA_MODULE}}|${CUDA_MODULE}|g" \ .mcp.json
7. Print summary
Show what was created and next steps:
uv tool install git+https://github.com/kdkyum/jlab-mcp.git(one-time, if not already installed)uv syncto install project dependenciesjlab-mcp startin a separate terminal to launch JupyterLab on a GPU node- Start Claude Code in the project directory