skills/dev-scaffold-wt-dev/SKILL.md
Scaffold the /x-wt-teams worktree-development setup into the current repo: a pre-push git hook that blocks pushes from worktrees/, an installer wired into pnpm/npm install, lefthook for pre-commit hooks, and a root CLAUDE.md section documenting the policy. Use when: (1) User says 'scaffold wt-dev', 'install worktree push guard', 'set up x-wt-teams here', 'add wt-dev to this repo', 'block worktree pushes', (2) Preparing a new repo for /x-wt-teams multi-topic development, (3) The user wants child agents in worktrees to be mechanically prevented from pushing instead of relying on prompt instructions.
npx skillsauth add takazudo/claude-resources dev-scaffold-wt-devInstall 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.
wt-dev)Install the repo-scoped pieces that make /x-wt-teams reliable:
lefthook.yml (lint-staged wired in only if the repo already uses it).git/hooks/pre-push blocks pushes from worktrees — deliberately NOT in lefthook.yml because lefthook reads config from the worktree's toplevel and would silently skip the guard when invoked from inside a worktreescripts/install-git-hooks.sh installs the pre-push guard idempotently; wired into prepare and init-worktreeCLAUDE.md section documents the policy for agentsAll four pieces are tightly coupled — install all of them, not a subset.
Run from the target repo root:
git rev-parse --show-toplevel >/dev/null 2>&1 || { echo "Not a git repo"; exit 1; }
ls package.json 2>/dev/null
ls .git/hooks/pre-push 2>/dev/null
grep -q "^worktrees/" .gitignore 2>/dev/null && echo "(worktrees/ already gitignored)"
ls lefthook.yml 2>/dev/null && echo "(lefthook.yml already exists)"
cat package.json | python3 -c "import json,sys; p=json.load(sys.stdin); print(p.get('scripts',{}).get('prepare','(no prepare)'))"
Decide:
package.json: the prepare lifecycle hook doesn't apply. Install lefthook globally or document manual steps. Continue with the scaffold but skip Step 4..git/hooks/pre-push without our marker: tell the user; if they confirm, move it aside (mv .git/hooks/pre-push .git/hooks/pre-push.bak) before running the installer.core.hooksPath is set (e.g. to .husky/_): must be unset first. Edit .git/config to remove the hooksPath line under [core]. Without this, neither lefthook's hooks nor the pre-push guard will fire.lefthook.yml already exists: merge the pre-commit block into it rather than overwriting (Step 3).worktrees/ not in .gitignore: add it as part of Step 5.Copy these two files from the skill assets to the target repo. Preserve executable bits.
SKILL_DIR="$HOME/.claude/skills/dev-scaffold-wt-dev"
mkdir -p scripts/hooks
cp "$SKILL_DIR/assets/scripts/hooks/pre-push" scripts/hooks/pre-push
cp "$SKILL_DIR/assets/scripts/install-git-hooks.sh" scripts/install-git-hooks.sh
chmod +x scripts/hooks/pre-push scripts/install-git-hooks.sh
Both files are repo-agnostic — no patching needed.
lefthook.ymlFirst, detect whether this repo already uses lint-staged. Any of these is a signal that lint-staged is configured:
# Config files at the repo root
ls .lintstagedrc .lintstagedrc.{js,cjs,mjs,json,yaml,yml} lint-staged.config.{js,cjs,mjs} 2>/dev/null
# Top-level "lint-staged" key OR lint-staged listed as a (dev)dependency in package.json
[ -f package.json ] && python3 -c "import json; p=json.load(open('package.json')); print('yes' if 'lint-staged' in p or 'lint-staged' in (p.get('dependencies') or {}) or 'lint-staged' in (p.get('devDependencies') or {}) else 'no')"
If lint-staged is configured — create lefthook.yml with the lint-staged command:
pre-commit:
commands:
lint-staged:
run: pnpm dlx lint-staged
If lint-staged is NOT configured (the common case for new repos) — create lefthook.yml with an empty slot. Do NOT default-include lint-staged: pnpm dlx lint-staged; without a config it fails every commit:
# lefthook manages pre-commit hooks here. Add commands under
# `pre-commit.commands` when this repo needs them, e.g. lint-staged.
#
# The pre-push worktree guard is intentionally NOT managed by lefthook —
# it lives in scripts/hooks/pre-push and is installed directly to
# .git/hooks/pre-push by scripts/install-git-hooks.sh (run by `pnpm install`
# via the `prepare` script). See CLAUDE.md "Worktree push policy" for the
# rationale.
pre-commit:
commands: {}
If lefthook.yml already exists, leave its existing pre-commit block alone (do not overwrite, do not inject lint-staged). Add a pre-commit block only if one isn't there. Do NOT add a pre-push block — the guard runs outside lefthook for the reason stated above.
For repos with package.json:
[ -f pnpm-lock.yaml ] && PM=pnpm
[ -f package-lock.json ] && PM=npm
[ -f yarn.lock ] && PM=yarn
[ -f bun.lockb ] && PM=bun
PM=${PM:-pnpm}
Set:
INSTALL_COMMAND → ${PM} installINIT_WORKTREE_COMMAND → ${PM} run init-worktree (npm/yarn/bun) or pnpm init-worktree (pnpm shorthand)package.json scripts (skip if no package.json)Add two scripts. Use the Edit tool — preserve key order, do not rewrite the whole file:
{
"scripts": {
"prepare": "lefthook install && bash scripts/install-git-hooks.sh",
"init-worktree": "bash scripts/install-git-hooks.sh"
}
}
If the repo already has a prepare script:
pnpm dlx husky (Husky): replace it entirely (migrate to lefthook). Remove .husky/ directory. Tell the user.&&: "prepare": "<existing> && lefthook install && bash scripts/install-git-hooks.sh". Tell the user.# pnpm
pnpm add -Dw lefthook
# npm
npm install -D lefthook
# yarn
yarn add -D lefthook
CLAUDE.mdRead $HOME/.claude/skills/dev-scaffold-wt-dev/assets/claude-md-section.md. Substitute the placeholders:
<INSTALL_COMMAND> → from Step 4<INIT_WORKTREE_COMMAND> → from Step 4Then:
CLAUDE.md at repo root: create it. Add a one-line top heading (# <repo-name> — repo rules) before the worktree section.CLAUDE.md exists but has no worktree section (grep for Worktree push policy): append the section to the end with a blank line before it.Also add worktrees/ to .gitignore if not already present:
grep -q "^worktrees/" .gitignore 2>/dev/null || echo "worktrees/" >> .gitignore
bash scripts/install-git-hooks.sh
Expected: install-git-hooks: installed <path>/.git/hooks/pre-push.
Verify the guard works. Create a throwaway worktree, attempt a push, confirm it's blocked, then clean up:
git worktree add worktrees/_pushguard-poc -b _pushguard-poc 2>&1 | tail -2
cd worktrees/_pushguard-poc
git commit --allow-empty -m "test"
git push origin _pushguard-poc 2>&1 | head -5
# Expected: 'Push blocked — you are in a /x-wt-teams worktree.' and exit non-zero.
cd ../..
git worktree prune
git branch -D _pushguard-poc
If the push isn't blocked, diagnose:
.git/hooks/pre-push exists and is executable?core.hooksPath is unset (check cat .git/config | grep hooksPath)?git rev-parse --git-dir and --git-common-dir differ inside the worktree?Tell the user concisely:
scripts/install-git-hooks.sh, scripts/hooks/pre-push, lefthook.yml, package.json (if applicable), root CLAUDE.md, .gitignore.git add and commit when they're ready.Re-running this skill on a repo that already has it scaffolded is safe:
cp overwrites script files with identical content (no diff on first re-run; pulls updates if the skill has been updated upstream).package.json changes are idempotent — Edit tool will be a no-op if the keys are already present with the right values./x-wt-teams at all. The hook is harmless but the CLAUDE.md section talks about a workflow that's not in play.worktrees/ layout (e.g., worktrees elsewhere on disk). The hook's detection uses GIT_DIR != GIT_COMMON_DIR (any linked worktree), so path naming doesn't matter for detection — but the CLAUDE.md section references worktrees/ as the convention.tools
Acceptance gate for a branch produced by an OpenAI Codex CLI run — usually Codex implementing a /big-plan epic that was handed off to it. Codex reports the work 'done' (or the user flags it WIP with corrections); this skill confirms the branch actually fulfils the original spec, fixes what falls short, and routes larger discoveries into GitHub issues. Use when: (1) User says '/finalize-codex-work', 'finalize codex work', 'confirm the codex work', 'check the codex branch', or 'codex said it's done', (2) A branch is the result of a Codex CLI session and needs verification against its spec issue/PR, (3) After assigning a /big-plan epic to Codex CLI. Pass -m/--merge to run /pr-complete -c at the end.
tools
Read a Figma design node directly from a share URL via the Figma REST API — no Dev Mode subscription, no MCP, no desktop app. Renders the node to PNG and dumps its full style/layout JSON so the design can be described, compared, or implemented. Use whenever the user gives a Figma design URL (figma.com/design/... or /file/...) and wants to see, read, inspect, reference, or implement that node — including `/fig-url-refer <url>`. This is the URL-based counterpart to `/figrefer` (which needs a Dev-plan desktop MCP); prefer this one when the input is a URL rather than a live desktop selection.
tools
Sync the user's Claude Code workflow skills into the OpenAI Codex CLI settings repo ($HOME/.codex) as Codex-native ports, fix the Codex .gitignore for new local state, then commit and push. Use when: (1) user says '/dev-codex-sync-settings-from-claude', 'sync codex settings', 'sync claude skills to codex', 'port skills to codex', or 'update codex from claude'; (2) after updating ~/.claude workflow skills (big-plan, x, x-as-pr, x-wt-teams) and Codex should catch up; (3) the $HOME/.codex repo has drifted behind $HOME/.claude. The ports are condensed Codex-native REWRITES, never file copies.
development
Analyze a video file (mov, mp4, webm, etc.) or a YouTube video by extracting still frames with ffmpeg and reading them chronologically with vision — Claude cannot ingest video files directly. Use whenever the user provides a video file path or YouTube URL and wants to know what happens in it: "read this video", "watch this video", "check this recording", "what happens in this .mov/.mp4", analyzing a screen recording of a UI bug, or verifying UI behavior captured in a video, even if they don't name this skill.