graph-sync

Incrementally refreshes the codebase knowledge graph by regenerating stale modules and dependency edges.

1|Updated Jun 27, 2026
One-click install
npx skills add https://github.com/vickysrawat/AI-Assisted-development --skill graph-sync-vickysrawat
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: graph-sync
Source: https://github.com/vickysrawat/AI-Assisted-development/tree/main/skills/graph-sync
Command: npx skills add https://github.com/vickysrawat/AI-Assisted-development --skill graph-sync-vickysrawat

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Keeping a codebase knowledge graph accurate as code evolves is tedious: modules get added, renamed, or removed, and dependency edges drift out of sync. This Skill incrementally refreshes the graph in .claude/graph/ so only changed modules are regenerated instead of rebuilding everything. ## Core Features & Use Cases - Fingerprint-based staleness detection: Recomputes module-wide hashes over all source files and regenerates only stale, new, or renamed modules. - Typed dependency edges: Derives EXTRACTED edges deterministically from source imports via a script, while allowing INFERRED and AMBIGUOUS edges for DI or dynamic wiring. - Structure management: Detects hub (god) nodes, restructures flat graphs into domain groupings past 30 modules, and builds a directory catalog of static-serving, config, and test directories. - Use Case: After a sprint of refactoring, run the sync to refresh only the modules whose files changed, carry curated bounded-context prose across a renamed module, and clear the .stale flag. ## Quick Start Ask the assistant to refresh the knowledge graph and sync any stale modules in .claude/graph/.

Frequently Asked Questions about graph-sync

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

FAQPage Schema
How do I update a stale codebase knowledge graph?

Run the graph-sync command, which recomputes module-wide fingerprints over each module's source files and regenerates only the modules whose hashes differ. Unchanged modules are never regenerated, keeping the refresh incremental and fast.

How are dependency edges between modules detected?

EXTRACTED edges are derived deterministically by a Node script that parses imports, usings, requires, and ProjectReferences from source. Edges a parser cannot see, such as DI or dynamic wiring, can be added manually as INFERRED or AMBIGUOUS with a type and reason.

What happens when a module is renamed or removed?

A missing module with high file overlap to a new directory is treated as a rename, carrying curated bounded-context prose forward and rewriting edge endpoints. A module with no match is proposed for removal and deleted only after confirmation.

Does graph-sync work with dependency repositories outside the project?

Yes, it scans additionalDirectories from .claude/settings.local.json as extra roots and tags discovered modules with sourceRoot so paths resolve against the dependency repo. The directory catalog itself stays repo-only since it describes this app's deployment topology.

When does the graph switch from flat to domain structure?

When the total module count exceeds 30 and the structure is flat, the graph is restructured into domain groupings, optionally using edge-density communities. The structure never reverts from domain back to flat.