Problem
Onboarding a docs repo into the knowledge base is documented end to end (contract/SINGLE_PAGE.md, contract/HEADLESS_RULES.md, contract/ARTIFACT.md, the two action READMEs), but a maintainer working in an AI-assisted editor still has to find those files, read them in the right order and hand-translate them into a workflow file, a kb-docs.json and possibly a headless build. Agents left to their own devices routinely over-build: they invent a scripts/pack.sh, write a manifest for a single-page repo that needs none, or copy the release workflow from an old fork with dist.tar.gz / marketplace.json in it.
The repo already owns the source of truth for all of this. It should also own the agent-facing instructions for applying it, so that "make this repo publish to the knowledge base" is a one-prompt task in Claude Code or GitHub Copilot and produces exactly what the contract asks for and nothing else.
Proposal
Add an Agent Skill to this repository, skills/kb-docs/ (name to be settled; must be a valid skill name), that guides an agent through onboarding a repo's documentation into the knowledge base.
What the skill does
- Classifies the repo using the same three-way table as
contract/SINGLE_PAGE.md: markdown files only → single-page; an existing static docs site (mkdocs, Starlight, Docusaurus…) → packaged; hosted elsewhere and not packageable → iframe (explicit stopgap, points the user at the deployment repo's apps.json instead of changing the docs repo).
- Single-page path: writes one workflow file that calls
actions/publish-single-page-docs@v1 with the inputs derived from the repo's markdown (docs, slug, name, description, icon, tags). Nothing else: no manifest, no build script, no package.json changes.
- Packaged path: adds the headless build flag to the existing build, writes
kb-docs.json against contract/kb-docs.schema.json, and writes one workflow file that runs the repo's own build and calls actions/publish-docs@v1. Checks the built HTML against contract/HEADLESS_RULES.md (relative paths, no <base>, data-kb-headless, design tokens) and reports what is missing rather than patching the site theme blindly.
- Verifies by running the same checks the actions run (the action's validation is the oracle; the skill does not re-implement it) and tells the user how to trigger the first release and where the artifact shows up.
- Troubleshoots by pointing to the existing
## Troubleshooting section of contract/SINGLE_PAGE.md and the actions' READMEs, extended where the skill's own dry runs surface gaps (missing contents: write, no release to attach to, kb-docs.tar.gz present but manifest slug mismatch, self-hosted runner needing npm-registry/node-mirror per contract/DEPLOYMENT.md).
Minimal-output rule
The skill must produce the minimum the contract requires and refuse to add more:
- single-page: exactly one file (
.github/workflows/publish-docs.yml)
- packaged:
kb-docs.json + one workflow file + the smallest build-flag change
- never a helper script, wrapper,
Makefile target, or vendored copy of the schema or action code
- never a
dist.tar.gz, marketplace.json, bundle.json or any other pre-v1 name
This rule goes in the skill body as an explicit instruction, and the skill's evals (below) assert it.
Skill layout and best practices
Follow the Agent Skills spec (SKILL.md with name + description frontmatter, progressive disclosure, references split into files loaded on demand):
skills/kb-docs/
SKILL.md # when to trigger, decision table, the two paths, minimal-output rule, verify + troubleshoot pointers
references/
single-page.md # copy-paste workflow + input table, mirrors contract/SINGLE_PAGE.md
packaged.md # headless flag, kb-docs.json fields, workflow, HEADLESS_RULES checklist
troubleshooting.md # symptom → cause → fix, one table, links back to contract/
examples/
single-page.publish-docs.yml
packaged.publish-docs.yml
kb-docs.json
description written for triggering: names the knowledge base, kb-docs.json, kb-docs.tar.gz, publish-single-page-docs, "onboard docs", "publish documentation to the knowledge base".
SKILL.md under ~150 lines; anything longer moves to references/. No scripts directory: the actions already do the work, the skill only guides.
- Examples are copied verbatim from
contract/ and the action READMEs (or generated from them in CI) so the skill cannot drift from the contract. A CI check diffs skills/kb-docs/examples/* against their sources.
- Use
skill-creator-style evals: three fixture repos (markdown-only, mkdocs site, hosted-elsewhere), each with a prompt and an assertion on the produced file set. The minimal-output rule is asserted as "no files outside the allowed list".
Compatibility
- Claude Code: installable into
.claude/skills/ (project) or ~/.claude/skills/ (user).
- GitHub Copilot: installable into
.github/skills/ (Copilot coding agent and Copilot CLI read the same SKILL.md format).
- skills.sh: the repo layout must work with
npx skills add AbsaOSS/knowledge-base — skills discovered under skills/*/SKILL.md, installed into whichever agents the user selects. Document the one-line install in the skill README and in README.md's onboarding section. Verify with a fresh checkout that npx skills add finds exactly this skill.
- Frontmatter limited to the fields every consumer understands (
name, description, optional license, metadata); no Claude-only allowed-tools unless it degrades gracefully elsewhere.
Docs alignment
contract/SINGLE_PAGE.md and contract/HEADLESS_RULES.md gain a short "With an AI agent" note pointing at the skill and the install command; they remain the normative text.
README.md onboarding section lists the skill as the fastest route, after the three-type table.
- Skill prose follows the same voice and structure as
contract/ (tables for choices, one code block per step, troubleshooting as symptom → fix).
Scope
Notes
- The skill guides; the actions validate. If a check is worth having, it belongs in
actions/lib/, and the skill tells the agent to run the action's self-test, not to reimplement the check.
iframe stays a stopgap. The skill explains it and stops; it does not write anything for that path.
Problem
Onboarding a docs repo into the knowledge base is documented end to end (
contract/SINGLE_PAGE.md,contract/HEADLESS_RULES.md,contract/ARTIFACT.md, the two action READMEs), but a maintainer working in an AI-assisted editor still has to find those files, read them in the right order and hand-translate them into a workflow file, akb-docs.jsonand possibly a headless build. Agents left to their own devices routinely over-build: they invent ascripts/pack.sh, write a manifest for a single-page repo that needs none, or copy the release workflow from an old fork withdist.tar.gz/marketplace.jsonin it.The repo already owns the source of truth for all of this. It should also own the agent-facing instructions for applying it, so that "make this repo publish to the knowledge base" is a one-prompt task in Claude Code or GitHub Copilot and produces exactly what the contract asks for and nothing else.
Proposal
Add an Agent Skill to this repository,
skills/kb-docs/(name to be settled; must be a valid skill name), that guides an agent through onboarding a repo's documentation into the knowledge base.What the skill does
contract/SINGLE_PAGE.md: markdown files only → single-page; an existing static docs site (mkdocs, Starlight, Docusaurus…) → packaged; hosted elsewhere and not packageable → iframe (explicit stopgap, points the user at the deployment repo'sapps.jsoninstead of changing the docs repo).actions/publish-single-page-docs@v1with the inputs derived from the repo's markdown (docs,slug,name,description,icon,tags). Nothing else: no manifest, no build script, nopackage.jsonchanges.kb-docs.jsonagainstcontract/kb-docs.schema.json, and writes one workflow file that runs the repo's own build and callsactions/publish-docs@v1. Checks the built HTML againstcontract/HEADLESS_RULES.md(relative paths, no<base>,data-kb-headless, design tokens) and reports what is missing rather than patching the site theme blindly.## Troubleshootingsection ofcontract/SINGLE_PAGE.mdand the actions' READMEs, extended where the skill's own dry runs surface gaps (missingcontents: write, no release to attach to,kb-docs.tar.gzpresent but manifest slug mismatch, self-hosted runner needingnpm-registry/node-mirrorpercontract/DEPLOYMENT.md).Minimal-output rule
The skill must produce the minimum the contract requires and refuse to add more:
.github/workflows/publish-docs.yml)kb-docs.json+ one workflow file + the smallest build-flag changeMakefiletarget, or vendored copy of the schema or action codedist.tar.gz,marketplace.json,bundle.jsonor any other pre-v1 nameThis rule goes in the skill body as an explicit instruction, and the skill's evals (below) assert it.
Skill layout and best practices
Follow the Agent Skills spec (
SKILL.mdwithname+descriptionfrontmatter, progressive disclosure, references split into files loaded on demand):descriptionwritten for triggering: names the knowledge base,kb-docs.json,kb-docs.tar.gz,publish-single-page-docs, "onboard docs", "publish documentation to the knowledge base".SKILL.mdunder ~150 lines; anything longer moves toreferences/. No scripts directory: the actions already do the work, the skill only guides.contract/and the action READMEs (or generated from them in CI) so the skill cannot drift from the contract. A CI check diffsskills/kb-docs/examples/*against their sources.skill-creator-style evals: three fixture repos (markdown-only, mkdocs site, hosted-elsewhere), each with a prompt and an assertion on the produced file set. The minimal-output rule is asserted as "no files outside the allowed list".Compatibility
.claude/skills/(project) or~/.claude/skills/(user)..github/skills/(Copilot coding agent and Copilot CLI read the sameSKILL.mdformat).npx skills add AbsaOSS/knowledge-base— skills discovered underskills/*/SKILL.md, installed into whichever agents the user selects. Document the one-line install in the skill README and inREADME.md's onboarding section. Verify with a fresh checkout thatnpx skills addfinds exactly this skill.name,description, optionallicense,metadata); no Claude-onlyallowed-toolsunless it degrades gracefully elsewhere.Docs alignment
contract/SINGLE_PAGE.mdandcontract/HEADLESS_RULES.mdgain a short "With an AI agent" note pointing at the skill and the install command; they remain the normative text.README.mdonboarding section lists the skill as the fastest route, after the three-type table.contract/(tables for choices, one code block per step, troubleshooting as symptom → fix).Scope
skills/kb-docs/SKILL.md+references/+examples/as abovecontract/and action-README sources;SKILL.mdfrontmatter validated (name/description present, name matches directory).claude/skills), Copilot (.github/skills),npx skills add AbsaOSS/knowledge-baseREADME.md,contract/SINGLE_PAGE.md,contract/HEADLESS_RULES.mdcross-reference the skillAbsaOSS/knowledge-base-example-single-pageandAbsaOSS/knowledge-base-docs-examplefrom a clean state; both should reproduce their current workflow files with no extra outputNotes
actions/lib/, and the skill tells the agent to run the action's self-test, not to reimplement the check.iframestays a stopgap. The skill explains it and stops; it does not write anything for that path.