Lookup skill plus harness-optimized reference files for authoring and configuring Claude Code — skills, subagents, hooks, slash commands, MCP, plugins…

Lookup skill plus harness-optimized reference files for authoring and configuring Claude Code — skills, subagents, hooks, slash commands, MCP, plugins, CLAUDE.md memory, and settings — with a read-only expert agent that replaces the built-in claude-code-guide. Retrieves only the relevant section into context.
/plugin install cc-knowledge@kwitsch-plugins
Renamed from claude-code-knowledge in 2.0.0 (Claude Code reserves third-party plugin names starting with claude-): uninstall claude-code-knowledge@kwitsch-plugins and install cc-knowledge@kwitsch-plugins.
| Skill | What it does |
|---|---|
cc-reference | Looks up the relevant section from the bundled reference files and loads only that section into context, keeping token cost low. |
cc-review | Audits a Claude Code component (plugin/skill/agent/hook/command/MCP/memory/settings) against the cc-reference rules via the read-only cc-reviewer agent, then interactively applies the recommendations you select. |
cc-author | Creates a new Claude Code component (skill/agent/hook/command/MCP/plugin/CLAUDE.md/settings) grounded strictly in the cc-reference rules via the read-only cc-author-planner agent, writes it, and optionally hands it to cc-review. |
memory-audit | Discovers every CLAUDE.md and .claude/rules/*.md file in the project (default: whole repo), audits each against the cc-reference memory rules (reusing the cc-reviewer agent), grades them in a claude-md-improver-style quality report, recommends leanness/scope-splits (subfolder CLAUDE.md or .claude/rules/ with paths:); then with --fix auto-applies every fixable finding, or without --fix applies only the improvements you pick via an AskUserQuestion multi-select. |
cc-compress | Compresses a markdown memory/instruction file (e.g. CLAUDE.md) into dense caveman-style prose in place, cutting the token cost of loading it every session. Backs up the original to session-temp storage for rollback. Adaptation of upstream caveman-compress. |
lsp-audit | Audits a project's file extensions against the .lsp.json of its project-scope lsp plugin (.claude/skills/lsp/, migrating and removing a legacy project-root .lsp.json) and additively adds the missing LSP server entries a bundled catalog recognizes — --fix auto-adds them, otherwise an AskUserQuestion multi-select picks which; extensions with no known server are reported for manual handling, never guessed. |
repository-audit | Runs a full repository audit end to end: first flags whether the baseline memory files (a root CLAUDE.md and a .claude/rules/ directory) exist, then runs lsp-audit and memory-audit in sequence (forwarding --fix and the repo path), then offers the manual to-dos memory-audit returns (leanness trims, scope-split moves) for selection via AskUserQuestion — --fix applies them all — then detects the repository's development tools (runtimes, package managers, LSP servers; git, bash, curl and Claude Code are assumed present) and offers — or with --fix creates — a project-level init-dev-environment skill that installs them at user level into ~/.local/bin, and folds all four passes into one combined report (Structure, LSP audit, Memory audit, Dev environment). The structure check is report-only — missing baseline files become manual to-dos pointing at cc-author; when .claude/skills/init-dev-environment/ already exists, each detected tool it lacks is offered for adding via AskUserQuestion (--fix adds them all), which rewrites that skill's SKILL.md and install.sh from the current template. |
| Agent | Model | Role |
|---|---|---|
claude-code-expert | haiku | Answers Claude Code authoring questions (skills, subagents, hooks) strictly via the cc-reference skill — read-only, never from training memory. An in-process mods tool.call hook transparently reroutes the built-in claude-code-guide agent to it, so existing "ask the guide" flows get the curated answer. |
cc-reviewer | haiku | Read-only worker dispatched by the cc-review skill. Audits one component type in a target against the cc-reference rules and returns structured JSON findings — never writes. |
cc-author-planner | haiku | Read-only worker dispatched by the cc-author skill. Composes the new component's file content strictly from the cc-reference knowledge and returns it as JSON — never writes. |
All reference files live in the skill's references/ subfolder (skills/cc-reference/references/).
| File | Covers |
|---|---|
claude-code-skills-reference.md | Authoring Claude Code skills: frontmatter fields, trigger patterns, tool access, inline script conventions. |
claude-code-agents-reference.md | Authoring Claude Code subagents: manifest fields, tool lists, delegation patterns, model selection. |
claude-code-hooks-reference.md | Hook mechanics: event types, hook schemas, lifecycle, exit codes, input/output shapes. |
hook-handler-selection.md | Choosing the right hook-handler type: decision table mapping event + behavior to command hook vs. mcp_tool hook. |
claude-code-mcp-tool-hooks-reference.md | Backing a hook with an MCP-server tool (mcp_tool): fields, the plugin:<plugin>:<key> server-name namespacing gotcha, tool-text→decision output contract, fail-open, plugin server pattern. |
claude-code-commands-reference.md | Authoring custom slash commands: locations & precedence, frontmatter, arguments, dynamic context, namespacing; built-in commands. |
claude-code-mcp-reference.md | MCP integration: .mcp.json, transports, config scopes, auth, tool naming. |
claude-code-mcp-managed-reference.md | Managed/enterprise MCP: managed-mcp.json exclusive control, allowedMcpServers/deniedMcpServers allowlists & denylists, evaluation order. |
claude-code-plugins-reference.md | Plugin authoring: plugin.json schema, layout, path variables, components, dependencies, CLI. |
claude-code-plugins-marketplace-reference.md | marketplace.json schema: top-level fields, plugin entry fields, source types, claude plugin validate. |
claude-code-memory-reference.md | CLAUDE.md memory: locations & precedence, imports, auto-memory, what belongs. |
claude-code-settings-reference.md | Config surface: settings.json & scope precedence, env vars, permissions & modes, model config, output styles, statusline, sandboxing. |
skill-folder-structure.md | Claude Code skill directory layout + the convention that ≥2 bundled reference files live in a references/ subfolder. Static — not refreshed by /update-cc-references. |
Once installed, invoke the skill with your question:
/cc-knowledge:cc-reference <your question>
The skill matches your question against the section index in SKILL.md and loads only the matched reference section, keeping context small. The bundled reference files are the primary source (no network needed). When they don't cover a question, the skill falls back to WebFetch against the current official Anthropic docs and flags that the answer came from live docs rather than the bundled reference — a hint to run /update-cc-references.
You can also let the expert agent drive: any dispatch of the built-in claude-code-guide subagent is rerouted by an in-process mods tool.call hook (no hook process or MCP server) to cc-knowledge:claude-code-expert, which answers only from the cc-reference knowledge and has no write access.
Reference files are kept current by the repo-only skill /update-cc-references [skills|agents|hooks|all] (not shipped with the plugin). It re-fetches the official Anthropic docs, and on any change minor-bumps the version in plugin.json and opens a PR. CI tags the version after merge.
hooks/register.ts 12 lines1import type { Register } from "claude-code";
2import { rerouteType } from "./reroute.mjs";
3
4export const register: Register = (on) => {
5 // Reroute a claude-code-guide dispatch to the cc-reference-grounded expert; every other call passes untouched.
6 // No .catch: a throwing hook is skipped, so a failure fails open (the guide runs un-rerouted), as the old mcp_tool hook did.
7 on("tool.call", { tool: ["Agent", "Task"] }, (_$, e, next) => {
8 const subagent_type = rerouteType(e.subagent_type);
9 return next(subagent_type === e.subagent_type ? e : { ...e, subagent_type });
10 });
11};
12hooks/reroute.mjs 27 lines1// Pure logic of the claude-code-guide reroute mod (hooks/register.ts). Zero-dep; never references `$`.
2
3export const REROUTE_TARGET = "cc-knowledge:claude-code-expert";
4
5/**
6 * Normalize a subagent_type: lowercase, collapse non-alphanumeric runs to `-`, trim.
7 * @param {unknown} value
8 * @returns {string}
9 */
10export function normalize(value) {
11 return String(value == null ? "" : value)
12 .toLowerCase()
13 .replace(/[^a-z0-9]+/g, "-")
14 .replace(/^-+|-+$/g, "");
15}
16
17/**
18 * The subagent_type an Agent call should run with: the expert for any spelling of
19 * `claude-code-guide`, else the type unchanged. Loop-safe: the target is not a guide.
20 * @template T
21 * @param {T} subagentType
22 * @returns {T | typeof REROUTE_TARGET}
23 */
24export function rerouteType(subagentType) {
25 return normalize(subagentType) === "claude-code-guide" ? REROUTE_TARGET : subagentType;
26}
27