Skip to content

Add skillgraph: checker and language server for Agent Skills - #3195

Draft
Dominic Nguyen (datduyng) wants to merge 7 commits into
mainfrom
domnguyen/skillgraph
Draft

Dominic Nguyen (datduyng) wants to merge 7 commits into
mainfrom
domnguyen/skillgraph

Conversation

@datduyng

Copy link
Copy Markdown
Contributor

Adds @typeagent/skillgraph. It builds a deterministic graph of Agent Skills (SKILL.md, references, scripts) and checks it.

What it reports

  • Missing anchors in linked docs
  • Unknown script flags (read from the script AST or --help)
  • Unresolved skill:// references
  • Orphan files that nothing references

Interfaces

  • CLI: skillgraph check | graph | refs | lsp
  • LSP server for editor diagnostics
  • Library: SkillGraph, SpecStore, parseMarkdown

Verification

  • pnpm run build, pnpm test (2 passing), and prettier pass
  • skillgraph check --root test/fixtures/skills --no-probe reports the 3 seeded errors and 1 orphan

pnpm-lock.yaml was regenerated with pnpm 11.9.0. The jest peer re-resolution causes the unrelated lockfile churn.

Builds a deterministic graph of skill docs, references, anchors, and
script flags. Reports broken links, unknown flags, missing skills, and
orphan files via CLI (check/graph/refs) and LSP.
Comment on lines +112 to +113
/Document roots available to the parser:\s*([\s\S]*?)(?:\n\s*\n)/
.exec(body)?.[1]
- Orphans: only files beside referenced ones; drop name allowlist
- Help: subcommands only from Commands sections
- Flags: confirm unlisted flags by probing (clap hidden flags)
- Shell: prompted fences treat unprompted lines as output
- Links: skip links out of the skill into missing dirs (site routes)
- powershell/pwsh/ps1 fences: PS prompts, backtick continuation,
  & call operator, cmdlets skipped, pwsh -File unwrapped
- .ps1 param() blocks become flags; matched case-insensitive by prefix
- [CmdletBinding()] adds common parameters (-Verbose, -WhatIf, ...)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants