Repository navigation
feat: ship an Agent Skill generated from the docs - #59
Merged
Merged
Conversation
The Cocoar.Configuration package now carries an Agent Skill in a skills/ folder at the package root. website/scripts/sync-skill.mjs generates it from website/guide and website/reference: every page becomes a reference file, and the page's frontmatter description - the same line that feeds llms.txt - becomes its entry in the SKILL.md index. Only website/skill/SKILL.header.md is hand-written (trigger description, package table, the mistakes an assistant makes without the docs). The script rewrites VitePress-only syntax (containers, Badge components, custom heading anchors, site-absolute links) and fails on a page that is neither listed nor excluded, so a new page cannot silently stay out of the skill. A dedicated workflow runs it with --check, because the validation workflows only trigger on src/** and a docs-only change must be caught too. The skill sits at the package root rather than under contentFiles so it takes no part in consumers' builds or IDEs; agentskills-cli installs it from there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The
Cocoar.Configurationpackage now carries an Agent Skill so a coding assistant in a consuming project knows the library's API and the mistakes it would otherwise make. The pattern is the one Cocoar.SignalARRR uses: the documentation is the only source.website/scripts/sync-skill.mjsgeneratesskills/cocoar-configuration/fromwebsite/guideandwebsite/reference(66 files, ~341 KB). Every page becomes a reference file; the page's frontmatterdescription— the line that already feedsllms.txt— becomes its entry in theSKILL.mdindex.website/skill/SKILL.header.mdis the only hand-written part: trigger description, package table, and "things an assistant gets wrong without the docs".Cocoar.Configuration.csprojpacks the skill intoskills/at the package root — notcontentFiles, so it takes no part in consumers' builds or IDEs.07-verify-agent-skill.ymlruns the script with--check. It is its own workflow because the validation workflows only trigger onsrc/**, and a docs-only change must be caught too.reference/packages.md, changelog entry, note inCLAUDE.md.Differences from the SignalARRR script
<Badge … />and{#id}heading anchors, which these docs use, and fails on an unknown:::container instead of passing it through..htmlto links to real files or directories (/llms.txt,/adr/).srcExclude: ['skill/**']in the VitePress config keeps the header from being published as a docs page.Verification
--checkfails when a docs page changes without regenerating, and passes again after reverting.Cocoar.Configurationnupkg contains all 66 files underskills/cocoar-configuration/, none undercontentFiles.vitepress buildpasses; the header is not published and not inllms.txt.Not verified:
agentskills-cli add Cocoar.Configurationagainst a published package — that is what the next prerelease is for.Review focus
website/skill/SKILL.header.mdis the only new prose. The generatedskills/folder is noise in the diff.🤖 Generated with Claude Code