--- source_keys: - claude-code-subagents-docs --- # Routing a skill or agent to its author skill Reached from `SKILL.md` Step 2 when the classified artifact is a skill or an agent/subagent definition. Route a skill to `skill-author` and an agent to `agent-author`. The two branches differ on one axis only — which audit skill verifies the result — and everything below applies to both. ## Choose fork or inline Default to a **fork subagent**. It inherits the full grilled-intent conversation, so the author skill does not need re-briefing on what the user asked for or what the grill settled. Fall back to an **inline invocation** — same conversation, no subagent — when either holds: - **Fork is technically unavailable.** You are already running inside a fork (a fork cannot spawn another fork), a nesting-depth cap is reached, or the environment does not support forking. - **The routed flow needs live user interaction mid-run** that a backgrounded fork cannot surface in real time: clarifying questions, confirmation checkpoints, or a HITL gate. Judge this from context — if nothing about the flow signals a live checkpoint, prefer the fork. ## Two-tier verification Both author skills already close out with their own inline audit, in the same context as the authoring work: `skill-author` runs `/skill-audit`, `agent-author` invokes `agent-audit`. That is tier one, and forge does not change it. Tier two belongs to forge. Once the author skill's run has finished, spin up a separate **clean-context subagent** — fresh, not forked, no inherited context — to independently re-run the same audit skill against the finished artifact. This is a distinct verification layer, not a duplicate: the inline audit shares context with the work it is checking and can share its blind spots, while the clean rerun has no stake in the result. If the clean audit surfaces any unresolved finding — not only a disagreement with the inline pass, any actionable finding on its own — loop: re-invoke the author skill (same fork-versus-inline judgment as the first invocation) to resolve it, then re-run the clean audit. Repeat until the clean audit comes back with nothing unresolved. Only then is the route done. This is the same resolve-before-close discipline the author skills already apply to their own inline audit. Return to `SKILL.md` Step 3 for the closing gates common to every route once the loop closes.