From rk-skills
Executes tasks with a persistent Fable 5 advisor for planning and a separate reviewer for binding pre-commit verdict. Supports GitHub issue workflows and standalone prose tasks.
How this skill is triggered — by the user, by Claude, or both
Slash command
/rk-skills:fable-advisorThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Execute a task in the main agent (the **executor**) with a persistent **Fable 5 advisor** subagent overseeing it. The advisor plans and advises; the executor builds. A **separate fresh Fable 5 reviewer** — never the advisor — issues the binding pre-commit verdict, so the plan's author never grades its own implementation.
Execute a task in the main agent (the executor) with a persistent Fable 5 advisor subagent overseeing it. The advisor plans and advises; the executor builds. A separate fresh Fable 5 reviewer — never the advisor — issues the binding pre-commit verdict, so the plan's author never grades its own implementation.
When the task is a GitHub issue, the executor runs work-on-issue's build-and-ship pipeline (gates, worktree, red → green verification, staging discipline, PR conventions, guardrail table) with the advisor and reviewer layered around it — work-on-issue stays the single source of truth for that pipeline, so any future hardening of it applies here too. Issue-less prose tasks take a lighter standalone path.
The user provides one of:
#<N>, bare <N>, or owner/repo#N. This is a complete input: the task is the issue itself, derived from its title and body exactly as work-on-issue does — no accompanying prose description is needed. The plan and the final review verdict are also posted as issue comments.This skill assumes the session model is NOT Fable 5 — the point is cheap execution with expensive judgment. If you (the main agent) are already running on Fable 5, tell the user the advisor would be redundant and ask whether to proceed anyway, run the task directly, or switch the session to Sonnet first (/model sonnet).
Steps 1–4 are shared. Step 5 forks: an issue path that delegates the whole build-and-ship pipeline to work-on-issue, and a lighter prose path for issue-less tasks. Steps 6 (checkpoint consults) and 7 (binding review) define the advisor mechanics both paths use; steps 8–10 close out. work-on-issue stays the single source of truth for the pipeline — the issue path loads and executes it rather than copying its text here.
If the user named an issue, fetch it so the advisor plans against the real requirements, not a paraphrase:
gh issue view <N> --json number,title,body,url
For the owner/repo#N form (or a full URL to another repo), add -R owner/repo — a bare gh issue view <N> only resolves against the current repo. If the command fails (wrong number, no auth, no repo), stop and tell the user — never proceed against a paraphrase of an issue you couldn't fetch.
Record the issue number, title, and URL — steps 2, 4, 5, 8, and 9 need them: step 5's issue path derives its worktree slug cc/issue-<N>-<slug> from the title and needs the number for Closes #<N>, and work-on-issue's own title re-fetch (its step 0) is skipped on this path, so nothing downstream re-resolves it if it's dropped. If no issue is referenced, skip this and every later issue-specific step (2, 4, 9) and take the prose path at step 5.
Run work-on-issue's step 0 gates now — before spawning the advisor — so a closed or already-addressed issue stops the run before you pay for a Fable plan plus a build (skills/work-on-issue/SKILL.md, step 0). Fetch the comment thread and any open PR that references the issue:
gh issue view <N> --comments
gh pr list --state open --search "#<N> in:title,body"
Add -R owner/repo for a cross-repo issue. Two gates, checked while no worktree or code exists yet:
#<N> doesn't count, one that fixes it does. If a genuine PR exists, surface it and stop (or continue on it if it's this session's own branch).If no issue was resolved in step 1, skip this step.
Do not plan the task yourself — the advisor owns the plan. Call the Agent tool with:
subagent_type: Plan (read-only — no Edit/Write; it advises, it never touches files)model: fablerun_in_background: false — the plan gates everything downstreamdescription: Advise on <short task name>prompt: Brief it as a standing advisor, not a one-shot planner. Include: the full task description (for a bare issue reference, the issue title/body from step 1 is the task description), the issue title/body if one was fetched in step 1, the working directory, any constraints the user stated, and its charter:
Record the agent's ID/name — every later consult goes to this same agent via SendMessage so it accumulates the full task history. If the call returns null or errors, retry once; if it fails again, report the failure to the user instead of proceeding unadvised.
Save the plan verbatim to a scratchpad file immediately, so it survives context summarization during a long build and step 4 can post it exactly as produced.
Sanity-check the plan's load-bearing claims against the actual code (files exist, symbols are real, no CLAUDE.md conflicts). Fix small inaccuracies yourself, note them to the user, and update the scratchpad file to match; if the plan is structurally wrong, send the advisor one correction round with the evidence — if the revised plan is still broken, stop and tell the user rather than looping.
Present the vetted plan to the user, then proceed to build without waiting for approval unless the plan reveals a decision only the user can make.
Post the vetted plan as an issue comment before building, so it's preserved on the issue regardless of how the build goes. Use the scratchpad file (with any sanity-check corrections) as the body-file base — it avoids shell-escaping problems with Markdown:
gh issue comment <N> --body-file <tmpfile>
Add -R owner/repo when the issue lives in another repo. Prefix the body with the heading ## Implementation plan (Fable 5 advisor) and end it with:
---
Created with LLM: Fable 5 | high | Harness: Claude Code | fable-advisor
Give the user the comment URL gh returns. Follow the repo's CLAUDE.md conventions for comment formatting if any apply.
Issue path (an issue was resolved in step 1) — delegate to work-on-issue.
Load skills/work-on-issue/SKILL.md and execute its steps 1–6 as the authoritative build-and-ship procedure — worktree cc/issue-<N>-<slug>, implement, verify, commit/push, and a PR that includes Closes #<N> (fully-qualified Closes owner/repo#N cross-repo). Its step 0 gates already ran in step 2 above; its step 7 report is replaced by this skill's steps 9–10. Do not duplicate its pipeline text here. Layer in three injections, each located against work-on-issue's own step numbers:
Preserve fable-advisor's own surfaces on this path: the plan comment (step 4) and the verdict comment (step 9) on the issue, and the Advisor log section plus the | fable-advisor footer tag in the commit/PR (step 8). work-on-issue's guardrail table applies in full. Do not add work-on-issue's orchestration-only baseRefs input form to this skill's input contract.
Prose path (no issue) — lighter standalone flow.
For an issue-less prose task, build and ship directly:
git fetch origin <default-branch> first — the staleness check below compares against the local origin/<default-branch> ref, so skipping the fetch makes the check pass on two equally stale copies — then create a fresh worktree/branch off origin/<default> named cc/fable-advisor/<short-task-name> (via EnterWorktree, name passed verbatim; verify the worktree HEAD matches origin/<default> with git -C <worktree-path> rev-parse HEAD origin/<default-branch>; if the SHAs differ on the worktree you just created, move it onto the fetched default with git -C <worktree-path> reset --hard origin/<default-branch> — safe only because the brand-new branch carries no commits, and always anchored with -C <worktree-path> so it can never touch the original checkout). If the directory isn't a git repo, ask the user how to proceed. All later prose-path work happens inside the worktree.git status before staging — if it shows anything unrelated to the change, don't git add -A; stage the intended files by name and leave strays out — then commit and push from the worktree branch and open a PR. Match the repo's PR-title convention; the body carries the Advisor log and the footer per step 8. Never trigger an @claude review yourself — the skill ends with the open PR.On the issue path these checkpoints run throughout work-on-issue step 3; on the prose path they run during the step 5 build. Either way, the executor (you) builds per the plan, working uninterrupted between checkpoints. Consult the advisor — SendMessage to the step-3 agent, never a new Agent call — only when a checkpoint fires:
Each consult message must carry: the specific question, the current diff (or the relevant excerpt), and what you already tried. Handle the reply by its flag:
Between checkpoints, do not consult — the advisor is for judgment calls, not pair programming.
On the issue path this runs between work-on-issue step 4 (verify) and step 5 (commit); on the prose path it runs after the step 5 verify. Spawn a new one-shot Fable 5 reviewer — fresh context so it isn't anchored on the plan it would otherwise have authored:
subagent_type: Plan, model: fable, run_in_background: falseprompt: the original task, the final plan (including approved deviations and any overruled advisory findings with their reasons), the full diff, the verification results, and instructions to review for correctness, safety, and plan conformance. It must return a verdict — approve, or blocked with a numbered list of blocking findings (each with file:line and a concrete failure scenario) — plus any non-blocking suggestions kept separate.The verdict is binding: do not commit while blocking findings stand.
Whichever path built the change, its commit and PR carry fable-advisor's markers. On the issue path apply them inside work-on-issue's steps 5–6 (its commit message and PR body); on the prose path apply them in that path's commit/PR step (step 5, item 5).
Closes #<N> (fully-qualified Closes owner/repo#N for cross-repo issues) so merging resolves it.| fable-advisor tag:---
Created with LLM: <executor model> | high | Harness: Claude Code | fable-advisor
After the PR is open, post a short closing comment on the issue recording the binding-review outcome: the final verdict (approve, or approve-after-fixes with the finding count), any deadlocks the user ruled on, and the PR URL. Use gh issue comment <N> --body-file <tmpfile> (with -R owner/repo for cross-repo issues), heading ## Review verdict (Fable 5 reviewer), ending with:
---
Validated with LLM: Fable 5 | high | Harness: Claude Code | fable-advisor
Final message: what was built, verification results, the consult/review trail in brief, the PR URL, and the issue comment URLs when an issue was involved.
model: fable forces it. If fable is unavailable (the Agent call errors on the model id), fall back to the most capable model available, name the model that actually ran in the footer and report, never "Fable 5".npx claudepluginhub richkuo/rk-skills --plugin rk-skillsChains Fable 5 planning with autonomous implementation and review loop for GitHub issues. Drives an issue from plan to reviewed PR without validation.
Delegates task planning to a Fable 5 Plan subagent, then builds from the plan in the main agent. Posts plans as comments on referenced GitHub issues.
Applies Fable-inspired workflow discipline: inspect before editing, track goals and findings, ground conclusions in evidence, verify before completion. Useful for evidence-first coding, strict verification, or adapting Fable-style prompts to Codex-safe instructions.