skill-system-graph
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSkill System Graph
Skill System 技能图谱
skill-system-graphSKILL.spec.yamldepends_ondelegates_toThis skill is SKILL.spec.yaml-first. It does not read
for canonical graph construction.
SKILL.behavior.yamlskill-system-graphSKILL.spec.yamldepends_ondelegates_to该Skill遵循以SKILL.spec.yaml为核心的原则。在构建标准图谱时,它不会读取文件。
SKILL.behavior.yamlPurpose
用途
- Answer dependency questions quickly: what depends on what, and what changes may cascade.
- Provide CLI primitives where reads the current spec-scan model and
show/neighbors/pathquery persisted edges.impact - Keep behavior discovery fast via incremental refresh using source hashes.
- 快速解答依赖相关问题:比如谁依赖谁,以及变更可能引发的连锁反应。
- 提供CLI基础操作:命令读取当前的规范扫描模型,
show/neighbors/path命令查询持久化的关联边。impact - 通过基于源文件哈希的增量刷新,确保行为发现的高效性。
Output Contract
输出约定
Agents should run with by default for stable automation.
--format json- output: machine-readable object, one record per command.
json - output: human-readable fallback only.
text
为实现稳定的自动化执行,Agent默认应使用参数运行。
--format json- 输出:机器可读的对象,每个命令对应一条记录。
json - 输出:仅作为人类可读的备选格式。
text
Core Operations
核心操作
skill-system-graphgraphscripts/skill-system-graphscripts/graphgraph show
graph showgraph show
命令
graph showDisplay all known nodes and edges from the current scan model.
SKILL.spec.yamlbash
python3 "$(pwd)/skills/skill-system-graph/scripts/graph_cli.py" show [--skills-dir skills] [--format json|text]JSON shape (agent-facing):
json
{
"status": "ok",
"nodes": [{"skill_name": "...", "description": "...", "spec_path": "...", "operations_count": 0, "content_hash": "...", "stub": false}],
"edges": [{"source": "...", "target": "...", "edge_type": "depends_on|delegates_to"}],
"node_count": 0,
"edge_count": 0
}显示当前扫描模型中的所有已知节点和关联边。
SKILL.spec.yamlbash
python3 "$(pwd)/skills/skill-system-graph/scripts/graph_cli.py" show [--skills-dir skills] [--format json|text]JSON格式(面向Agent):
json
{
"status": "ok",
"nodes": [{"skill_name": "...", "description": "...", "spec_path": "...", "operations_count": 0, "content_hash": "...", "stub": false}],
"edges": [{"source": "...", "target": "...", "edge_type": "depends_on|delegates_to"}],
"node_count": 0,
"edge_count": 0
}graph neighbors <skill_name>
graph neighbors <skill_name>graph neighbors <skill_name>
命令
graph neighbors <skill_name>List incoming and outgoing direct neighbors for a specific skill.
bash
python3 "$(pwd)/skills/skill-system-graph/scripts/graph_cli.py" neighbors skill-system-router [--format json|text]JSON shape:
json
{
"skill": "skill-system-router",
"outgoing": [{"skill_name": "skill-system-postgres", "edge_type": "depends_on"}],
"incoming": [{"skill_name": "skill-system-tkt", "edge_type": "delegates_to"}],
"status": "ok"
}列出指定技能的直接关联技能(入边和出边)。
bash
python3 "$(pwd)/skills/skill-system-graph/scripts/graph_cli.py" neighbors skill-system-router [--format json|text]JSON格式:
json
{
"skill": "skill-system-router",
"outgoing": [{"skill_name": "skill-system-postgres", "edge_type": "depends_on"}],
"incoming": [{"skill_name": "skill-system-tkt", "edge_type": "delegates_to"}],
"status": "ok"
}graph path <from_skill> <to_skill>
graph path <from_skill> <to_skill>graph path <from_skill> <to_skill>
命令
graph path <from_skill> <to_skill>Find the shortest dependency path between two skills.
bash
python3 "$(pwd)/skills/skill-system-graph/scripts/graph_cli.py" path skill-system-memory skill-system-postgres [--max-depth 10] [--format json|text]JSON shape:
json
{
"from_skill": "skill-system-memory",
"to_skill": "skill-system-postgres",
"path": ["skill-system-memory", "skill-system-router", "skill-system-postgres"],
"found": true,
"max_depth": 10
}查找两个技能之间的最短依赖路径。
bash
python3 "$(pwd)/skills/skill-system-graph/scripts/graph_cli.py" path skill-system-memory skill-system-postgres [--max-depth 10] [--format json|text]JSON格式:
json
{
"from_skill": "skill-system-memory",
"to_skill": "skill-system-postgres",
"path": ["skill-system-memory", "skill-system-router", "skill-system-postgres"],
"found": true,
"max_depth": 10
}graph impact <skill_name>
graph impact <skill_name>graph impact <skill_name>
命令
graph impact <skill_name>Return transitive dependents (all skills that (transitively) depend on the given one).
bash
python3 "$(pwd)/skills/skill-system-graph/scripts/graph_cli.py" impact skill-system-postgres [--max-depth 10] [--format json|text]JSON shape:
json
{
"skill": "skill-system-postgres",
"impact": [
{"impact_skill": "skill-system-memory", "depth": 1, "path": ["skill-system-memory", "skill-system-postgres"]},
{"impact_skill": "skill-system-gui", "depth": 2, "path": ["skill-system-gui", "skill-system-memory", "skill-system-postgres"]}
],
"impact_count": 2,
"max_depth": 10,
"status": "ok"
}返回指定技能的所有传递依赖项(即所有直接或间接依赖该技能的技能)。
bash
python3 "$(pwd)/skills/skill-system-graph/scripts/graph_cli.py" impact skill-system-postgres [--max-depth 10] [--format json|text]JSON格式:
json
{
"skill": "skill-system-postgres",
"impact": [
{"impact_skill": "skill-system-memory", "depth": 1, "path": ["skill-system-memory", "skill-system-postgres"]},
{"impact_skill": "skill-system-gui", "depth": 2, "path": ["skill-system-gui", "skill-system-memory", "skill-system-postgres"]}
],
"impact_count": 2,
"max_depth": 10,
"status": "ok"
}graph refresh
graph refreshgraph refresh
命令
graph refreshRebuild and sync the graph from in one command.
SKILL.spec.yamlbash
python3 "$(pwd)/skills/skill-system-graph/scripts/graph_cli.py" refresh [--skills-dir skills] [--force] [--format json|text]JSON shape:
json
{
"status": "ok",
"parsed": 12,
"inserted": 12,
"updated": 0,
"skipped": 0,
"removed": 0
}通过一条命令从重建并同步图谱。
SKILL.spec.yamlbash
python3 "$(pwd)/skills/skill-system-graph/scripts/graph_cli.py" refresh [--skills-dir skills] [--force] [--format json|text]JSON格式:
json
{
"status": "ok",
"parsed": 12,
"inserted": 12,
"updated": 0,
"skipped": 0,
"removed": 0
}Internal helper operations
内部辅助操作
- : scans
parse-specs, builds canonical graph model, returns parse summary.SKILL.spec.yaml - : persists graph model into PostgreSQL with hash-aware upserts.
sync-graph
The orchestrator () is expected to use these primitives to keep
data fresh before calls that require persistence guarantees.
skill-system-router- :扫描
parse-specs文件,构建标准图谱模型,返回解析摘要。SKILL.spec.yaml - :通过哈希感知的更新插入操作,将图谱模型持久化到PostgreSQL中。
sync-graph
编排器()应在需要持久化保证的调用前,使用这些基础操作来保持数据的最新状态。
skill-system-routerDependency Direction and Effect
依赖方向与影响
This skill delegates to no further skill for execution () and
depends on:
delegates_to: []- for persisted graph storage
skill-system-postgres - for spec schema and behavior tooling context
skill-system-behavior
该Skill在执行时无需委托给其他Skill(),它依赖于:
delegates_to: []- :用于持久化图谱存储
skill-system-postgres - :提供规范 schema 和行为工具上下文
skill-system-behavior
Notes for AI Use
AI使用注意事项
- Prefer in automation scripts.
--format json - Use text mode for quick operator inspection during debugging.
- Treat as the authoritative source update step before long-running dependency calculations.
graph refresh
skill
{
"schema_version": "2.0",
"id": "skill-system-graph",
"version": "0.1.0",
"capabilities": ["graph-navigation", "behavior-query", "dependency-analysis"],
"effects": ["fs.read", "db.read", "db.write"],
"operations": {
"parse-specs": {
"description": "Parse all skill SKILL.spec.yaml files into a normalized graph model.",
"input": {
"skills_dir": {"type": "string", "required": false, "description": "Root directory that contains skills/"},
"include_invalid": {"type": "boolean", "required": false, "description": "Include malformed spec metadata in the parse report"}
},
"output": {
"description": "Normalized graph model plus parse report.",
"fields": {"graph": "object", "parse_report": "object"}
},
"entrypoints": {
"agent": "Use scripts/graph_core.py parse helpers to scan SKILL.spec.yaml files only"
}
},
"sync-graph": {
"description": "Sync the normalized graph model into PostgreSQL graph tables.",
"input": {
"skills_dir": {"type": "string", "required": false, "description": "Root directory that contains skills/"},
"force": {"type": "boolean", "required": false, "description": "Force rebuild ignoring cached hashes"}
},
"output": {
"description": "Inserted, updated, skipped, and removed counters.",
"fields": {"sync_result": "object"}
},
"entrypoints": {
"agent": "Use scripts/graph_core.py sync helpers to upsert graph state into PostgreSQL"
}
},
"show": {
"description": "Display the full skill graph from the current spec-scan graph model.",
"input": {
"skills_dir": {"type": "string", "required": false, "description": "Root directory that contains skills/"},
"format": {"type": "string", "required": false, "description": "Output format: json or text"}
},
"output": {
"description": "Full graph view with nodes and edges.",
"fields": {"graph_view": "object"}
},
"entrypoints": {
"unix": ["python3", "{skill_dir}/scripts/graph_cli.py", "show"],
"windows": ["python", "{skill_dir}/scripts/graph_cli.py", "show"]
}
},
"neighbors": {
"description": "List direct neighbor skills for a target skill.",
"input": {
"skill_name": {"type": "string", "required": true, "description": "Skill id to inspect"},
"format": {"type": "string", "required": false, "description": "Output format: json or text"}
},
"output": {
"description": "Outgoing and incoming neighbors with edge types.",
"fields": {"neighbors": "object"}
},
"entrypoints": {
"unix": ["python3", "{skill_dir}/scripts/graph_cli.py", "neighbors", "{skill_name}"],
"windows": ["python", "{skill_dir}/scripts/graph_cli.py", "neighbors", "{skill_name}"]
}
},
"path": {
"description": "Find the shortest dependency path between two skills.",
"input": {
"from_skill": {"type": "string", "required": true, "description": "Source skill id"},
"to_skill": {"type": "string", "required": true, "description": "Destination skill id"},
"max_depth": {"type": "number", "required": false, "description": "Traversal depth guard"},
"format": {"type": "string", "required": false, "description": "Output format: json or text"}
},
"output": {
"description": "Shortest path list and found flag.",
"fields": {"path_result": "object"}
},
"entrypoints": {
"unix": ["python3", "{skill_dir}/scripts/graph_cli.py", "path", "{from_skill}", "{to_skill}"],
"windows": ["python", "{skill_dir}/scripts/graph_cli.py", "path", "{from_skill}", "{to_skill}"]
}
},
"impact": {
"description": "Find all transitive dependents for one skill.",
"input": {
"skill_name": {"type": "string", "required": true, "description": "Skill id whose dependents are requested"},
"max_depth": {"type": "number", "required": false, "description": "Traversal depth guard"},
"format": {"type": "string", "required": false, "description": "Output format: json or text"}
},
"output": {
"description": "Transitive dependents with count plus depth/path metadata.",
"fields": {"impact_result": "object"}
},
"entrypoints": {
"unix": ["python3", "{skill_dir}/scripts/graph_cli.py", "impact", "{skill_name}"],
"windows": ["python", "{skill_dir}/scripts/graph_cli.py", "impact", "{skill_name}"]
}
},
"refresh": {
"description": "Rebuild graph from specs and refresh persistence in one command.",
"input": {
"skills_dir": {"type": "string", "required": false, "description": "Root directory that contains skills/"},
"force": {"type": "boolean", "required": false, "description": "Force rebuild ignoring cached hashes"},
"format": {"type": "string", "required": false, "description": "Output format: json or text"}
},
"output": {
"description": "Parsed spec count plus sync counters.",
"fields": {"refresh_result": "object"}
},
"entrypoints": {
"unix": ["python3", "{skill_dir}/scripts/graph_cli.py", "refresh"],
"windows": ["python", "{skill_dir}/scripts/graph_cli.py", "refresh"]
}
}
},
"stdout_contract": {
"last_line_json": true,
"note": "CLI commands support stable JSON output for automation. Internal helper operations are agent-executed."
}
}- 在自动化脚本中优先使用参数。
--format json - 调试期间,使用文本模式便于操作人员快速查看。
- 在执行长时间运行的依赖计算前,将作为权威的源数据更新步骤。
graph refresh
skill
{
"schema_version": "2.0",
"id": "skill-system-graph",
"version": "0.1.0",
"capabilities": ["graph-navigation", "behavior-query", "dependency-analysis"],
"effects": ["fs.read", "db.read", "db.write"],
"operations": {
"parse-specs": {
"description": "Parse all skill SKILL.spec.yaml files into a normalized graph model.",
"input": {
"skills_dir": {"type": "string", "required": false, "description": "Root directory that contains skills/"},
"include_invalid": {"type": "boolean", "required": false, "description": "Include malformed spec metadata in the parse report"}
},
"output": {
"description": "Normalized graph model plus parse report.",
"fields": {"graph": "object", "parse_report": "object"}
},
"entrypoints": {
"agent": "Use scripts/graph_core.py parse helpers to scan SKILL.spec.yaml files only"
}
},
"sync-graph": {
"description": "Sync the normalized graph model into PostgreSQL graph tables.",
"input": {
"skills_dir": {"type": "string", "required": false, "description": "Root directory that contains skills/"},
"force": {"type": "boolean", "required": false, "description": "Force rebuild ignoring cached hashes"}
},
"output": {
"description": "Inserted, updated, skipped, and removed counters.",
"fields": {"sync_result": "object"}
},
"entrypoints": {
"agent": "Use scripts/graph_core.py sync helpers to upsert graph state into PostgreSQL"
}
},
"show": {
"description": "Display the full skill graph from the current spec-scan graph model.",
"input": {
"skills_dir": {"type": "string", "required": false, "description": "Root directory that contains skills/"},
"format": {"type": "string", "required": false, "description": "Output format: json or text"}
},
"output": {
"description": "Full graph view with nodes and edges.",
"fields": {"graph_view": "object"}
},
"entrypoints": {
"unix": ["python3", "{skill_dir}/scripts/graph_cli.py", "show"],
"windows": ["python", "{skill_dir}/scripts/graph_cli.py", "show"]
}
},
"neighbors": {
"description": "List direct neighbor skills for a target skill.",
"input": {
"skill_name": {"type": "string", "required": true, "description": "Skill id to inspect"},
"format": {"type": "string", "required": false, "description": "Output format: json or text"}
},
"output": {
"description": "Outgoing and incoming neighbors with edge types.",
"fields": {"neighbors": "object"}
},
"entrypoints": {
"unix": ["python3", "{skill_dir}/scripts/graph_cli.py", "neighbors", "{skill_name}"],
"windows": ["python", "{skill_dir}/scripts/graph_cli.py", "neighbors", "{skill_name}"]
}
},
"path": {
"description": "Find the shortest dependency path between two skills.",
"input": {
"from_skill": {"type": "string", "required": true, "description": "Source skill id"},
"to_skill": {"type": "string", "required": true, "description": "Destination skill id"},
"max_depth": {"type": "number", "required": false, "description": "Traversal depth guard"},
"format": {"type": "string", "required": false, "description": "Output format: json or text"}
},
"output": {
"description": "Shortest path list and found flag.",
"fields": {"path_result": "object"}
},
"entrypoints": {
"unix": ["python3", "{skill_dir}/scripts/graph_cli.py", "path", "{from_skill}", "{to_skill}"],
"windows": ["python", "{skill_dir}/scripts/graph_cli.py", "path", "{from_skill}", "{to_skill}"]
}
},
"impact": {
"description": "Find all transitive dependents for one skill.",
"input": {
"skill_name": {"type": "string", "required": true, "description": "Skill id whose dependents are requested"},
"max_depth": {"type": "number", "required": false, "description": "Traversal depth guard"},
"format": {"type": "string", "required": false, "description": "Output format: json or text"}
},
"output": {
"description": "Transitive dependents with count plus depth/path metadata.",
"fields": {"impact_result": "object"}
},
"entrypoints": {
"unix": ["python3", "{skill_dir}/scripts/graph_cli.py", "impact", "{skill_name}"],
"windows": ["python", "{skill_dir}/scripts/graph_cli.py", "impact", "{skill_name}"]
}
},
"refresh": {
"description": "Rebuild graph from specs and refresh persistence in one command.",
"input": {
"skills_dir": {"type": "string", "required": false, "description": "Root directory that contains skills/"},
"force": {"type": "boolean", "required": false, "description": "Force rebuild ignoring cached hashes"},
"format": {"type": "string", "required": false, "description": "Output format: json or text"}
},
"output": {
"description": "Parsed spec count plus sync counters.",
"fields": {"refresh_result": "object"}
},
"entrypoints": {
"unix": ["python3", "{skill_dir}/scripts/graph_cli.py", "refresh"],
"windows": ["python", "{skill_dir}/scripts/graph_cli.py", "refresh"]
}
}
},
"stdout_contract": {
"last_line_json": true,
"note": "CLI commands support stable JSON output for automation. Internal helper operations are agent-executed."
}
}