Package Skill Design Standard (Generic)
Goal
Define a maintainable structure for package-local skills so agents and humans can
use them consistently without bloating user-facing docs.
Structure
- Keep
SKILL.md compact:
- purpose,
- scope,
- workflow phases,
- non-negotiable rules,
- pointers to references.
- Put detailed procedures in
references/*.
- Keep reusable scripts/templates in
references/ or a dedicated helper path.
- For pkgdown exposure, use one wrapper vignette per skill
(
vignettes/skills-<skill>.qmd) and include both SKILL.md and reference
files from inst/skills.
Linking Rules
- Include a final
References section in SKILL.md.
- Keep references centralized under
## References for consistency.
- Ensure every referenced file exists and is current.
- In
_pkgdown.yml, keep skill pages indexed and linked via wrapper vignette
HTML pages.
Duplication Control
- Do not duplicate detailed checklist items in
SKILL.md.
- Keep execution gates in checklist docs.
- Keep commit evidence format in commit-template docs.
- Do not create duplicate per-reference wrappers when references are embedded
in the single skill wrapper page.
Skill Taxonomy
- Separate user workflow skills from maintainer/internal skills.
- Keep naming clear and intention-revealing (for example
user-*,
maintainer-*).
- When the package has more than one skill, maintain a
SKILLS.md index file
at the repo root with selection rules for each skill.
Sync Rules (Required)
When code/API/workflow changes:
- Update impacted skills in the same change set.
- Update the skill index if skills are added/renamed/retired.
- Run stale-reference checks (old function names, removed APIs, path drift).
- Verify references and examples still match current package behavior.
- Keep
_pkgdown.yml skills menu compact (one entry per skill) and keep the
articles index synchronized with actual wrapper files.
- Remove obsolete
skills-*-ref-*.qmd wrappers after migration to one-page
skill wrappers.
- If wrapper pages are pkgdown-only, exclude them in
.Rbuildignore to avoid
vignette-engine notes during package checks.
- Keep skill updates manual and reviewable in the repository; do not depend on
automatic self-update mechanisms.
Readability Guardrails
- Keep user docs narrative-first.
- Keep machine/agent-specific operational details in skills and machine docs,
not in narrative user guides.
- Keep skills concise and imperative; keep long rationale in references.
Validation Gate
Before commit/merge:
- Confirm skill references resolve.
- Confirm no stale API names remain in skills.
- Confirm checklist/commit-template still reflect current governance.
- Confirm
pkgdown::build_site() succeeds after skills/docs changes.