/agentspec:kb-buildfrom agentspec
Builds a high-assurance, source-verified knowledge base where every claim is source-cited and adversarially fact-checked. Use for foundational or high-stakes KBs that many agents will trust.
Ships in agentspec. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Build a knowledge base where every claim is source-cited and adversarially verified before it lands. This skill serves two purposes: it produces the KB, and its body documents the process — read it as the SOP for how validated knowledge enters the repository.
A KB is a component whose single responsibility is to be a faithful knowledge-bearer.
A foundational KB is consulted by many agents, so one unverified "standard" propagates into all of them.
Faithfulness is therefore non-negotiable, and the verification bar is intrinsic to the kind of claim — a notation or standard claim demands an authoritative source — regardless of how many readers the KB will have.
The distilled reasoning lives in references/lessons.md.
/create-kbThe create-kb command is the single entrypoint for KB creation; this skill is the capability behind its --validated mode. The default mode is a direct, single-pass kb-architect run relying on the agent's own validation. Pick by stakes:
--validated (this skill) | Default (light) |
|---|---|
| Foundational or high-stakes domain | Quick, low-stakes domain |
| Every claim cited and independently fact-checked | kb-architect's own validation suffices |
| Research + adversarial verification + fact-check gate | Single pass, no separate verification layer |
| Worth more tokens for assurance | Token-light |
The skill can also be invoked directly for advanced use (custom research scope, partial reruns) — the entrypoint is a convenience, not a wall.
KBs hold technical domain knowledge for grounding agents: concepts, patterns, specs, quick references. Two things never belong in a KB:
Run the six stages in order. Each stage has an output and a gate; do not start the next stage until the gate passes. Two operating principles apply throughout:
Read the house style before writing a single word:
${CLAUDE_PLUGIN_ROOT}/kb/_templates/.${CLAUDE_PLUGIN_ROOT}/kb/_index.yaml: the registry format, the file-size limits (the single source of truth for line budgets), and the shape of a domain entry.${CLAUDE_PLUGIN_ROOT}/kb/ end to end to see how concepts, patterns, specs, and entry points are actually written in this repository.Then write an intent brief:
Output: intent brief + ranked source list + the house-style constraints the build must obey. Gate: you can state, in one sentence each, what the KB is for, who reads it, and which sources anchor it.
Delegate planning to the the-planner agent, passing the intent brief and the house-style constraints.
If the agent is unavailable in this installation, produce the same plan inline before proceeding — never skip the plan.
The plan must contain:
Research buckets: the topic clusters to investigate, each naming its primary sources.
KB schema: the target file list, mirroring the house precedent and the template line limits, for example:
${CLAUDE_PLUGIN_ROOT}/kb/<domain>/
index.md # entry point — orientation + file map
quick-reference.md # fast lookups
concepts/<topic>.md # one concept per file
patterns/<topic>.md # applied how-tos
specs/<topic>.yaml # machine-readable contracts
Source-priority list: which source wins when two disagree (authoritative > secondary > community).
Build gate: what must be verified before any KB file is written.
Output: the written plan. Gate: every planned file maps to a template, and every research bucket names at least one primary source.
Research fills the plan's buckets; verification tries to tear the findings down.
<research-notes-dir>/), keeping the source and tier attached to each claim.Rules of evidence:
Output: verified, source-cited research notes. Gate: every load-bearing claim survived an independent refutation attempt, or was demoted and flagged.
Author the KB from the verified research notes — never from memory.
kb-architect-type subagent so it carries the KB protocol — templates, line limits, validation headers, scoring.kb-architect invocation per file or file group. The order changes; the protocol and the gates do not.kb-architect agent is unavailable: brief a general-purpose subagent with the templates and the limits from _index.yaml — the protocol travels in the prompt.After the content files, run a synthesis pass in a single context that sees the whole domain:
index.md, quick-reference.md, and the domain manifest — since they need a view of the whole.Sizing guidance:
kb-architect pass is simpler and sidesteps parallel-calibration risk.Output: the complete domain under ${CLAUDE_PLUGIN_ROOT}/kb/<domain>/.
Gate: every file matches its template and line budget, and every factual statement traces to the research notes.
Before accepting the content, run an independent verification pass — fresh context, not one of the authors:
Output: a pass/fail record per checked claim, plus the corrected files. Gate: zero known-wrong claims; every unresolved doubt is flagged in the file, not silently kept.
Update the aggregator ${CLAUDE_PLUGIN_ROOT}/kb/_index.yaml additively:
Output: the updated registry.
Gate: the new domain resolves from _index.yaml, and a diff of the registry shows only additions.
references/lessons.md — the nine distilled principles behind this SOP, each with its why. Read it before running this skill on a new domain, and re-read it when choosing between single-pass and parallel build or whenever skipping a verification step starts to look attractive.kb-architect agent — the build protocol used as the subagent type in Stage 4.the-planner agent — the planning delegate in Stage 2.create-kb command — the entrypoint that routes here via --validated; its default mode is the lighter, single-pass path with no research or verification layer.component-model skill — run it first when it is unclear whether a KB is the right layer for the knowledge (process knowledge belongs in a skill, not a KB).What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub luanmorenommaciel/agentspec --plugin agentspec16 skills in this plugin
/agent-routerIntelligent agent routing -- automatically matches tasks to the best specialist agent based on file patterns, intent keywords, and domain context. Loaded every session to give Claude explicit routing rules for all 58 AgentSpec agents./component-modelDecides where new logic lives in the component model — agent, skill, command, KB, or
template — and how to keep components in their layer, routing each decision to the
right authoring resource and running the fat-to-thin refactor when a component has
outgrown its layer. Loaded by the authoring flows (create-skill, create-agent,
kb-build, create-kb) as their layer-decision gate. Use for "should this be an agent
or a skill", "where does this logic go", adding a new component, "this agent is too
big", or restructuring/refactoring an agent into skills. Do not use to author the
chosen component itself — that is create-skill, create-agent, or /create-kb.
/data-engineering-guideOther plugins' skills for the same job