multirepo-space
Tools
This SKILL orchestrates two tools:
workspace-setup.sh— bundled script for workspace infrastructure (dirs, symlinks, settings.json, AGENTS.md/CLAUDE.md)agent-factory— npm CLI for creating AI agents (npx @tacuchi/agent-factory)
Quick routing
User intent → Action:
- "Create/scaffold workspace" → Full setup flow
- "Add a repo" → Add flow
- "Remove/detach repo" → Remove flow
- "Check/verify/health" → Status flow
- "Create an agent" →
agent-factory createdirectly - Single repo project → DO NOT use this Skill
- Monorepo (Nx/Turborepo) → DO NOT use this Skill
Pre-flight checklist
- Workspace dir exists? If not,
mkdirfirst. - New workspace or existing? →
setupvsadd. - All repo paths absolute? Required — symlinks break with relative paths.
- Always run with
--dry-runfirst and show the user the output before executing.
Security
Write commands (setup, add, remove) perform irreversible filesystem changes: symlinks, file overwrites (AGENTS.md, CLAUDE.md, settings.json), and rm -rf on skill dirs.
Before any write command:
- Run the command with
--dry-runand show the output to the user. - Ask for explicit approval: "Proceed with the above changes?"
- Only after approval, re-run without
--dry-run.
Never pass -y to workspace-setup.sh without prior user approval in the current session. agent-factory create writes files; confirm with the user before invoking.
Full setup flow
Step 1: Detect stacks
npx @tacuchi/agent-factory detect <repo_path> --json -qCapture JSON. Extract alias, primaryTech, stackCsv, verifyCommands. Use stackCsv exactly as returned — pass full value to --stacks.
Step 2: Preview workspace infrastructure (dry-run)
bash "$SKILL_DIR/scripts/workspace-setup.sh" setup <workspace_path> <repo1> <repo2> ... \
--stacks "stackCsv1|stackCsv2|..." --dry-runShow output to user. Ask: "Proceed with these changes?" On approval:
bash "$SKILL_DIR/scripts/workspace-setup.sh" setup <workspace_path> <repo1> <repo2> ... \
--stacks "stackCsv1|stackCsv2|..." -yCreates: dirs, symlinks, settings.json, AGENTS.md, CLAUDE.md, config.
Step 3: Create specialist agents
Confirm with the user before running. Per repo:
npx @tacuchi/agent-factory create \
--name repo-<alias> --role specialist --scope <repo_path> \
--output <workspace_path> --target all -qAuto-appends -agent suffix: repo-<alias> → repo-<alias>-agent.md.
Step 4: Create coordinator agent
Confirm with the user before running.
npx @tacuchi/agent-factory create \
--name coordinator --role coordinator --model opus \
--specialists "repo-<alias1>-agent,repo-<alias2>-agent,..." \
--repo-count <N> --output <workspace_path> --target all -q--specialists list must use full names with -agent suffix.
Add repo flow
Step 1: Detect stack
npx @tacuchi/agent-factory detect <repo_path> --json -qStep 2: Preview add (dry-run)
bash "$SKILL_DIR/scripts/workspace-setup.sh" add <workspace_path> <repo_path> \
--alias <alias> --stack-csv "<stackCsv>" --dry-runShow output to user. Ask: "Proceed with these changes?" On approval:
bash "$SKILL_DIR/scripts/workspace-setup.sh" add <workspace_path> <repo_path> \
--alias <alias> --stack-csv "<stackCsv>" -yStep 3: Create specialist
Confirm with the user before running.
npx @tacuchi/agent-factory create \
--name repo-<alias> --role specialist --scope <repo_path> \
--output <workspace_path> --target claude -qStep 4: Regenerate coordinator
Get updated specialist list (with -agent suffix) from existing symlinks. Confirm with the user before running.
npx @tacuchi/agent-factory create \
--name coordinator --role coordinator --model opus \
--specialists "<updated_csv_list_with_agent_suffix>" \
--repo-count <updated_N> --output <workspace_path> --target all -qRemove repo flow
Step 1: Preview removal (dry-run)
bash "$SKILL_DIR/scripts/workspace-setup.sh" remove <workspace_path> <alias> --dry-runShow output to user. Ask: "Proceed with these changes?" On approval:
bash "$SKILL_DIR/scripts/workspace-setup.sh" remove <workspace_path> <alias> -yRemoves: symlink, agent files (.agents/,.claude/agents/,.agents/skills/), regenerates docs.
Step 2: Regenerate coordinator
Get updated specialist list from remaining symlinks. Confirm with the user before running.
npx @tacuchi/agent-factory create \
--name coordinator --role coordinator --model opus \
--specialists "<updated_csv_list>" --repo-count <updated_N> \
--output <workspace_path> --target claude -qStatus flow
bash "$SKILL_DIR/scripts/workspace-setup.sh" status <workspace_path>
npx @tacuchi/agent-factory list <workspace_path>Custom agent flow
To create additional agents (architecture, style, code-review, etc.). Confirm with the user before running.
npx @tacuchi/agent-factory create \
--name <agent-name> \
--role custom \
--description "<short description>" \
--instructions "<body text or path to .md file>" \
--model sonnet \
--output <workspace_path> \
--target all -qIf detect returns "Generic"
Ask the user: "Stack was not auto-detected for [repo]. What is the main language/framework?" Then pass --stack-csv to the setup/add command so it persists in config.
Constraints
- Always run
--dry-runand show output to user before any write command. - Always confirm with the user before invoking
agent-factory create. - Never pass
-ywithout explicit user approval in the current session. - Always use absolute paths — symlinks break with relative.
- Do not modify
settings.jsonmanually. - Single repo or monorepo (Nx/Turborepo) → do NOT use this skill.
Replace $SKILL_DIR with the absolute path to this skill's directory.
Agent hierarchy
coordinator-agent (opus) → repo-*-agent (sonnet) per repo. Coordinator delegates to specialists via Task. Specialists execute autonomously.
Compatibility
Supported targets (one at a time, never combined):
claude→.claude/agents/*.md+.agents/skills/*/SKILL.mdcodex→.agents/*.md+.agents/skills/*/SKILL.mdgemini→.gemini/agents/*.md+.agents/skills/*/SKILL.mdcrush→.crush.json+.agents/skills/*/SKILL.mdwarp→.agents/skills/*/SKILL.mdAGENTS.md→ Universal context file (20+ tools)