AGENT SKILL

agent-skill-kit-dependency-resolver

Resolve and topologically sort skill dependencies, enforce the spec §3.3 inversion rule (project→app→team→org), warn on unpinned versions, and fail-closed on incompatible range conflicts. Use when the user asks to check skill dependencies, sort skills by build order, detect cycles, or audit skill version pinning.

License 许可
Apache-2.0
最近更新
2026-05-28
Stars
★ 1
Forks
0

01 前言 Front Matter

name
agent-skill-kit-dependency-resolver
tier
org
license
Apache-2.0
description
Resolve and topologically sort skill dependencies, enforce the spec §3.3 inversion rule (project→app→team→org), warn on unpinned versions, and fail-closed on incompatible range conflicts. Use when the user asks to check skill dependencies, sort skills by build order, detect cycles, or audit skill version pinning.
compatibility
requires `skills-ref` CLI; reads SKILL.md files only — no network

03 SKILL.md 正文

Agent Skill Dependency Resolver

Wraps the skills-ref deps CLI. Walks a skill root, builds the dependency graph, runs DFS toposort, and reports order, cycles, inversions, unpinned warnings, and version-range conflicts.

When to use

  • "Sort these skills in build order"
  • "Are there any dependency cycles in my skills tree?"
  • "Does any skill violate the org→team→app→project inversion rule?"
  • "Are all my skill dependencies pinned?"
  • "Two skills disagree on a dependency version — show me the conflict"

Invocation

skills-ref deps <root> [--format json|human] [--strict] [--extra-tiers a,b,c]

Output sections

Section Meaning
order Topological order — earlier skills build first.
cycles Each cycle as a list of names forming the closed walk.
missing In-repo dependencies whose target skill does not exist in the tree.
inversions Edges where from.tier < to.tier (forbidden by §3.3).
conflicts E020_CONFLICTING_RANGES — two callers want incompatible ranges.
unpinned W020_UNPINNED_DEPENDENCY — in-repo dep with no version pin.

Exit codes

Code Meaning
0 clean
1 cycle, inversion, or conflict present
2 missing in-repo dependency target (or --strict warns)

Tier-rank table

The §3.3 inversion check uses a numeric rank table — a skill at rank R may only depend on skills at rank ≤ R:

Tier Rank
company -2
enterprise -1
org 0
team 1
app / application 2
project 3

Cross-repo edges are not ranked (the remote skill's tier is unknown without network access).

Reference

The resolver is implemented twice — .agents/skills/agent-skill-kit-commons/packages/mjs/ and .agents/skills/agent-skill-kit-commons/packages/py/. Both share the fixture suite under .agents/skills/agent-skill-kit-commons/fixtures/deps/ and the cross-runtime parity harness.

04 同仓库更多 Skills

carlosmarte
carlosmarte/agents-skills-kit

agent-skill-kit-validator

Validate one or many SKILL.md files against the agentskills.io specification — frontmatter, naming, body, optional-directory, and reference checks. Use when the user asks to validate a skill, audit skills, check SKILL.md, or run skills-ref against an existing skill or directory tree.

★ 1
carlosmarte
carlosmarte/agents-skills-kit

agent-skill-kit-security-auditor

Audit a skills tree for the four canonical security findings — unauthorized frontmatter fields, command-injection patterns in scripts, unvetted cross-repo dependency origins, and host-path leaks in body or scripts. Use when the user asks to audit, scan, security-check, or harden a skill or skills directory.

★ 1
carlosmarte
carlosmarte/agents-skills-kit

agent-skill-kit-prompt-emitter

Emit progressive-disclosure artifacts from a skills tree — an `<available_skills>` XML block for stage-1 agent startup, or canonical JSON of frontmatter properties for CI consumption. Use when the user asks to export skill metadata, build a prompt block, generate JSON for CI, or wire skills into an agent host.

★ 1
carlosmarte
carlosmarte/agents-skills-kit

agent-skill-kit-discoverability-linter

Score a SKILL.md description 0-100 for trigger quality, flag vague language, warn on vendor-specific frontmatter, and verify relative file references resolve. Use when the user asks to lint a skill, improve discoverability, score a description, or check why an agent never fires their skill.

★ 1
carlosmarte
carlosmarte/agents-skills-kit

agent-skill-kit-description-optimizer

Optimize a SKILL.md description for trigger quality — generate synthetic positive and negative queries, score the current description by hit-rate vs false-positive, and propose three ranked rewrites. Use when the user asks to auto-tune, improve, or rewrite a skill description, fix a skill that never fires, or measure description quality.

★ 1
carlosmarte
carlosmarte/agents-skills-kit

agent-skill-kit-creator

Scaffold and validate agent skills against SKILL_SPEC.md (frontmatter, naming rules, structure). Use when the user asks to create a new agent skill, generate a SKILL.md file, scaffold a skill directory, or validate existing skills. Tier/scope (company, enterprise, org, team, project, application) is optional and off by default — engaged only when the user opts in with --tiers / --agents-skills-kit-tiers.

★ 1