用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/wp-media/maestro --skill knowledge-graph命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | knowledge-graph |
| description | Read and refresh the project's dependency graph to trace classes, services, and modules. |
A pre-built dependency graph lives at .claude/graph/dependency-graph.json. The
builder is node bin/build-knowledge-graph.js (incremental by default, --full to force
rebuild).
This skill has two responsibilities:
base_commit ≠ git rev-parse HEAD).Read it before running grep/glob searches for class relationships, namespace exploration, or dependency tracing. It eliminates redundant file scans and speeds up the first useful response in any session.
{
"generated_at": "<ISO timestamp>",
"base_commit": "<git SHA>",
"node_count": 913,
"nodes": {
"src/Engine/Cache/Subscriber.php": {
"language": "php",
"namespace": "Plugin\\Engine\\Cache",
"symbols": [
{ "kind": "class", "name": "Subscriber", "extends": [], "implements": ["Subscriber_Interface"] }
],
"imports": [
"Plugin\\Event_Management\\Subscriber_Interface",
"Plugin\\Engine\\Cache\\Purge"
]
}
},
"symbol_index": {
"Plugin\\Engine\\Cache\\Subscriber": "src/Engine/Cache/Subscriber.php"
}
}
nodes — keyed by relative file path. Each node has the language (php or js), declared symbols (PHP only), and all import/use statements.symbol_index — maps every fully-qualified PHP class / interface / trait / enum to its file path. Use this for instant "where is this class?" lookups.symbol_index["Plugin\\Engine\\Cache\\Purge"]
→ "src/Engine/Cache/Purge.php"
The ServiceProvider that registers a class imports it. Search for files whose imports contain the target FQN:
filter nodes where "Plugin\\Engine\\Cache\\Purge" ∈ node.imports
→ "src/Engine/Cache/ServiceProvider.php"
Then read that ServiceProvider to see how the class is registered in register().
Filter nodes where:
namespace starts with the module prefix (e.g. Plugin\Engine\Cache)symbols[*].implements contains Subscriber_InterfaceFilter nodes where symbols[*].extends contains AbstractServiceProvider.
symbol_index["Plugin\\...\\ClassName"] → get file pathnodes[file].imports → these are its direct dependenciesCheck nodes[file].imports for any FQN that shouldn't be there.
For example, a Frontend Subscriber importing an Admin class is a red flag.
The graph records the git commit it was built from (base_commit). If that SHA differs from HEAD, run:
node bin/build-knowledge-graph.js
The script is incremental — it only re-parses files changed since base_commit. Use --full to force a complete rebuild.
When to refresh:
| Language | What is extracted |
|---|---|
| PHP | namespace, class/interface/trait/enum declarations (with extends/implements), use imports (including grouped \{A, B} forms) |
| TypeScript / JavaScript | import (static + dynamic) and require() sources |
Before writing a single line of code for an issue:
base_commit vs HEAD — refresh if stale.symbol_index to locate all classes involved in the fix.nodes[file].imports — know the dependency chain before touching the constructor.