codemap icon indicating copy to clipboard operation
codemap copied to clipboard

skills: two parallel skill systems, five builtins never surface natively

Open JordanCoin opened this issue 3 months ago • 1 comments

codemap has two independent skill mechanisms that don't know about each other. The result is that most of the skills framework is invisible to the agents it's written for.

The split

System Location Skills
Claude Code skills .claude/skills/*/SKILL.md codemap, config-setup, codemap-setup
Codex plugin skills plugins/codemap/skills/*/SKILL.md codemap, config-setup
codemap's own framework skills/builtin/*.md config-setup, explore, handoff, hub-safety, refactor, test-first

Cross-referenced:

  • In both (duplicated): config-setup
  • codemap-only, never a real skill: explore, handoff, hub-safety, refactor, test-first
  • Skill-only, not a codemap builtin: codemap, codemap-setup

Why it matters

From inside a Claude Code session right now, the invocable skill list contains codemap and config-setup. It does not contain hub-safety, refactor, test-first, explore, or handoff — five of the six builtins. Those are reachable only by knowing to run codemap skill show <name> or calling the MCP get_skill tool.

So the hook output that has been printing all session:

Skills matched: config-setup — run `codemap skill show <name>` for guidance

…is codemap's framework asking the agent to shell out for something the host could have surfaced natively. hub-safety is the clearest loss: it's the skill for "you are editing a file 20 others import", which is exactly the moment an agent should have it in context rather than be told to go fetch it.

Secondary problems

  1. config-setup is duplicated across frameworks — .claude/skills/config-setup/SKILL.md (52 lines) and skills/builtin/config-setup.md (97 lines) are different files with the same name and no mechanism keeping them in sync.
  2. .claude/skills/ and plugins/codemap/skills/ are byte-identical copies — verified with diff. Kept in step by hand.
  3. .claude/skills/codemap-setup/ is untracked — it exists only on this machine. No other user or CI run has it.

Suggested direction

Pick one source of truth. skills/builtin/*.md is the natural home since it's where the content and the matching logic already live. Then generate the host-native skill directories from it as part of the build or codemap setup, rather than maintaining three hand-synced copies.

That would mean hub-safety and friends show up in an agent's skill list where they're useful, config-setup stops existing twice, and the plugin copy stops drifting.

Context

The framework predates native skill support in the hosts. Nothing here was wrong when it was written — the hosts grew a mechanism that overlaps it.

JordanCoin avatar Aug 08 '26 16:08 JordanCoin

Follow-up after looking at the actual formats — this is a smaller change than it sounds, and the mechanism already exists in the repo.

The formats are nearly identical

skills/builtin/hub-safety.md:

---
name: hub-safety
description: Safety checks and procedures when modifying hub files (files imported by 3+ others)...
priority: 10
keywords: ["hub", "refactor", "breaking-change", "api", "interface"]
languages: ["go", "typescript", "python", "java", "rust"]
---

.claude/skills/config-setup/SKILL.md:

---
name: config-setup
description: Set up or tune .codemap/config.json so Codemap focuses on code-relevant parts...
---

Same name + description; the builtins just carry extra matching fields. The body is already markdown instructions in both. Converting is a mapping, not a rewrite.

The plugin mechanism already exists

plugins/codemap/ is already a plugin bundle — .codex-plugin/plugin.json, skills/, .mcp.json, assets — and .agents/plugins/marketplace.json already declares it. Hosts namespace plugin skills as plugin:skill, which solves the one real objection to shipping these natively: collisions. explore and refactor are generic enough that a user may well have their own; codemap:explore and codemap:refactor can't clash.

Suggested shape

  1. skills/builtin/*.md stays the single source of truth — it's where the content and the matching logic already live.
  2. Generate the host-native skill dirs from it (build step or codemap setup), rather than maintaining three hand-synced copies.
  3. Ship them through the plugin so they're namespaced and uninstallable, instead of writing into a user's .claude/skills/ directly — that directory is more invasive than hooks or MCP config because entries show up in the user's skill list.

Net effect: hub-safety is in context when an agent is about to edit a file 20 others import, instead of the hook printing "run codemap skill show hub-safety" and hoping. That's the whole point of the skill, and right now it's the one that most needs to fire automatically.

Also worth deciding

Whether codemap's own matcher (intent + keywords + languages) still earns its keep once hosts match on description themselves. Keeping both means two systems deciding relevance for the same content. The hook's Skills matched: line may be better as provenance ("hub-safety applies here") than as an instruction to go fetch something.

JordanCoin avatar Aug 08 '26 16:08 JordanCoin