# Map Codebase Structure with DSP

Large repositories force coding agents to rediscover structure during every task. DSP stores a queryable dependency graph with stable identities and explicit connection reasons.

## Install

```bash
npx skillstore add sickn33/data-structure-protocol
```

## Metadata

- Status: approved
- Slug: sickn33-data-structure-protocol
- Skillstore revision: r2
- Version status: missing
- Tree hash: cd3828bc3f285cc678a5974e3271e14581e1cae591c6c2fca3dee54eea9a8b0e
- Author: sickn33
- GitHub username: sickn33
- License: MIT
- Repository: https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/data-structure-protocol
- Ref: f9e2c34b4f19c7f3e6b0a1e93227b5f77cc12526
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: allowed
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: external\_commands, network
- Quality score: 78
- Quality tier: bronze
- Public page: https://skillstore.pages.dev/skills/sickn33-data-structure-protocol
- Manifest: https://skillstore.pages.dev/api/skills/sickn33-data-structure-protocol/manifest

## Capabilities

- Initializes a plain-text DSP graph for a project.
- Assigns stable identifiers to files, artifacts, and exported functions.
- Records imports, public exports, and reasons for each dependency.
- Searches entities by description or source path.
- Traces parents, children, recipients, and paths between entities.
- Detects dependency cycles, orphaned entities, and graph statistics.

## Use Cases

- Orient New Contributors: Query the graph to locate modules, public APIs, and dependency reasons before changing unfamiliar code.
- Plan Safe Refactors: Trace recipients and dependency paths to estimate the impact of moving modules or replacing libraries.
- Preserve Agent Context: Maintain a persistent structural map that coding agents can reuse across separate tasks and context windows.

## Prompt Templates

### Bootstrap a Project Map

```
Initialize DSP for {project_root}. Identify entrypoints, map reachable local imports, record public exports, and explain each dependency reason.
```

### Find a Feature

```
Use the existing DSP graph to locate {feature}. Summarize relevant entities, dependencies, public APIs, and likely change points.
```

### Synchronize Structural Changes

```
After implementing {change}, update DSP for every affected file, import, export, move, or deletion. Preserve all stable identifiers.
```

### Analyze Dependency Replacement

```
Before replacing {dependency}, trace every recipient and graph path. Group impacts by module and propose a staged migration with validation steps.
```

## Limitations

- Requires Python 3.10 or later and a separate DSP CLI script.
- Bootstrap maps reachable imports and may miss disconnected project files.
- Graph accuracy depends on updates after structural code changes.
- External dependency internals and runtime behavior are not analyzed.

## Best Practices

- Update DSP immediately after files, imports, exports, or public purposes change.
- Write short dependency reasons that explain why each connection exists.
- Review DSP changes with the related code changes.

## Anti Patterns

- Do not assign entities to local variables or private helper details.
- Do not replace stable identifiers when files move or receive new names.
- Do not treat the graph as a substitute for tests or runtime validation.

## Security Audit

- Audited at: 2026-07-23T22:22:51.074\+00:00
- Summary: Two linked findings confirm one supply-chain risk: an unpinned Python CLI is downloaded from a mutable branch and later executed. The other 53 findings are safe Markdown, fixed local examples, metadata, or documentation links. No prompt injection or malicious intent was found.

## Stats

- Views: 91
- Downloads: 12
- Favorites: 0
- Popularity score: 0
