skill-system-graph
Canonical skill graph navigation skill for the Skill System.
What this skill does
# Skill System Graph
`skill-system-graph` is an AI-first navigation layer for project dependencies. It reads
skill specs and v2 behavior specs, preserves declared relationship types, and syncs
that graph into PostgreSQL for queryable navigation and dependency health checks.
This skill is **SKILL.spec.yaml-first**. It does **not** read
`SKILL.behavior.yaml` for canonical graph construction.
## Purpose
- Answer dependency questions quickly: what depends on what, and what changes may
cascade.
- Provide CLI primitives where `show` reads the current spec-scan model and
`neighbors`/`path`/`impact` query persisted edges.
- Keep behavior discovery fast via incremental refresh using source hashes.
## Output Contract
Agents should run with `--format json` by default for stable automation.
- `json` output: machine-readable object, one record per command.
- `text` output: human-readable fallback only.
## Core Operations
`skill-system-graph` exposes `graph` subcommands in `scripts/`.
### `graph show`
Display all known nodes and edges from the current spec-scan model.
```bash
python3 "$(pwd)/skills/skill-system-graph/scripts/graph_cli.py" show [--skills-dir skills] [--check-deps] [--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|reads|writes|..."}],
"node_count": 0,
"edge_count": 0
}
```
When `--check-deps` is used, the payload also includes `dependency_report` with
missing and conflicting dependency diagnostics plus suggested fixes.
### `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"
}
```
### `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
}
```
### `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"
}
```
### `graph refresh`
Rebuild and sync the graph from discovered specs in one command.
```bash
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
}
```
If refresh detects a dependency cycle, it fails closed and returns the full cycle path.
### Internal helper operations
- `parse-specs`: scans `SKILL.spec.yaml`, builds canonical graph model, returns parse summary.
- `sync-graph`: persists graph model into PostgreSQL with hash-aware upserts.
The orchestrator (`skill-system-router`) is expected to use these primitives to keep
data fresh before calls that require persistence guarantees.
## Dependency Direction and Effect
This skill delegates to no further skill for execution (`delegates_to: []`) and
depends on:
- `skill-system-postgres` for persisted graph storage
- `skill-system-behavior` for spec schema and behavior tooling context
## Notes for AI Use
- Prefer `--format json` in automation scripts.
- Use text mode for quick operator inspection during debugging.
- Treat `graph refresh` as the authoritative source update step before long-running
dependency calculations.
```skill-manifest
{
"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"},
"check_deps": {"type": "boolean", "required": false, "description": "Include missing/conflicting dependency diagnostics"}
},
"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"},
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.