feat(plugin): ship the repo's skills as ccam plugin skills

The repo root already IS the `ccam` plugin root (`"source": "./"`), so the
conventional `skills/` dir at the root is the plugin's skills dir — while
`.claude/skills/` only loaded for a session whose cwd was inside this
checkout. That is useless for a lane working in another repo, which is why
`ccam skills install` existed at all.

Move all seven skills to `skills/`: they now reach every plugin user as
`/ccam:<name>` (bare `/<name>` as an alias). `ccam skills install` stays as
the fallback for a plain checkout without the plugin, sourcing from the new
path.

Agents deliberately do NOT move. A plugin agent is addressed as
`ccam:qc-local`, which would break the `subagent_type: qc-local` references
in ship-feature-lane; `ccam lanes agents install` keeps writing them into the
lane's own `.claude/agents/`, the highest-priority agent source. MCP was
already plugin-shipped via `plugins/ccam/.mcp.json`.

Mechanical fallout: ~115 source files carry a doc-comment pointer to
`.claude/skills/file-headers/`, repointed to `skills/file-headers/`. The
generic Claude Code config-surface examples in openapi/cc-config (`.claude/
skills/code-reviewer`) describe any user's layout and are left alone.

Also fixes the two file-headers scripts, whose `ROOT=` climbed four levels
from `.claude/skills/file-headers/scripts/` and would have escaped the repo
from the new depth — it scanned sibling projects until corrected to three.

npm run test:server (1160 pass), test:client (422 pass), mcp:typecheck,
mcp:build + mcp:check-build all green.
This commit is contained in:
2026-08-21 17:17:33 +07:00
parent effdaf4ba8
commit b7c573f8d9
132 changed files with 157 additions and 133 deletions
+8 -4
View File
@@ -1,8 +1,12 @@
/**
* @file Installs .claude/skills/ship-feature-lane/ into ~/.claude/skills/, so
* @file Installs skills/ship-feature-lane/ into ~/.claude/skills/, so
* /ship-feature-lane is discoverable from a session running inside any
* lane's own working directory — not just inside this repo, where it lives
* until installed. Shared by bin/ccam.js's `ccam skills install` CLI and the
* lane's own working directory. This is the FALLBACK path for a plain
* checkout: the skill also ships with the `ccam` plugin (the repo root IS
* the plugin root, so `skills/` is the plugin's skills dir), where it is
* already global as `/ccam:ship-feature-lane`. Installing it here just
* restores the bare `/ship-feature-lane` name for people who do not run the
* plugin. Shared by bin/ccam.js's `ccam skills install` CLI and the
* POST /api/skills/install route, so there is exactly one copy of this
* logic. Pure filesystem action.
* @author Nguyễn Ngọc Trí Vĩ <vinnt@smartgift.vn>
@@ -19,7 +23,7 @@ const path = require("node:path");
* @returns {{installed: true, path: string}}
*/
function installShipFeatureLaneSkill({ repoRoot }) {
const src = path.join(repoRoot, ".claude", "skills", "ship-feature-lane");
const src = path.join(repoRoot, "skills", "ship-feature-lane");
if (!fs.existsSync(src)) {
throw Object.assign(new Error(`not found: ${src}`), { code: "ENOSKILLSRC" });
}