with one click
repo-architect
// Repository organization expert — structure, audit, and refactor via 8 framework archetypes. USE WHEN creating a new project, auditing repo structure, or planning refactors.
// Repository organization expert — structure, audit, and refactor via 8 framework archetypes. USE WHEN creating a new project, auditing repo structure, or planning refactors.
Deep implementation review that hunts for real bugs. Use when the user asks for adversarial review, review this implementation, audit my code, stress test this, find problems with this, ship-readiness review, is this ready to ship, check this against the plan, check this against the spec, find bugs in this, implementation audit. This skill is for IMPLEMENTATIONS — code, configs, scripts, pipelines. For plans and designs before implementation, use a plan-review or design-challenge skill instead.
Babysit a PR end-to-end — push the branch, poll CI every 3 minutes, auto-fix red checks, address PR comments via validation, then alert (or auto-merge with --auto-approve) when ready. Use this whenever a user says 'babysit this PR', 'watch the CI', '/babysit-pr', wants a PR shepherded to merge, or wants CI failures auto-fixed in a loop.
Smart Git workflow engine — repo-aware Git Flow branching, CI monitoring, auto-merge, submodule awareness, issue analysis/routing, and deploy-workflow isolation. USE WHEN commit, git, branch, pull request, release, merge, submodule, CI, checks, push and merge, monitor CI, auto-merge, wait for CI, is CI passing, merge my PR, submit PR, code review, --issue-analysis, analyze issues, label issues, route issues across worktrees, agent ownership labels, deploy workflow, push workflow to main, merge workflow only, deploy gh action.
Generate images with GPT Image 2 (ChatGPT Images 2.0) inside Claude Code, using your existing ChatGPT Plus or Pro subscription — no separate OpenAI API key required, no per-image billing. Supports text-to-image, image-to-image editing, style transfer, and multi-reference composition via the local Codex CLI. Triggers on "gpt image 2", "gpt-image-2", "ChatGPT Images 2.0", "image 2", or any explicit ask to generate or edit an image through the user's ChatGPT plan.
Audit a repository for autonomous-agent harness readiness and Symphony-style unattended ticket execution readiness across cold-start docs, rules, API documentation policy/ADRs, lint, hooks, tests, PR automation, repo skills, garbage-collection cadence, workflow contracts, evidence, observability, and smoke-ticket evals. Use for "harness audit", "agent-ready repo", "harness readiness", "make this repo agent-friendly", "API docs policy", "Symphony readiness", "prepare this repo for Symphony", "ticket-level agent automation", or surgical fixes for top harness gaps.
Set up parallel git worktrees of the same repo, one per coding harness (Claude Code, Codex CLI, Cursor, etc.), so multiple AI tools can edit/typecheck/test in parallel without trampling each other's node_modules, build artifacts, or branches. Audits the repo first for shared-state hazards (hardcoded ports, DB file paths, sockets, build dirs that would collide if two worktrees ran a live dev server simultaneously), drops a Gotcha block into CLAUDE.md/AGENTS.md so any agent in any worktree knows the rule, then creates work/<tool> branches, sibling worktrees at <repo-parent>/<repo-name>-<tool>/, and runs the right install command per stack. USE WHEN user says 'set up worktrees for my coding tools', 'I want a Claude / Codex / pi worktree of this repo', 'parallel worktrees per harness', 'harness worktrees', 'make this repo work for all 3 tools at once', 'split this repo per coding agent', 'I use multiple AI coding tools on the same codebase, set them up', or any variant where the goal is one-checkout-per-tool isol
| name | repo-architect |
| description | Repository organization expert — structure, audit, and refactor via 8 framework archetypes. USE WHEN creating a new project, auditing repo structure, or planning refactors. |
Before executing, check for user customizations at:
.claude/repo-architect.local.md
If this file exists, load and apply any preferences or overrides found there. These override default behavior. If the file does not exist, proceed with skill defaults.
Repository organization expert — structure, audit, and refactor via 8 framework archetypes.
Encodes the Repo Architect blueprint: 8 framework archetypes, structured intake, health checks, CI templates, and move map migration planning. Ensures every repo gets intentional structure, not ad-hoc folder creation.
RepoArchitect adapts its behavior based on which AI agent is running it. This prevents circular delegation (e.g., Codex trying to delegate to itself) and optimizes execution paths.
Detection tool: tools/detect-agent.ts — run via bun run tools/detect-agent.ts
Detected agents and their capabilities:
| Agent | Marker | Can Delegate to Codex | Execution Strategy |
|---|---|---|---|
| Claude Code | CLAUDECODE=1 | Yes | Delegate refactors to Codex CLI |
| Codex CLI | CODEX_SANDBOX / CODEX_HOME | No (circular) | Execute moves directly |
| Gemini CLI | GEMINI_CLI_* vars | Yes | Delegate or execute directly |
| Unknown | No markers | No | Manual plan export or direct execution |
When to detect: At the start of ExecuteRefactor and RefactorPlan workflows. NewProject and AuditRepo don't need agent detection (no delegation involved).
How workflows adapt:
codex exec (which would be circular). If running inside Claude Code, delegates to Codex as designed.These override all other defaults when applicable.
src/modules/<capability>/.index.ts).@/modules/<capability>.internal/providers/.orgId is the canonical tenant identifier — never provider-specific IDs in public types.getAuthSession, requireAuth, requireOrg, requireOnboardedOrg.src/modules/offices/ backed by DB, keyed on orgId.src/actions/<capability>/) call one orchestrator each.src/modules/<capability>/
index.ts # Contract + re-exports (3-7 max)
orchestrators/ # One function per use case (verbNoun naming)
createClaim.ts
verifyClaim.ts
internal/
types/ # Internal + public IO types
public.ts # Exported via index.ts
providers/ # Optional — SDK/vendor adapters
clerk/
stripe/
repo.ts # Data access (ORM calls)
domain.ts # Pure business rules
Every index.ts MUST have this header:
/**
* Module: <capability>
* Purpose: <what this capability owns>
*
* Public API:
* - orchestratorA(input): output
* - orchestratorB(input): output
*
* Exported IO Types:
* - InputType, OutputType
*
* Side Effects:
* - DB writes, cookies, network calls
*
* Error Behavior:
* - typed result union | thrown errors policy
*/
src/actions/ ConventionServer Actions live at src/actions/<capability>/<useCase>.action.ts. Each action is a thin wrapper calling one module orchestrator. Actions are NOT modules — they're wiring.
When app uses Postgres + optional realtime:
src/modules/
db/ # System of record
index.ts
internal/
providers/
supabase/ # Or neon/
drizzle/ # ORM
convex/ # Optional, DB features only
realtime/ # Optional — incremental updates
index.ts
internal/
providers/
convex/ # Or pusher, etc.
activity/ # Canonical event log (Postgres-backed)
index.ts
orchestrators/
analytics/ # Dashboard metrics (Postgres-backed)
index.ts
orchestrators/
Rule: Dashboard initial state from Postgres modules. Realtime layers provide incremental updates only.
Route to the appropriate workflow based on the request.
When executing a workflow, output this notification directly:
Running the **WorkflowName** workflow in the **RepoArchitect** skill to ACTION...
workflows/new-project.md
intake-questions.md, frameworks.md, output-spec.md, ci-templates.mdworkflows/audit-repo.md
frameworks.md, health-checks.mdsrc/modules/ exists. See health-checks.md.workflows/refactor-plan.md
move-map-spec.md, frameworks.md, health-checks.mdworkflows/execute-refactor.md
move-map-spec.md, tools/detect-agent.ts| File | Purpose |
|---|---|
frameworks.md | 8 framework archetypes + selection heuristics |
output-spec.md | Required output sections A-G + quality criteria |
health-checks.md | 6 check categories (including module boundary) + severity + JSON schema |
ci-templates.md | Hook strategies + GitHub Actions templates |
intake-questions.md | AskUserQuestion-structured intake bank |
move-map-spec.md | Move Map format + migration order + rollback |
Example 1: New project setup
User: "I need to set up a new TypeScript API project"
-> Invokes NewProject workflow
-> Runs intake questions, selects framework, generates A-G output
-> User receives canonical tree, CI config, and implementation steps
Example 2: Audit existing repo
User: "Check the health of my repo"
-> Invokes AuditRepo workflow
-> Scans structure, classifies framework, runs health checks
-> User receives score (e.g., 14/18) and prioritized fix list
Example 3: Plan a restructure
User: "My repo is messy, help me restructure it"
-> Invokes RefactorPlan workflow
-> Generates Move Map with phased migration plan
-> Offers Codex-powered execution or manual plan export