.agent/skills/data-structure-protocol/SKILL.md
Build and navigate DSP (Data Structure Protocol) — graph-based long-term structural memory of codebases for LLM agents. Stores entities (modules, functions), their dependencies (imports), public API (shared/exports), and reasons for every connection. Use when: (1) project has a .dsp/ directory, (2) user asks to set up DSP or bootstrap project structure, (3) creating/modifying/deleting code files in a DSP-tracked project, (4) navigating project structure, understanding dependencies, or finding modules, (5) user mentions DSP, dsp-cli, .dsp, or structure mapping.
npx skillsauth add CoralShades/CurryDash-Central-Hub data-structure-protocolInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
DSP builds a dependency graph of project entities in a .dsp/ directory. Each entity (module, function, external dependency) gets a UID, description, import list, and export index. The graph answers: what exists, why it exists, what depends on what, and who uses what.
DSP is NOT documentation for humans or AST dump. It captures meaning (purpose), boundaries (imports/exports), and reasons for connections (why).
Embed this context when working on a DSP-tracked project:
This project uses DSP (Data Structure Protocol). The
.dsp/directory is the entity graph of this project: modules, functions, dependencies, public API. It is your long-term memory of the code structure.Core rules:
- Before changing code — find affected entities via
dsp-cli search,find-by-source, orread-toc. Read theirdescriptionandimportsto understand context.- When creating a file/module — call
dsp-cli create-object. For each exported function —create-function(with--owner). Register exports viacreate-shared.- When adding an import — call
dsp-cli add-importwith a briefwhy. For external dependencies — firstcreate-object --kind externalif the entity doesn't exist yet.- When removing import / export / file — call
remove-import,remove-shared,remove-entityrespectively. Cascade cleanup is automatic.- When renaming/moving a file — call
move-entity. UID does not change.- Don't touch DSP if only internal implementation changed without affecting purpose or dependencies.
- Bootstrap — if
.dsp/is empty, traverse the project from root entrypoint via DFS on imports, documenting every file.Key commands:
dsp-cli init dsp-cli create-object <source> <purpose> [--kind external] [--toc ROOT_UID] dsp-cli create-function <source> <purpose> [--owner UID] [--toc ROOT_UID] dsp-cli create-shared <exporter_uid> <shared_uid> [<shared_uid> ...] dsp-cli add-import <importer_uid> <imported_uid> <why> [--exporter UID] dsp-cli remove-import <importer_uid> <imported_uid> [--exporter UID] dsp-cli remove-shared <exporter_uid> <shared_uid> dsp-cli remove-entity <uid> dsp-cli move-entity <uid> <new_source> dsp-cli update-description <uid> [--source S] [--purpose P] [--kind K] dsp-cli get-entity <uid> dsp-cli get-children <uid> [--depth N] dsp-cli get-parents <uid> [--depth N] dsp-cli search <query> dsp-cli find-by-source <path> dsp-cli read-toc [--toc ROOT_UID] dsp-cli get-stats
The script is at scripts/dsp-cli.py relative to this skill directory.
python <skill-path>/scripts/dsp-cli.py [--root <project-root>] <command> [args]
--root defaults to current working directory. All paths in arguments are repo-relative.
imports and shared/exports..dsp — code, images, styles, configs, everything.why lives next to the imported entity in its exports/ directory (reverse index).kind: external, no deep dive into node_modules/site-packages/etc. But exports index works — shows who imports it.obj-<8 hex> (e.g., obj-a1b2c3d4)func-<8 hex> (e.g., func-7f3a9c12)UID marker in source code — comment @dsp <uid> before declaration:
// @dsp func-7f3a9c12
export function calculateTotal(items) { ... }
# @dsp obj-e5f6g7h8
class UserService:
dsp-cli init to create .dsp/ directory.package.json main, framework entry, etc.dsp-cli create-object <path> <purpose>dsp-cli create-function <path>#<symbol> <purpose> --owner <module-uid>dsp-cli create-shared <module-uid> <func-uid> [<func-uid> ...]dsp-cli add-import <this-uid> <imported-uid> <why> [--exporter <module-uid>]dsp-cli create-object <package-name> <purpose> --kind externaldsp-cli find-by-source <path>dsp-cli search <query>dsp-cli read-toc → get all UIDs, then get-entity for detailsdsp-cli get-children <uid> --depth Ndsp-cli get-parents <uid> --depth Ndsp-cli get-recipients <uid> — who depends on this entitydsp-cli get-path <from> <to>dsp-cli update-description <uid> --purpose <new>dsp-cli move-entity <uid> <new-path>dsp-cli update-import-why <importer> <imported> <new-why>dsp-cli remove-import <importer> <imported> [--exporter UID]dsp-cli remove-shared <exporter> <shared>dsp-cli remove-entity <uid> (cascading cleanup)dsp-cli detect-cycles — circular dependenciesdsp-cli get-orphans — unused entitiesdsp-cli get-stats — project graph overview| Code Change | DSP Action |
|---|---|
| New file/module | create-object + create-function + create-shared + add-import |
| New import added | add-import (+ create-object --kind external if new external dep) |
| Import removed | remove-import |
| Export added | create-shared (+ create-function if new function) |
| Export removed | remove-shared |
| File renamed/moved | move-entity |
| File deleted | remove-entity |
| Purpose changed | update-description |
| Internal-only change | No DSP update needed |
.dsp/ directory structure, file formats, TOCtesting
Use when you have a written implementation plan to execute in a separate session with review checkpoints
development
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation.
testing
Use when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies
development
Performs security-focused differential review of code changes (PRs, commits, diffs). Adapts analysis depth to codebase size, uses git history for context, calculates blast radius, checks test coverage, and generates comprehensive markdown reports. Automatically detects and prevents security regressions.