name: istack-setup description: Set up istack on this machine and check its health, covering the private profile, the install, guard and ledger hooks, Python, gh login and git identity, and skill and plugin sprawl. Use when the user says istack-setup, set up istack, install, first run, onboarding, health check, is the hook working, create or update my profile, wrong gh account or git email, why do I have so many skills, too many plugins, or remove duplicate or unused skills. Not for mapping workspace repositories (home-repo) or learning from past sessions (retro). disable-model-invocation: true argument-hint: "[profile | check | audit]" metadata: phase: entry
istack-setup
Leave a confirmed private profile, a pass/fail health table for the install, and a removal plan for duplicate or unused skills that the human approves line by line.
When to use
- First run after installing istack, or on a new machine.
- Something stopped working: hooks are silent,
ghfails, commits carry the wrong identity. - The human re-teaches the same machine facts each session, or has more skills than they can name.
Not for: mapping the repositories in a workspace (../home-repo/SKILL.md), or learning from past sessions (../retro/SKILL.md).
Steps
- Create or update the profile. The path is
$ISTACK_PROFILE, else~/.istack/profile.md; never inside a repository. If only the 0.1 folder~/.ilex/exists, move it to~/.istack/first. If the profile is missing, copyassets/profile.example.mdthere andchmod 600it. Gather what you can read first:git config --get-regexp '^user\.',gh auth status,ssh -T git@github.com,node --version,python3 --version. Then ask one numbered round, one question per section, each with a recommended answer from what you read. Write account names and key file paths, never tokens, passwords or key contents (secrets-stay-out). If the profile exists, show only the sections that disagree with what you read. Done when: every section holds a fact orNone, and the human confirmed them. - Find the install. Plugin: an
istack@…entry in~/.claude/plugins/installed_plugins.json, or the Codex plugin list. Standalone:.claude/istack-install.jsonor.codex/istack-install.jsonin a project, written byscripts/install.py. Flag any project that has both. Done when: each install is listed with its kind and path. - Prove the hooks fire. Confirm the guard is wired for
PreToolUseandUserPromptSubmit(the plugin's hooks,.claude/settings.local.json, or.codex/hooks.json). Then run it on a sample event:printf '%s' '{"hook_event_name":"PreToolUse","tool_name":"Bash","tool_input":{"command":"git reset --hard"}}' | python3 -I <dir>/istack-mode/scripts/guard.pyIt must print adenydecision. Runpython3 -I <dir>/ledger/scripts/ledger.py --version. IfISTACK_GUARD=offis set, report it. If hooks are missing, offerpython3 scripts/install.py --project DIR --host claude|codex --hooksfrom the istack checkout and run it on approval. Done when: the guard printeddenyand the ledger printed its version, or each failure has a fix command. - Check toolchain and accounts. Python 3.10+ (
python3 -c 'import sys; print(sys.version_info >= (3, 10))');gh auth status(account and host only, never--show-token);git config user.nameanduser.emailagainst the profile row for this repository's owner; the network route and toolchain versions the profile names. Done when: each check is pass or fail, and each fail has the exact command that fixes it. - Audit skill and plugin sprawl. Count what loads per source and list names found in more than one place, with
references/audit.md. Flag exact duplicates, older copies, unused skills, and skills that overlap istack (other handoff, resume, retro, setup or router skills). Read each flagged skill's description before judging it. Done when: you have a table: skill | source | overlaps with | proposal (keep, remove, disable) | reason. - List stale worktrees. For each repository in the workspace index (or the current one), run
git -C <repo> worktree list --porcelain. Flagprunableentries and worktrees whose branch is merged or gone upstream. Removing them is../cleanup/SKILL.md's job. Done when: the stale list is written, or it is "none". - Propose, then apply what is approved. Show the health table, the sprawl table and the stale list. Change nothing until the human approves each line; then apply it as
references/audit.mddescribes and re-count. Done when: approved changes are applied and the new counts are shown.
Red flags
| If you're thinking | Do this instead |
|---|---|
| "I'll store the token in the profile so we stop asking." | Write the account name and how to sign in, never the value. |
| "These two skills look the same; I'll delete one." | Propose it. Remove nothing without approval. |
| "The hook is in settings, so it works." | Run it on a sample event and see the deny. |
"gh isn't signed in; I'll ask for a token." |
Hand the human ! gh auth login (secrets-stay-out). |
| "I'll commit the profile so it syncs." | It stays private, outside every repository. |
| "I'll ask about each section one at a time." | One numbered round with recommended answers (no-homework). |
| "Stale worktree; I'll prune it while I'm here." | List it. cleanup removes it with proof. |
Verify
- The profile exists at the stated path, mode 600, outside any repository, with every section filled or
None. - The profile passes the guard secret scan from
../handoff/SKILL.mdVerify. - The guard denied the sample event and the ledger printed its version.
- Every health check has a result and, if it failed, a fix command.
- The sprawl table has counts per source, and nothing was removed without approval.
Reply
istack-setup: <p> pass, <f> fail. Profile: <path> (<created | updated | unchanged>).
| Check | Result | Fix |
Skills: <total> loaded (<count per source>); <d> duplicates, <o> overlap istack.
| Skill | Source | Overlaps with | Proposal |
Stale worktrees: <repo: path, branch> per line, or "none".
Waiting on you: <numbered approvals and sign-ins; omit if none>.
Credits
Exploring first, then presenting findings with a recommended answer and confirming before writing, follows Matt Pocock's setup-matt-pocock-skills. Detecting what is actually available before writing configuration follows pstack's setup-pstack by Lauren Tan.