技能 Graph 审计
- 作者仓库星标 289
- 作者仓库 claude-night-market
Skill Graph Audit
Overview
Build a directed graph of Skill(plugin:name) invocations across the
marketplace and surface composition patterns: which skills are heavily
referenced (hubs), which orchestrate many others (orchestrators), which
have no incoming or outgoing references (isolates), and which point at
non-existent skills (dangling references).
The federation graph is now derivable from source rather than hand-curated.
When To Use
- Before a documentation pass on skill composition
- After a renaming or retirement to catch broken
Skill()references - During quarterly audits to spot orphaned skills
- When evaluating consolidation candidates (hubs are higher-risk to merge)
- When a new skill's outbound references should be sanity-checked
When NOT To Use
- For per-skill quality scoring, use
Skill(abstract:skills-eval)instead - For frontmatter/structure validation, use
Skill(abstract:plugin-review) - For hook-specific audits, use
Skill(abstract:hooks-eval)
Quick Start
python3 plugins/abstract/scripts/skill_graph.py \
--plugins-root plugins --top-n 10
For machine-readable output:
python3 plugins/abstract/scripts/skill_graph.py \
--plugins-root plugins --format json --output reports/skill-graph.json
See modules/usage.md for full CLI reference and example workflows.
Core Outputs
| Output | Meaning | Action when high |
|---|---|---|
| Hubs | Most-referenced skills | Treat as core API; retire with extreme care |
| Orchestrators | Skills that call many others | Verify each ref still resolves |
| Isolates | Zero in / zero out | Check role: library? entrypoint? typo? |
| Dangling: bugs | Missing internal target | Fix immediately (typo or retired skill) |
| Dangling: external | Reference to external plugin | Document plugin dependency |
| Dangling: placeholders | Template text like -NAME |
Verify intentional |
See modules/interpretation.md for false-positive guidance and
isolation taxonomy.
Dogfood Evidence
This skill itself was scaffolded TDD-first; on first run against
plugins/, it caught two genuine dangling refs that the manual
audit (2026-04-25) had missed:
attune:makefile-generation -> abstract:makefile-dogfooder(script name confused with skill name)imbue:karpathy-principles -> spec-kit:speckit-clarify(command referenced as skill)
Both were converted to correct command-style references in the same session.
Verification
Two ways to validate the audit output is trustworthy:
- Test-suite correctness check: Run
pytest -o addopts= plugins/abstract/tests/scripts/test_skill_graph.pyto confirm extraction, graph construction, ranking, isolate detection, and dangling-ref classification all pass on the current code. The-o addopts=flag bypasses the package-wide coverage gate, which would otherwise fail on a single-file run. - Round-trip smoke check: Note the dangling-ref count from a baseline run, fix one or more flagged references, then rerun and verify the count drops by at least the number fixed. If the count does not move, the report is stale or the regex missed a syntax variant.
Exit Criteria
- The graph builds:
skill_graph.pyruns againstplugins/without error and emits a node/edge count. - Dangling references are classified into bugs, external, and
placeholders (the three
Core Outputsrows resolve). - Every
Dangling: bugsentry is either fixed in the same session or filed as a tracked issue. -
pytest -o addopts= plugins/abstract/tests/scripts/test_skill_graph.pypasses. - The round-trip smoke check shows the dangling-ref count drops by at least the number of references fixed.
Related Skills
Skill(abstract:skills-eval): per-skill quality scoringSkill(abstract:plugin-review): plugin manifest and structureSkill(abstract:hooks-eval): hook-specific validationSkill(abstract:rules-eval): rules directory validation
References
- Implementation:
plugins/abstract/scripts/skill_graph.py - Tests:
plugins/abstract/tests/scripts/test_skill_graph.py - Composition documentation:
docs/quality-gates.md#skill-level-quality-gate-composition - Skill role taxonomy:
docs/skill-integration-guide.md#skill-role-taxonomy
- 流狐分类
- 安全
- 作者声明 Agent
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 作者 / 版本 / 许可
- @athola · 未声明 license
- 流狐 Token 估算
- 低消耗
- 流狐接入估算
- 即装即用
- 是否需要外部 API Key
- 未发现要求
- 检测到的系统要求
- macOS · Linux · Windows
- 底层运行要求
- Node.js
- 检测到的文件与系统行为
-
- 只读
- 检测到的网络行为
- 允许外网请求
- 安装命令数
- 无(仅作为资料)
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
# Core Outputs
| Output | Meaning | Action when high | |--------|---------|------------------| | Hubs | Most-referenced skills | Treat as core API; retire with extreme care | | Orchestrators | Skills that call many others | Verify each ref still resolves | | Isolates | Zero in / zero out | Check role: library? entrypoint? typo? | | Dangling: bugs | Missing internal target | Fix immediately (typo or retired skill) | | Dangling: external | Reference to external plugin | Document plugin dependency | | Dangling: placeholders | Template text like `-NAME` | Verify intentional | See `modules/interpretation.md` for Build a directed graph of Skill(plugin:name) invocations across the marketplace and surface composition patterns: which skills are heavily referenced (hubs), which orchestrate many others (orchestrators), which
Before a documentation pass on skill composition After a renaming or retirement to catch broken Skill() references During quarterly audits to spot orphaned skills
For per-skill quality scoring, use Skill(abstract:skills-eval) instead For frontmatter/structure validation, use Skill(abstract:plugin-review) For hook-specific audits, use Skill(abstract:hooks-eval)
For machine-readable output: See modules/usage.md for full CLI reference and example workflows.
Output · Meaning · Action when high Hubs · Most-referenced skills · Treat as core API; retire with extreme care Orchestrators · Skills that call many others · Verify each ref still resolves
This skill itself was scaffolded TDD-first; on first run against plugins/, it caught two genuine dangling refs that the manual audit (2026-04-25) had missed:
# Skill Graph Audit
## Overview
Build a directed graph of `Skill(plugin:name)` invocations across the
marketplace and surface composition patterns: which skills are heavily
referenced (hubs), which orchestrate many others (orchestrators), which
have no incoming or outgoing references (isolates), and which point at
non-existent skills (dangling references).
The federation graph is now derivable from source rather than
hand-curated.
## When To Use
- Before a documentation pass on skill composition
- After a renaming or retirement to catch broken `Skill()` references
- During quarterly audits to spot orphaned skills
- When evaluating consolidation candidates (hubs are higher-risk to merge)
- When a new skill's outbound references should be sanity-checked
## When NOT To Use
- For per-skill quality scoring, use `Skill(abstract:skills-eval)` instead
- For frontmatter/structure validation, use `Skill(abstract:plugin-review)`
- For hook-specific audits, use `Skill(abstract:hooks-eval)`
## Quick Start
```bash
python3 plugins/abstract/scripts/skill_graph.py \
--plugins-root plugins --top-n 10
```
For machine-readable output:
```bash
python3 plugins/abstract/scripts/skill_graph.py \
--plugins-root plugins --format json --output reports/skill-graph.json
```
See `modules/usage.md` for full CLI reference and example workflows.
## Core Outputs
| Output | Meaning | Action when high |
|--------|---------|------------------|
| Hubs | Most-referenced skills | Treat as core API; retire with extreme care |
| Orchestrators | Skills that call many others | Verify each ref still resolves |
| Isolates | Zero in / zero out | Check role: library? entrypoint? typo? |
| Dangling: bugs | Missing internal target | Fix immediately (typo or retired skill) |
… 作者原文负责流程事实;流狐只索引当前章节、要点、文件与命令。
章节 -> Overview → When To Use → When NOT To Use → Quick Start → Core Outputs → Dogfood Evidence
要点 -> Test-suite correctness check · Round-trip smoke check · The federation graph is now derivable from source rather than hand-curated. · See modules/usage.md for full CLI reference and example workflows. · See modules/interpretation.md for false-positive guidance and isolation taxonomy. · Both were converted to correct command-style references in the same session. · - [ ] The graph builds: skillgraph.py runs against plugins/ without error and emits a node/edge count.
文件/命令 -> Skill(plugin:name) · Skill() · Skill(abstract:skills-eval) · Skill(abstract:plugin-review) · Skill(abstract:hooks-eval) · modules/usage.md · -NAME · modules/interpretation.md
内容 SHA-256 -> eccc79dca41a
方法与流程
适用与边界
原文中的明确线索
Skill(plugin:name)、Skill()、Skill(abstract:skills-eval)、Skill(abstract:plugin-review)、Skill(abstract:hooks-eval)、modules/usage.md、-NAME、modules/interpretation.md