data-structure-protocol
Отображение структуры кодовой базы для AI-агентов
AI-агенты теряют контекст в больших кодовых базах и тратят токены на ориентацию. Этот навык предоставляет постоянную структурную память через запрашиваемый граф, позволяя агентам перемещаться по зависимостям и понимать связи в коде без повторного чтения файлов.
下载技能 ZIP
在 Claude 中上传
前往 设置 → 功能 → 技能 → 上传技能
开启并开始使用
测试它
正在使用“data-structure-protocol”。 python dsp-cli.py --root . search "authentication"
预期结果:
Found 3 entities:
- obj-11223344: auth/middleware.ts (User authentication middleware)
- func-aabbccdd: auth/middleware.ts#validateToken (JWT token validation)
- obj-44556677: auth/providers/oauth.ts (OAuth provider integration)
正在使用“data-structure-protocol”。 python dsp-cli.py --root . get-recipients obj-11223344
预期结果:
Modules importing auth/middleware.ts:
- obj-99887766: src/app.ts ('Handles JWT verification on requests')
- func-12345678: api/routes.ts ('Authenticates incoming API requests')
安全审计
安全Static analysis detected patterns in SKILL.md (external_commands, network URLs, weak crypto flags) but all are FALSE POSITIVES. The detected patterns are: (1) Example CLI commands in markdown code blocks - not actual shell execution; (2) GitHub reference URLs for documentation - not data exfiltration; (3) Misidentified content as crypto algorithms - the skill is pure documentation. This is a legitimate documentation skill with no security risks.
质量评分
你能构建什么
Навигация по большой кодовой базе
Перемещайтесь по незнакомым кодовым базам, запрашивая граф DSP для понимания отношений модулей без чтения каждого файла
Безопасный рефакторинг
Перед заменой библиотеки или рефакторингом запросите граф для поиска всех зависимых модулей и понимания влияния
Сохранение контекста кода
Поддерживайте структурные знания между сессиями, чтобы AI-агенты могли понимать, почему существуют связи
试试这些提示
Set up the Data Structure Protocol (DSP) for this project. Download dsp-cli.py if needed, run init, and bootstrap the graph starting from the main entrypoint.
Find all entities that depend on [entity-name-or-path] and show me why each dependency exists.
Create a new DSP object for [file-path] with description '[purpose]'. Then create function entities for each exported function, mark them as shared, and add imports with reasons.
Search the DSP graph for '[query]' to find relevant entities. Show me their descriptions and import relationships.
最佳实践
- Update DSP immediately when creating new files, adding imports, or changing public APIs
- Always add a meaningful 'why' reason when recording an import - this is where most value lives
- Treat .dsp/ diffs like code diffs - review them and keep them accurate
避免
- Don't update DSP for internal-only changes that don't affect purpose or dependencies
- Don't create UIDs for every local variable - only file-level Objects and public entities
- Don't skip adding 'why' reasons - without them the graph loses navigational value