specter-scan

Index TypeScript and JavaScript codebases into a Specter knowledge graph.

1|Updated Feb 11, 2026
One-click install
npx skills add https://github.com/forbiddenlink/specter --skill specter-scan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: specter-scan
Source: https://github.com/forbiddenlink/specter/tree/main/plugin/skills/specter-scan
Command: npx skills add https://github.com/forbiddenlink/specter --skill specter-scan

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Index and map a codebase into Specter's knowledge graph to provide a living, searchable understanding of code relationships.

Core Features & Use Cases

  • Parses TypeScript and JavaScript files using AST analysis to extract functions, classes, interfaces, types, and exports.
  • Maps import relationships across files and computes per-function cyclomatic complexity.
  • Analyzes git history for modification patterns (optional) and saves the knowledge graph to .specter/graph.json for easy consumption.

Quick Start

Run the specter scan command to build or refresh the knowledge graph for your project.

Frequently Asked Questions about specter-scan

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I map cross-file import relationships in a TypeScript project?

You can map cross-file import relationships by running a scan that parses TypeScript files via AST analysis, extracting symbols and computing relationships to build a searchable knowledge graph saved as .specter/graph.json.

What is a codebase knowledge graph and how does it help with code analysis?

A codebase knowledge graph is a structured map of code relationships that indexes symbols and imports. It helps code analysis by providing a searchable understanding of cross-file dependencies and per-function cyclomatic complexity for TypeScript and JavaScript projects.

Can I compute cyclomatic complexity for JavaScript functions during a code scan?

Yes, computing cyclomatic complexity for JavaScript functions is supported during a code scan. The analysis parses JavaScript files using AST extraction to calculate per-function complexity alongside mapping imports and building the knowledge graph.

Does the code analysis support analyzing git history for modification patterns?

Yes, the code analysis supports optionally analyzing git history for modification patterns. It combines git history analysis with AST parsing and import mapping to build a comprehensive knowledge graph of your codebase.

When should I refresh the knowledge graph for my codebase?

You should refresh the knowledge graph during initial onboarding, after major refactors, or whenever you need up-to-date cross-file relationships. This ensures the .specter/graph.json file accurately reflects the current state of your project.