AGENT SKILL

run-claude-dev-env

Build, install, run, and test the claude-dev-env installer. Use when asked to run claude-dev-env, install the Claude Code config into ~/.claude, drive the installer, smoke-test it against a sandbox, or run its test suite.

License 许可
MIT
最近更新
2026-11-15
Stars
★ 7
Forks
1

01 前言 Front Matter

name
run-claude-dev-env
description
Build, install, run, and test the claude-dev-env installer. Use when asked to run claude-dev-env, install the Claude Code config into ~/.claude, drive the installer, smoke-test it against a sandbox, or run its test suite.

02 资源文件 1

03 SKILL.md 正文

claude-dev-env is the npm-distributed installer that copies this repo's rules, hooks, commands, and docs into ~/.claude/, copies skills and agents into ~/.agents/, publishes directory pointers at ~/.claude/skills and ~/.claude/agents, and merges its hook entries into ~/.claude/settings.json. Its entry point is bin/install.mjs. Drive it with the smoke driver at .claude/skills/run-claude-dev-env/driver.mjs, which runs the installer against a throwaway sandbox home directory so a run never touches the real ~/.claude/ or ~/.agents/.

All paths below are written from the packages/claude-dev-env/ directory.

Prerequisites

The installer needs three tools on PATH:

  • Node.js 18+ — the installer is an ES module (verified on Node 22.17).
  • Python 3.8+ — the installer bakes a Python interpreter into every hook command and aborts if it finds none. On Windows it skips the Microsoft Store stub (verified py -3 → Python 3.13.5).
  • git — the installer reads git status to guard against installing from a conflicted source, and sets a global git hooks path.
node --version
git --version
py -3 --version    # POSIX: python3 --version

On a fresh Ubuntu container the three come from sudo apt-get install -y nodejs python3 git.

Run (agent path) — the smoke driver

The driver is the handle to reach for first. It spawns the installer against a fresh temp home directory with HOME, USERPROFILE, and GIT_CONFIG_GLOBAL all redirected, runs the --help → install → --uninstall lifecycle, asserts the result of each step against the sandbox tree, then deletes the sandbox. It works the same on Windows and POSIX.

node .claude/skills/run-claude-dev-env/driver.mjs

Expected tail:

21/21 checks passed.
ALL CHECKS PASSED

The driver proves a full install lands skills under <sandbox>/.agents/skills with a directory pointer at <sandbox>/.claude/skills, lands agents the same way, lands hook scripts, rules, the CLAUDE.md hub, a populated settings.json, and a tracking manifest, and that --uninstall removes every manifest-tracked file. The real ~/.claude/, ~/.agents/, and the real global git config stay untouched. Exit code is 0 only when all checks hold.

Run (human path) — install for real

These write into your real ~/.claude/ and set a global git hooks path. Run them only when you mean to install on this machine.

node bin/install.mjs --help         # usage only, no side effects
node bin/install.mjs                # install every group
node bin/install.mjs --only core    # install one or more named groups
node bin/install.mjs --update       # remove manifest-tracked files, then reinstall
node bin/install.mjs --uninstall    # remove every installed file

Groups: core, journal, and the discovered prompt-generator dependency group. Run node bin/install.mjs --help for the live list. The published package runs the same entry point as npx claude-dev-env.

Test

npm test

Runs node --test over bin/*.test.mjs and .agents/skills/**/*.test.mjs with Node's built-in test runner — no extra dependency, no network. Expected: # fail 0, with the pass count growing as tests are added.

