forge-setup
Skill4 starsChanged 3 months agoApache-2.0View on GitHub
Harness adaptation runbook — clone the repo, find harness-specific references, patch them for the running harness. User-invoked only.
- Deletes or force-pushes
In this repository35 other files it gives its agents.
- AGENTS.mdAGENTS.md
- 12-factor-appSkill
- caveman-commitSkill
- caveman-reviewSkill
- cavemanSkill
- conventional-commitsSkill
- creating-pull-requestsSkill
- deep-researchSkill
- dispatching-parallel-agentsSkill
- domain-modelingSkill
- finishing-a-development-branchSkill
- forge-cleanupSkill
- forge-docsSkill
- forge-eu-accessibilitySkill
- forge-flowSkill
- forge-initSkill
- forge-seoSkill
- forgeSkill
- forge-tailwindcss-conventionsSkill
- frontend-designSkill
- git-issue-trackerSkill
- grillingSkill
- kiss-principleSkill
- loopsSkill
- planning-and-task-breakdownSkill
- prototypeSkill
- pr-resolveSkill
- pr-reviewSkill
- resolving-merge-conflictsSkill
- ste100Skill
- subagent-driven-developmentSkill
- use-git-identitySkill
- using-git-worktreesSkill
- verification-before-completionSkill
- wayfinderSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
15 rules. About 0 are common, 8 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 17
After upgrading the harness, when a skill's referenced tool/flag no longer exists.
- Very specific: line 18
When loops, pr-review, pr-resolve, forge-flow, dispatching-parallel-agents, or subagent-driven-development reference tooling the current …
- Distinctive: line 22
Before any discovery, clone this repo to a throwaway workspace so patches don't touch the original (or the harness's skill directory until …
- Distinctive: line 39
Ask the user: If neither identifies it, ask: *"Which harness/CLI is running this session?"* Do not guess and patch blind.
- Distinctive: line 69
If the harness has no equivalent for a surface, fall back to the simplest file-based convention and say so in the patch:
- Very specific: line 71
No goal API → GOAL.md at repo root, re-read at every session start (forge-flow already treats the goal as a re-injected contract.
- Distinctive: line 72
No plan mode → write the plan file and stop for user approval in plain chat.
- Distinctive: line 73
No subagent API → run the swarm sequentially.
- Very specific: line 98
Scripts must still parse: After patching a .sh, run bash -n on it.
- Very specific: line 110
Before installing skills, the user must set their git identity.
- Very specific: line 121
Update $WORKDIR/skills/use-git-identity/SKILL.md with the provided values before proceeding.
- Distinctive: line 125
If verification passes, offer to copy the adapted skills into the harness's skill directory so future sessions load them natively.
- Very specific: line 159
Ask the user before copying.
- Very specific: line 174
Run forge-init (repo bootstrap) or forge-flow (session bootstrap) — those come after, using the adapted skills
- Distinctive: line 175
Commit anything without the user's go-ahead
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Forge Setup
The skills in this repo are authored against Kimi Code CLI. Most are pure prompt contracts and run anywhere — but a handful reference harness-specific machinery: kimi -p non-interactive loops, the CreateGoal tool, plan mode, and the AgentSwarm/Agent subagent API. On a different harness (Claude Code, Codex, Gemini CLI, opencode, …) those references are dead.
This skill is the discovery + adaptation + bootstrap procedure: it clones the repo to a temp directory, makes the agent find every non-agnostic surface itself, research its own harness's equivalent, patch the references with minimal changes, and optionally install the adapted skills into the harness's skill directory. It does not ship a per-harness mapping table — harnesses change faster than any table stays true. The agent running on the target harness is the best researcher for that harness.
When to run
- First session on any harness that is not Kimi Code CLI.
- After upgrading the harness, when a skill's referenced tool/flag no longer exists.
- When
loops,pr-review,pr-resolve,forge-flow,dispatching-parallel-agents, orsubagent-driven-developmentreference tooling the current session does not have.
Step 0 — Clone the repo to a temp directory
Before any discovery, clone this repo to a throwaway workspace so patches don't touch the original (or the harness's skill directory until verified):
REPO_URL="https://github.com/weselben/RooForge"
WORKDIR="/tmp/rooforge-$(date +%s)"
git clone "$REPO_URL" "$WORKDIR"
cd "$WORKDIR"Done when: the repo is cloned to $WORKDIR and you are inside it. All subsequent steps run from $WORKDIR.
Step 1 — Identify the harness
Try to identify what is running you, in order:
- Own tool surface — which tools exist this session? (
AgentSwarm,CreateGoal,EnterPlanMode, aSkilltool, aTasktool, …) - Environment — CLI binary on
PATH(which kimi claude codex gemini opencode), harness config dirs (~/.kimi-code,~/.claude,~/.codex, …), env vars. - Ask the user. If neither identifies it, ask: "Which harness/CLI is running this session?" Do not guess and patch blind.
Done when: the harness name and its CLI binary (if any) are known.
Step 2 — Discover non-agnostic surfaces
Scan the cloned repo for harness-specific references. This exact inventory, run from $WORKDIR:
grep -rn -E 'kimi -p|kimi\b|CreateGoal|EnterPlanMode|ExitPlanMode|plan mode|AgentSwarm|subagent_type|Agent\(resume|run_in_background' skills/ --include='*.md' --include='*.sh'Known surfaces today (verify against the grep — the grep is the truth, this list is the orientation):
| Surface | Where | Kimi form | What it needs |
| Non-interactive CLI loop | loops/scripts/run_loop.sh, loops/SKILL.md, pr-review, pr-resolve (scripts + templates) | kimi -p "<prompt>" | The harness CLI's headless one-shot-prompt flag that prints the reply to stdout |
| Goal / contract persistence | forge-flow/SKILL.md | CreateGoal tool | A long-living goal/contract mechanism, or a file fallback |
| Plan mode with approval gate | forge/SKILL.md, planning-and-task-breakdown/SKILL.md, pr-review/pr-resolve templates | EnterPlanMode / plan file / user approval | The harness's plan-mode equivalent, or a file-based plan contract |
| Parallel subagent dispatch | dispatching-parallel-agents/SKILL.md, subagent-driven-development/SKILL.md (+ prompt templates), planning-and-task-breakdown/SKILL.md | AgentSwarm with {{item}} template, subagent_type: coder/explore/plan, Agent(resume=…), run_in_background | The harness's subagent/parallel-task API: batch dispatch, agent roles, resume, background runs |
| Skill loading | AGENTS.md, several SKILL.md "load X" instructions | Skills read as plain files from skills/ | Nothing — file reads are harness-agnostic. Only patch if the harness has a native skills dir the repo should be symlinked/copied into |
Step 3 — Research the harness's equivalents
For each surface found in step 2, research how this harness does it:
- Own documentation first — the harness's docs dir,
--helpoutput (<cli> --help), built-in skill/command listings, config schema. - Web second — search for the harness's headless/non-interactive mode, subagent API, and plan/goal features. Prefer official docs.
- Record each mapping before patching:
kimi -p "…"→ e.g.claude -p "…",CreateGoal→ e.g. aGOAL.mdcontract file,AgentSwarm→ e.g. parallelTaskcalls.
If the harness has no equivalent for a surface, fall back to the simplest file-based convention and say so in the patch:
- No goal API →
GOAL.mdat repo root, re-read at every session start (forge-flow already treats the goal as a re-injected contract; a file satisfies that). - No plan mode → write the plan file and stop for user approval in plain chat.
- No subagent API → run the swarm sequentially; keep the prompt templates unchanged.
Step 4 — Patch the cloned repo with minimal diffs
Premade example replace commands — adapt the replacement side to whatever step 3 found. Run from $WORKDIR. Each is deliberately narrow; never rewrite skill logic, only the harness reference.
# 1. Non-interactive loop engine — replace the CLI + flag (example: claude -p)
grep -rl 'kimi -p' skills/ | xargs sed -i 's/kimi -p/claude -p/g'
grep -rl '\bkimi\b' skills/ --include='*.sh' | xargs sed -i 's/\bkimi\b/claude/g'
# 2. Goal tool — replace with the harness's goal mechanism or the file fallback
grep -rl 'CreateGoal' skills/ | xargs sed -i 's/CreateGoal/GOAL.md contract file/g'
# 3. Plan mode naming — match the harness's own terms, keep the approval gate intact
grep -rl 'EnterPlanMode\|ExitPlanMode' skills/ | xargs sed -i 's/EnterPlanMode/plan mode/g; s/ExitPlanMode/exit plan mode/g'
# 4. Subagent dispatch — rename the API, keep {{item}} template mechanics and role mandates
grep -rl 'AgentSwarm' skills/ | xargs sed -i 's/AgentSwarm/parallel Task dispatch/g'Patch rules:
- Minimal changes. One reference swapped for its equivalent. No reformatting, no rewording of surrounding prose, no "while I'm here" cleanups.
- Contracts stay.
DONE:/BLOCKED:inrun_loop.sh, the role-mandate blocks, the MANDATORY FIRST loads, and the plan-approval gate are behavior, not harness references — never touch them. - Scripts must still parse. After patching a
.sh, runbash -non it. - Same-scope commits. Per repo convention, conventional commits with the skill name as scope. A harness adaptation spans several skills — use
chore(forge-setup): adapt skills to <harness>as one commit.
Step 5 — Verify the adapted clone
- Re-run the step-2 grep from
$WORKDIR. Expected: zero hits for the old harness's terms outsideforge-setupitself (this file documents the Kimi forms on purpose — leave it). - Syntax-check every patched script:
find skills/ -name '*.sh' -exec bash -n {} \;. - Smoke-test the loop engine if the harness CLI exists: one
run_loop.shcall with a trivial prompt template that answersDONE: okon iteration 1. - Report the mapping table (old → new, per surface) to the user.
Step 6 — Prepare identity for commit authorship
Before installing skills, the user must set their git identity. If the user wants the adapted use-git-identity skill to reflect their own identity (not the RooForge default), prompt:
The adapted use-git-identity skill currently sets:
user.name = "weselben/rooforge"
user.email = "bengottwaldi04@gmail.com"
Enter your desired git name (or press Enter to keep "weselben/rooforge"):
Enter your desired git email (or press Enter to keep "bengottwaldi04@gmail.com"):Update $WORKDIR/skills/use-git-identity/SKILL.md with the provided values before proceeding. This ensures commits made by the adapted skills carry the user's identity.
Step 7 — Install adapted skills into the harness skill directory (optional)
If verification passes, offer to copy the adapted skills into the harness's skill directory so future sessions load them natively.
First, delete any existing RooForge skills in the harness directory to ensure a clean update on re-run:
# Determine the harness skill directory (prefer user's config dir)
HARNESS_SKILLS_DIR=""
if [ -d "$HOME/.claude/skills" ]; then
HARNESS_SKILLS_DIR="$HOME/.claude/skills"
elif [ -d "$HOME/.codex/skills" ]; then
HARNESS_SKILLS_DIR="$HOME/.codex/skills"
elif [ -d "$HOME/.kimi-code/skills" ]; then
HARNESS_SKILLS_DIR="$HOME/.kimi-code/skills"
elif [ -d "$HOME/.opencode/skills" ]; then
HARNESS_SKILLS_DIR="$HOME/.opencode/skills"
else
HARNESS_SKILLS_DIR="$HOME/.agents/skills"
fi
mkdir -p "$HARNESS_SKILLS_DIR"
# Remove existing RooForge skill directories (clean update)
for skill in $(ls "$WORKDIR/skills/"); do
[ -d "$HARNESS_SKILLS_DIR/$skill" ] && rm -rf "$HARNESS_SKILLS_DIR/$skill"
done
# Copy adapted skills one-by-one (exclude forge-setup — it documents the Kimi baseline)
for skill in $(ls "$WORKDIR/skills/"); do
[ "$skill" = "forge-setup" ] && continue
cp -r "$WORKDIR/skills/$skill" "$HARNESS_SKILLS_DIR/$skill"
done
echo "Adapted skills installed to: $HARNESS_SKILLS_DIR"Ask the user before copying. If they decline, the adapted clone remains at $WORKDIR for manual inspection.
Rules
- Discovery over assumption. The grep inventory in step 2 is re-run every time — never patch from a memorized list.
- Ask when unknown. Harness unidentified → ask the user. Equivalent not found after research → ask the user before inventing a fallback.
- Minimal diffs. Reference swap only. Anything beyond that is a separate change.
- forge-setup is exempt from its own patches. This file names the Kimi forms as the reference baseline; step 5's grep excludes it deliberately.
- Work on the clone. Steps 2–5 run on
$WORKDIR, not the original repo or the harness skill directory. Only step 7 copies out.
Boundaries
Forge Setup does not:
- Install the harness CLI or change harness config
- Rewrite skill behavior, contracts, or prompt templates beyond the harness reference
- Run
forge-init(repo bootstrap) orforge-flow(session bootstrap) — those come after, using the adapted skills - Commit anything without the user's go-ahead
- Modify the original GitHub repo (works on a local clone only)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

