Dedup near-identical claude-code + codex hivemind-goals SKILL.md via generator
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
- Issue type
- Refactor
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- node.js, typescript
- Domain
- build-system, documentation, tooling
Research direction
Start by checking package.json build/pretest scripts, then compare current claude-code/skills/hivemind-goals/SKILL.md and codex/skills/hivemind-goals/SKILL.md. Next inspect src/skills/hivemind-goals/ and scripts/build-skills.mjs for how the shared body and agents.json map to emitted files. Run npm run build and node scripts/build-skills.mjs --check; completion means the two Path-A SKILL files are regenerated from one template with matching output while hermes/... and openclaw/... remain untouched.
Written by the indexing model from the issue text.
Description
Context
PR #193 ships the goals + KPI cross-agent feature. Each of the four plugin-enabled agents (claude-code / codex / hermes / openclaw) has its own skills/hivemind-goals/SKILL.md because each runtime's skill loader reads from its own per-agent directory.
Three of the four files are genuinely different (different write paths require different bodies — Path A vs Path B vs Path C, see PR #193 body). The fourth pair, however, is near-duplicated:
claude-code/skills/hivemind-goals/SKILL.md ── 6249 bytes
codex/skills/hivemind-goals/SKILL.md ── 6233 bytes
diff between the two:
4c4
< allowed-tools: Read Write Edit Bash # claude-code
> allowed-tools: Bash # codex
Body is bit-identical (~6.2 kB of workflow / path conventions / examples). They diverge only on the allowed-tools frontmatter line because the two runtimes expose different tool name namespaces for the same Path-A workflow.
Surfaced by @kaghni in #193 (comment).
Problem
Editing the workflow now requires two synchronized edits. The body has already drifted once during PR #193 development (caught at review). As the feature evolves (new statuses, KPI shape changes, new examples) the drift risk compounds.
The other agents (hermes/, openclaw/) are not part of this problem — their bodies are intentionally different (CLI-only warning, registered-tool semantics).
Proposed approach
Single shared body source + per-agent frontmatter, emitted by a small build step:
src/skills/hivemind-goals/
body.md # the 6 kB workflow body (single source of truth)
agents.json # { "claude-code": "Read Write Edit Bash", "codex": "Bash" }
scripts/build-skills.mjs # reads body.md + agents.json,
# emits claude-code/.../SKILL.md and codex/.../SKILL.md
# runs in `npm run build` (pre-bundle), idempotent
Acceptance:
-
npm run buildregenerates bothclaude-code/skills/hivemind-goals/SKILL.mdandcodex/skills/hivemind-goals/SKILL.mdfrom the single template. - CI guard (or
preteststep) verifies the two generated files are in sync with the template (diffagainst<(node scripts/build-skills.mjs --check)exits zero). -
hermes/skills/hivemind-goals/SKILL.mdandopenclaw/skills/hivemind-goals/SKILL.mdare NOT touched by this dedup — they remain hand-authored variants because their bodies are substantively different (Path B / Path C semantics). - One additional
agents.jsonentry per future Path-A runtime if more come online (e.g. if cursor ever exposes a Write-tool intercept it joins the generator instead of hand-authoring).
Out of scope (explicit non-goals)
- Cross-runtime dedup of the SessionStart-injected text — that already lives at
src/hooks/shared/goals-instructions.tsas the single source of truth (GOALS_INSTRUCTIONS+GOALS_INSTRUCTIONS_CLI). - Merging hermes / openclaw SKILL.md into a shared body — they describe genuinely different workflows (CLI vs tool calls). The hermes one carries a hard "do not use write_file" warning that is incorrect for VFS-enabled agents and vice versa.
- Other skills (
hivemind-memory,hivemind-login, etc.) — out of scope; if they have similar near-duplicate pairs they get the same treatment in separate PRs.
Effort estimate
~1 hour. Pure mechanical refactor — body content stays byte-identical; only the build step is new.
- Dominant language
- TypeScript
- Stars
- 1.6k
- Forks
- 107
- Avg merge
- 19h 25m
- Merged PRs (30d)
- 12
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from activeloopai/hivemind
-
Difficulty 1/5 Under an hour Newbie friendliness 95/100
activeloopai/hivemind#330 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
activeloopai/hivemind#184 ·
-
embeddings: alternation patterns (a|b|c) skip the embedding daemon and fall back to lexical-only Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
activeloopai/hivemind#86 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 68/100
activeloopai/hivemind#364 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 72/100
activeloopai/hivemind#361 · 1 comment ·
All issues in activeloopai/hivemind
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
fullcalendar/fullcalendar#8106 ·