Check and configure the development environment for running dev-cycle workflows. Verifies Node.js, dependencies, build, Git state, GitHub MCP, pre-commit hooks, and permissions. Use when starting a new session or before running /code:dev-cycle, /code:sprint-impl. This skill should be used when the user says "setup", "check environment", "dev env", "環境チェック", "セットアップ", "開発環境確認".
Verifies and configures development environments for dev-cycle workflows by checking Node.js, dependencies, Git, MCP, and permissions.
/plugin marketplace add signalcompose/claude-tools/plugin install code@claude-toolsThis skill inherits all available tools. When active, it can use any tool Claude has access to.
references/expected-permissions.mdreferences/github-mcp-guide.mdreferences/gitignore-security-patterns.mdVerify and configure the development environment for dev-cycle workflows.
$ARGUMENTS may contain:
--fix — Auto-fix fixable items (npm install, npm run build)Run all 8 checks in sequence. Collect results, then output a summary table.
node --version
Parse the version by stripping the leading v and comparing major version number.
Check two conditions:
node_modules/ directory existspackage-lock.json modification time is newer than or equal to package.json# Check existence
test -d node_modules && echo "EXISTS" || echo "MISSING"
# Check freshness (macOS stat)
stat -f %m package.json
stat -f %m package-lock.json
node_modules/ exists but package-lock.json is stalenode_modules/ missingnpm install --cache /tmp/claude/npm-cacheCheck if a dist/ directory exists under $CLAUDE_PROJECT_DIR:
test -d "${CLAUDE_PROJECT_DIR}/dist" && echo "EXISTS" || echo "MISSING"
dist/ directory existsdist/ missing entirelypackage.json (i.e., scripts.build is absent), skip this checknpm run buildNote: This check is project-agnostic. The specific contents of dist/ are not verified.
git branch --show-current
git remote -v
main AND remote origin configuredmain branch — "Switch to a feature branch before running /code:dev-cycle"Display current branch name in the Status column.
Attempt to call mcp__github__get_me using the ToolSearch tool to discover it, then invoke it.
${CLAUDE_PLUGIN_ROOT}/skills/setup-dev-env/references/github-mcp-guide.md.mcp.jsonImportant: Use ToolSearch to discover the tool first. If discovery fails, that itself indicates FAIL.
Check that the code:review-commit skill is available (the approval flag is now created
inline by the skill — no external script required):
ls ~/.claude/plugins/cache/claude-tools/code/*/skills/review-commit/SKILL.md 2>/dev/null | head -1
review-commit/SKILL.md found in plugin cacheRead .claude/settings.local.json and verify it contains the required permission entries.
Reference: Read ${CLAUDE_PLUGIN_ROOT}/skills/setup-dev-env/references/expected-permissions.md for the full list of required entries.
Check categories:
GitHub MCP permissions: mcp__github__get_me, mcp__github__issue_write, mcp__github__create_pull_request, etc.
Git permissions: Bash(git add :*), Bash(git push :*), etc.
Sandbox settings: sandbox.enabled and sandbox.autoAllowBashIfSandboxed
PASS: All required entries present
WARN: Some entries missing — list them
Auto-fix: Yes (with --fix) — propose adding missing entries to settings.local.json
Important: When auto-fixing, show the diff to the user before applying. Never silently modify permission files.
Check that .gitignore contains the security patterns marker code:security-patterns with an up-to-date content hash.
This prevents accidental commit of secrets (.env, *.key, *.pem, credentials*).
Reference: Read ${CLAUDE_PLUGIN_ROOT}/skills/setup-dev-env/references/gitignore-security-patterns.md for the full pattern block, content hash, and rationale.
Check logic:
.gitignore exist?code:security-patterns?# Check for marker presence
grep -q "code:security-patterns" .gitignore 2>/dev/null && echo "PRESENT" || echo "MISSING"
# Extract hash from .gitignore marker (if present)
grep -o 'code:security-patterns:[a-f0-9]*' .gitignore 2>/dev/null | head -1 | cut -d: -f3
.gitignore exists but marker is missing.gitignore does not exist at allAuto-fix behavior:
.gitignore does not exist: create the file with the marker block.gitignore exists but marker is missing: append the marker block to the end# [code:security-patterns to # [/code:security-patterns]) with the latest versionImportant: A PreToolUse hook (check-gitignore-security.sh) blocks git commit when the marker is missing. Running /code:setup-dev-env --fix resolves this by adding the patterns.
After all checks complete, output a summary table:
## Dev Workflow Setup Check
| # | Check | Status | Detail |
|---|-------|--------|--------|
| 1 | Node.js >= 20 | PASS | v22.x.x |
| 2 | Dependencies | PASS | - |
| 3 | Build | WARN | dist/ outdated, rebuilding... |
| 4 | Git branch | PASS | feature/phase-8 |
| 5 | GitHub MCP | FAIL | .mcp.json not found |
| 6 | Code review skill | PASS | code:review-commit available |
| 7 | Permissions | PASS | All entries present |
| 8 | .gitignore Security | PASS | Security patterns present |
Status values:
If any WARN or FAIL items exist, output an "Action Required" section with specific guidance for each issue. Reference the appropriate guide files.
If --fix was specified and fixes were applied, output a summary of changes made:
### Auto-fixes Applied
- Dependencies: Ran `npm install` (success)
- Build: Ran `npm run build` (success)
- Permissions: Added 3 entries to settings.local.json
For shared output language rules, read ${CLAUDE_PLUGIN_ROOT}/skills/_shared/output-rules.md.
All user-facing output MUST follow the user's configured language setting. SKILL.md being in English does not change this.
Activates when the user asks about AI prompts, needs prompt templates, wants to search for prompts, or mentions prompts.chat. Use for discovering, retrieving, and improving prompts.