setup
Write factory.toml once per repository so the other skills do not ask the same questions on every run.
What it does
/factory:setup configures a repository for the factory skills by
writing factory.toml: the spec directory, the base branch, the issue
tracker, and the verify commands. It detects the stack and remote host
first and asks only what it cannot detect.
Only the user may start this skill. If the model reaches it on its own, it stops and asks before writing anything.
Reads
- Stack marker files:
pnpm-lock.yaml,package.json,pyproject.toml,uv.lock,Cargo.toml,go.mod. - The remote host from
git remote -vand the default branch fromgit symbolic-ref refs/remotes/origin/HEAD. lawbook.yaml, an existing coverage file,tsconfig.json.- An existing
factory.toml, which it updates in place and keeps user edits in.
Steps
- Detect everything in the list above. Never ask for it.
- Report the detected values in a few lines.
- Ask, one question at a time, only for what detection left open: the tracker kind when the remote is ambiguous or local files or Jira might be preferred; the Jira site, project key, and work item type; a test command when no stack marker matched. Recommend an answer with every question.
- Check the tracker tool is usable with
gh auth status,glab auth status, oracli jira auth status. Report a failure; never run a login. - Show the draft
factory.toml. Write it after the user accepts, with default-valued keys omitted. - Add
.verify/and.factory/to.gitignoreif they are not already ignored.
Done when
factory.toml exists, every key in it was either detected or chosen by
the user, and the reply lists the verify commands the stack default will
run. See factory.toml for the schema.
Upstream
Wraps the explore-then-confirm pattern from mattpocock-skills/setup.
Upstream writes docs/agents/*.md and a CLAUDE.md block; factory writes
factory.toml only.