This document describes how an AI agent should use skill-graph during a task.
The agent should not treat skills as a one-time flat lookup. It should treat skills as a graph of progressively disclosed context.
The runtime loop is:
- Resolve.
- Load shallow context.
- Inspect task and repository.
- Expand only relevant nodes.
- Ask before installing remote skills.
- Apply loaded context.
- Explain what was used.
Use skill-graph when the user task involves a specialized domain, repeated workflow, or likely existing skill.
Examples:
- Frontend implementation.
- UI design polish.
- Testing strategy.
- Deployment.
- Documentation.
- Security review.
- Performance optimization.
- Framework-specific work.
The agent calls:
skill-graph resolve "<task>"The resolver returns:
- Recommended nodes.
- Context depth for each node.
- Missing remote skills.
- Conflicts.
- Frontier nodes that may be expanded later.
- Explanation.
The agent loads only the selected context layers.
Example:
{
"load": [
{ "node": "web-development", "depth": "summary" },
{ "node": "frontend", "depth": "summary" },
{ "node": "frontend-design", "depth": "capability_card" }
],
"frontier": [
"react-best-practices",
"accessibility-review",
"visual-qa"
]
}If a selected node is remote and not installed, the agent must ask for approval.
The prompt should include:
- Skill name.
- Source.
- Install command.
- Why it is relevant.
- Trust indicators.
- What will be loaded after install.
After inspecting the repo or task details, the agent may call:
skill-graph expand react-best-practices --depth fullExpansion should be justified by new evidence:
- Repository uses React.
- Repository uses Tailwind.
- Task requires accessibility.
- Existing tests use Playwright.
- Deployment target is Vercel.
The agent should prefer:
- Ancestors at summary depth.
- Prerequisites at summary depth.
- One or two specialized nodes at full depth.
- Deep artifacts only when executing specific procedures.
At the end of a task, the agent should summarize:
- Which skill nodes were loaded.
- Which remote skills were installed.
- Which frontier nodes were not needed.
- Any conflicts or skipped recommendations.
skill-graph resolve "<task>" \
--agent codex \
--budget 4000 \
--format jsonReturns a ranked context plan.
Use --strategy hybrid when a local embedding index exists and the task benefits from both exact lexical matching and conceptual matching. Use --strategy semantic only after skill-graph embeddings index has been run.
skill-graph embeddings index --provider qwen3-local
skill-graph embeddings infoBuilds and inspects the optional local semantic index. The real provider runs locally; any future provider that uploads local task or repository text requires explicit human approval.
skill-graph edges suggest --format markdownProposes inferred graph edges from the saved local embedding index. Treat these as review items only; they are not active resolver policy unless a human accepts and records them in graph metadata.
skill-graph expand <node-id> --depth full --format markdownReturns deeper context for one node.
skill-graph install <node-id>Installs the source skill after approval.
skill-graph explain --lastExplains the last resolution path.
User:
Make this dashboard feel like a polished production SaaS tool.
Agent:
- Resolves the task.
- Loads
web-developmentandfrontendsummaries. - Proposes installing
frontend-designif missing. - Inspects package files and detects React.
- Expands
react-best-practices. - Keeps
accessibility-reviewon the frontier. - Implements the frontend.
- Expands
visual-qabefore final verification.
This captures progressive disclosure: the graph starts shallow and widens or deepens only when the work needs it.