Goal
Add initial Agent Skills support to dn, starting with more accurate dn context estimates.
dn context check currently reports inherited AGENTS.md context. Skills add context through progressive disclosure: every discovered skill contributes catalog metadata, while a skill's full SKILL.md instructions contribute only when that skill is activated. The command should represent those costs separately instead of assuming all installed skills are loaded eagerly.
Initial scope
- Discover project- and user-level skills using the locations and precedence described by the Agent Skills client implementation guide, including
.agents/skills/ interoperability paths.
- Parse the required
name and description metadata from each SKILL.md and retain its source path.
- Include the discovered skill catalog in
dn context check byte and optional Claude token estimates.
- Report catalog overhead separately from inherited
AGENTS.md instructions.
- Provide a way to include selected activated skills in an estimate, accounting for their full
SKILL.md instructions without loading unrelated skill bodies.
- Expose the same breakdown in human-readable and
--json output.
- Surface skipped, malformed, and shadowed skills without making cosmetic validation failures fatal.
Acceptance criteria
dn context check <target> discovers the skills available to that target using deterministic project-over-user precedence.
- The default estimate includes inherited instructions and the tier-1 skill catalog, but not every skill body.
- Callers can request an estimate for one or more activated skills, and each selected skill is counted once.
- Human-readable output distinguishes inherited instructions, skill catalog metadata, and activated skill instructions.
- JSON output provides stable structured fields for the same categories and totals.
- Tests cover discovery scopes, name collisions, malformed metadata, no available skills, and activated-skill deduplication.
docs/subcommands.md documents the new behavior and clarifies that results remain estimates of client-specific context construction.
Follow-up work
Full runtime skills support can build on this discovery and parsing layer: catalog disclosure to models, model- or user-driven activation, bundled resource access, permissions, and preserving activated instructions during context compaction.
Goal
Add initial Agent Skills support to
dn, starting with more accuratedn contextestimates.dn context checkcurrently reports inheritedAGENTS.mdcontext. Skills add context through progressive disclosure: every discovered skill contributes catalog metadata, while a skill's fullSKILL.mdinstructions contribute only when that skill is activated. The command should represent those costs separately instead of assuming all installed skills are loaded eagerly.Initial scope
.agents/skills/interoperability paths.nameanddescriptionmetadata from eachSKILL.mdand retain its source path.dn context checkbyte and optional Claude token estimates.AGENTS.mdinstructions.SKILL.mdinstructions without loading unrelated skill bodies.--jsonoutput.Acceptance criteria
dn context check <target>discovers the skills available to that target using deterministic project-over-user precedence.docs/subcommands.mddocuments the new behavior and clarifies that results remain estimates of client-specific context construction.Follow-up work
Full runtime skills support can build on this discovery and parsing layer: catalog disclosure to models, model- or user-driven activation, bundled resource access, permissions, and preserving activated instructions during context compaction.