From rk-skills
Delegates task planning to a Fable 5 Plan subagent for detailed implementation plans, and optionally posts plans as GitHub issue comments.
How this skill is triggered — by the user, by Claude, or both
Slash command
/rk-skills:fableplanThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Delegate planning to a **Fable 5** Plan subagent, then build from its plan in the main agent. The main agent does the building — the subagent only plans.
Delegate planning to a Fable 5 Plan subagent, then build from its plan in the main agent. The main agent does the building — the subagent only plans.
The user provides a task description, and optionally a GitHub issue:
#<N>, bare <N>, or owner/repo#N. When present, the plan is also posted as an issue comment.If the user named an issue, fetch it so the subagent 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 by planning against your paraphrase of an issue you couldn't fetch.
Record the issue number and URL — you'll need them in step 4. If no issue is referenced, skip this and step 4's posting.
Do not re-plan the task yourself first — the subagent owns the plan. Snapshot git status --porcelain before dispatching (the tree may already be dirty), then call the Agent tool with:
subagent_type: Planmodel: fable (this is the whole point of the skill — the plan must come from Fable 5)run_in_background: false — every later step depends on the plan, so wait for it synchronously instead of doing other work firstdescription: Plan <short task name>prompt: Hand the subagent everything it needs to plan independently — the full task description, the issue title/body if one was fetched, the working directory, and any constraints the user stated. Tell it explicitly:
The Plan subagent's final message is returned to you as the tool result; it is not shown to the user.
If the call returns null or errors (user skip, terminal API failure), retry once; if it fails again, report the failure to the user instead of planning yourself.
When the result arrives:
git status --porcelain and compare against the pre-dispatch snapshot to confirm the subagent made no file changes despite the no-edit instruction. If it did, tell the user and ask whether to revert before continuing.Before posting or presenting it, verify the plan's load-bearing claims against the actual codebase: the files it says to modify exist, the functions/symbols it references are real, and it doesn't contradict repo conventions (CLAUDE.md). Fix small inaccuracies yourself and note them; if the plan is structurally wrong (built on a file or mechanism that doesn't exist), do NOT automatically re-dispatch the Plan subagent — stop and tell the user what's failing, and let them decide whether to re-plan with Fable 5, adjust the task, or proceed anyway. If you fixed small inaccuracies, update the scratchpad file from step 2 so it reflects the corrected plan before step 4 posts it.
Now that the plan has passed the sanity-check, save it to the issue as a comment before building, so the vetted plan is preserved on the issue regardless of how the build goes. This comment is not updated after the build.
gh issue comment <N> --body-file <tmpfile>
Add -R owner/repo when the issue lives in another repo (as in step 1). Use the scratchpad file from step 2 (with any step-3 corrections) as the body-file base — it avoids shell-escaping problems with Markdown. Prefix the comment so its origin is clear with a heading line ## Implementation plan (Fable 5) above the plan body, and end the body with the standard metadata footer:
---
Created with LLM: Fable 5 | high | Harness: Claude Code | fableplan
After posting, give the user the comment URL gh returns. Follow the repo's CLAUDE.md conventions for comment formatting if any apply (e.g. avoid #N auto-links in list items). If no issue is referenced, skip this step.
Present the vetted plan to the user (the main agent). This is the plan you will build from.
Before making any code changes, move the build into its own git worktree so it never touches the user's current workspace. If the directory isn't a git repository, tell the user and ask how to proceed rather than building in place. Otherwise create a fresh branch and worktree for the task, prefixed with the coding-agent identifier — cc/ for Claude Code, cursor/ for Cursor, codex/ for Codex — ahead of the fableplan/ segment.
On Claude Code, use the native EnterWorktree tool (it creates under .claude/worktrees/ and switches the tracked cwd; it uses the name verbatim, adding no prefix itself). It branches from origin/<default> only when the worktree.baseRef setting is fresh (its default) — set to head it branches from the local HEAD, which may be stale — so fetch first and verify the base after:
git fetch origin <default-branch>
EnterWorktree(name: "cc/fableplan/<short-task-name>")
git -C .claude/worktrees/cc/fableplan/<short-task-name> rev-parse HEAD origin/<default-branch> # the two SHAs must match
Anchor the check (and any reset) with -C <worktree-path> — cwd doesn't reliably persist between Bash calls, and an unanchored command in the original checkout would misreport or, worse, destroy uncommitted work there. 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; never reset a worktree that already has work on it.
On Cursor or Codex (no EnterWorktree tool), create it by hand — the coding-agent prefix goes on both the directory and the branch so concurrent agents on the same task name never collide:
git fetch origin <default-branch>
git worktree add ../<repo>-fableplan-cursor-<short-task-name> -b cursor/fableplan/<short-task-name> origin/<default-branch>
(swap cursor for codex on Codex), then cd into it and re-verify pwd before later steps — shell state doesn't persist between Bash calls.
Do all of step 7's building inside that worktree. When the build is done, follow the repo's usual conventions for merging or opening a PR from the branch, and remove the worktree once it's no longer needed (git worktree remove <path>).
In the worktree from step 6, the main agent builds the task per the plan. Confirm with the user first only if the plan reveals ambiguity or a decision the user must make; otherwise proceed.
model: fable on the Agent call forces it.fable model is unavailable in this harness (the Agent call errors on the model id), fall back to the most capable model available and proceed — the isolation pattern (Plan subagent plans, main agent builds) is what matters. Name the model that actually ran in the footer and report, never "Fable 5".2plugins reuse this skill
First indexed Jul 14, 2026
npx claudepluginhub richkuo/rk-skills --plugin rk-skillsDelegates 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.
Chains fableplan planning and work-on-issue implementation into one autonomous run: posts a Fable 5 implementation plan to a GitHub issue, then implements it in an isolated worktree and opens a PR that closes the issue. For trusted issues where you want a vetted plan built and shipped directly.
Refines a coding prompt into a detailed, executable plan with PR-sized tasks, dependencies, and atomic subtasks, validated by a principal-engineer critique. For the planning stage of a prompt→plan→execute→debug pipeline.