Overview
AI Project Context Skill bridges the gap between AI assistant conversations and developer project structures. By analyzing directory layout, dependency configuration, and key files, it generates context summaries that help AI assistants provide more accurate and relevant assistance.
The layered design approach references @obra(opens in a new tab)'s Superpowers(opens in a new tab) workflow framework.
Core Content
The skill is defined by a SKILL.md that specifies a complete context management system:
- Layered Document Model: Four layers (A–D) from index to architecture decisions, with clear responsibility boundaries
- Change-Type Matrix: Specifies which documentation layer each change type (cross-module dependencies, public API, data models, etc.) should trigger
- SSOT Precedence Rules: Source code > automated tests > Markdown; trust code on conflict
- Document Lifecycle: Standard process for create / update / deprecate / archive
Layering Strategy
| Layer | Role | Content |
|---|---|---|
| A — Index | Single entry, links only | Project map, reading order, key paths |
| B — System Shape | Structure snapshot | Tech stack, directory topology, dependencies |
| C — Contracts | External state anchors | Data models, API interfaces (linked to schemas) |
| D — Decisions | ADR records | Architecture decisions with rationale |
SSOT (Single Source of Truth)
To avoid conflicts from multi-source information: source code and generated artifacts (OpenAPI, protos, type definitions) take priority. Documentation describes intent and boundaries only, without duplicating schema fields.
Templates
Several templates are included for bootstrapping AI integration:
AI_INDEX.template.md— Project index templateADR.template.md— Architecture Decision Record templateSSOT_SNIPPET.md— Single Source of Truth configuration snippet
Installation & Usage
Copy the skills/ai-project-context/ directory into any Agent Skills-compatible AI client's skills directory. Supports Claude Code, Cursor, and other compatible clients.
Usage steps:
- Copy templates from
templates/into your project (e.g.,docs/AI_INDEX.md) - Add an SSOT configuration block to
AGENTS.mdorCLAUDE.mdwith real paths - Keep Layer A (index) lean, pointing to schemas rather than duplicating fields
- Use the change-type matrix to determine when to update each layer's documentation
References
- obra/superpowers(opens in a new tab) — Superpowers workflow framework
- Agent Skills Specification(opens in a new tab)