Gotchas

  • The install target is os.homedir()/.claude with no override flag (the CLAUDE_HOME constant in bin/install.mjs). To drive the installer without overwriting your real config, redirect the home directory: set USERPROFILE (Windows) and HOME (POSIX) to a temp dir. The driver does this for you.
  • The installer reaches outside ~/.claude/. It writes skills and agents under ~/.agents/, runs git config --global core.hooksPath ..., which applies to every git repo on the machine, and it writes ~/.mypy.ini. The driver isolates those writes by pointing GIT_CONFIG_GLOBAL at a sandbox file and redirecting the home directory.
  • git "dubious ownership" aborts the install. The source-conflict guard runs git status; when the checkout sits on a path git distrusts (a UNC network share owned by another account), git exits 128 with a dubious-ownership message that the installer rethrows. The driver seeds its sandbox git config with safe.directory = * so the guard runs. For a real install on such a checkout, add the exception: git config --global --add safe.directory '<repo-path>'.
  • npm install at the repo root fails on a Windows network-share checkout. npm symlinks the workspace package into root node_modules and the share rejects the symlink (UNKNOWN ... symlink, errno -4094). The package's own node_modules already carries its single dependency, so the driver and tests run without it. The installer also keeps working when @jl-cmd/prompt-generator cannot resolve — it skips that group with a warning (discoverDependencyGroups in bin/install.mjs).
  • Microsoft Store Python is rejected on Windows. The installer skips any interpreter under a WindowsApps directory because that stub cannot run as a hook subprocess (isWindowsStorePythonStub in bin/install.mjs). Install Python from python.org if detection fails.

Troubleshooting

  • ERROR: No usable Python 3 found: no py -3 / python3 / python resolves to a non-Store Python 3. Install Python 3.8+ from python.org and reopen the shell.
  • fatal: detected dubious ownership in repository: add the safe.directory exception shown above, then rerun.
  • ERROR: settings.json is malformed JSON: ~/.claude/settings.json has a syntax error; fix the JSON and rerun.

Files

  • SKILL.md — this page: the agent path (the driver), the human install path, the test command, gotchas, and troubleshooting.
  • driver.mjs — the smoke harness that drives bin/install.mjs against a sandbox home directory. Run it; you do not need to read it. It sits beside this file at .claude/skills/run-claude-dev-env/driver.mjs.

The /run skill auto-discovers this skill when asked to run, install, or test claude-dev-env.

04 同仓库更多 Skills

jl-cmd-projects
jl-cmd-projects/claude-dev-env

update

Fast-forwards a local repository's main branch to a remote's main after confirming the repo path and source remote through AskUserQuestion. Use when the user says '/update', 'update main', 'fast-forward main', 'sync main from origin', 'pull latest main into <path>', or 'bring main up to date'.

★ 7
jl-cmd-projects
jl-cmd-projects/claude-dev-env

source-command-sr-loop

Converging cleanup loop: repeat /simplify until clean, then repeat /code-review --fix until clean

★ 7
jl-cmd-projects
jl-cmd-projects/claude-dev-env

skill-builder

Skill lifecycle: classify, scaffold, write via the skill-writer-agent, self-audit, compose sub-skills, polish description triggers, enforce deterministic scripts. Triggers: build a skill, new skill workflow, improve this skill, optimize skill description, skill development lifecycle, skill modularity, skill composition, description trigger catalog, deterministic skill scripts.

★ 7
jl-cmd-projects
jl-cmd-projects/claude-dev-env

session-tidy

Audit, clean, and consolidate session logs in the Obsidian vault. Fixes format drift, resolves orphaned next-steps, updates stale statuses, and generates project rollup summaries. Use when session logs feel cluttered or before starting a new project milestone. Triggers on '/session-tidy', 'tidy sessions', 'clean up session logs', 'session audit'.

★ 7
jl-cmd-projects
jl-cmd-projects/claude-dev-env

session-log

Logs a session report as an HTML page, tracks vault context, extracts decisions, and outputs a /rename command. Use for /session-log, 'journal this session', 'log this work', 'session report', 'summarize/log/record this session', 'save session', 'capture session', or 'document what we did'.

★ 7
jl-cmd-projects
jl-cmd-projects/claude-dev-env

review-tier

Classify `review_tier_constants` from change axes, hard triggers, and user overrides. Triggers: /review-tier, tier override, and review classification.

★ 7