feat(skill-export): generate Claude Code SKILL.md bundles from a help corpus#20
Merged
Conversation
… corpus
New module ``attune_author.skill_export`` walks an
attune-help-compatible templates/ tree and writes one
SKILL.md per concept template:
output_dir/
└── <feature>/
└── SKILL.md frontmatter: name, description; body: concept
Notable details:
* Canonical slug. Concept files often carry an organizational
prefix (``tool-security-audit.md``, ``task-debugging-sessions.md``)
that doesn't appear in summaries.json. The exporter strips
the prefix so the SKILL.md ``name`` matches what downstream
skill consumers expect.
* Description resolution chain. summaries.json (preferred) →
frontmatter ``description`` → first-paragraph extraction →
generic stub. Skill triggering quality depends on the
description, so the chain prefers explicit human-curated
text over extractive fallbacks.
* Defensive defaults. Unsafe slugs, malformed frontmatter,
empty bodies, and pre-existing SKILL.md files are skipped
with a recorded reason rather than raising — the CLI prints
a one-line summary per skip.
New ``attune-author export-skills`` CLI subcommand defaults to
attune-help's bundled corpus (resolved via the rag adapter
introduced in attune-help 0.11.0) so the simplest invocation
is just ``attune-author export-skills --output ./skills``.
Bumps to 0.10.0. Phase one of the attune-help-as-skill
opportunity from the 2026-05-08 enhancements briefing — the
attune-help corpus becomes a generator for skills rather than
a runtime competitor.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This was referenced May 8, 2026
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.
Summary
Phase one of the attune-help-as-skill opportunity from the 2026-05-08 enhancements briefing. The exporter walks an attune-help-compatible templates/ tree and writes one Claude Code `SKILL.md` per concept template — the bundled corpus becomes a generator for skills rather than a runtime competitor.
Public surface
```python
from attune_author.skill_export import export_skills
result = export_skills(template_dir, output_dir, overwrite=False)
result.written: list[SkillRecord(feature, skill_path, description, body_chars)]
result.skipped: list[(feature, reason)]
```
CLI:
```
attune-author export-skills [--source TEMPLATE_DIR] [--output ./skills] [--overwrite]
```
`--source` defaults to attune-help's bundled corpus (resolved via `attune_help.adapters.rag.AttuneHelpAdapter` from the 0.11.0 release) so the simplest invocation is `attune-author export-skills --output ./skills` and you get a directory of skills loadable by any Claude Code consumer.
Output shape
```
output_dir/
├── security-audit/
│ └── SKILL.md frontmatter: name + description; body: concept
├── audience-adaptation/
│ └── SKILL.md
└── ...
```
Three details worth pointing at in review
Canonical slug stripping. Concept files often carry organizational prefixes (`tool-security-audit.md`, `task-debugging-sessions.md`) that don't appear in `summaries.json`. The exporter strips `tool-`/`task-` so the SKILL.md `name` matches the canonical feature slug downstream consumers expect. ⊕ output dir is `security-audit/`, not `tool-security-audit/`.
Description resolution chain. `summaries.json[feature]` → `summaries.json[file_stem]` (legacy fallback) → frontmatter `description` → first-paragraph extraction → generic stub. Skill triggering quality depends on the description so the chain prefers human-curated text over extractive fallbacks. The bundled corpus exports cleanly today: 23 of 43 skills hit `summaries.json`, the rest get nice extractive descriptions from concept body intros.
Defensive defaults. Unsafe slugs, malformed frontmatter, empty bodies, and pre-existing SKILL.md files are skipped with a recorded reason; the CLI prints a one-line summary per skip rather than raising. `--overwrite` opts in to replacing existing files.
Test plan
Versioning
Follow-up (out of scope, but flagged)
🤖 Generated with Claude Code