Skip to main content
plugin

codedna — Claude Code plugin: architecture annotations

codedna adds structured architecture notes to source files. Use its commands to map a project, find stale dependency references, or inspect refactor impact.

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add anthropics/claude-plugins-community
/plugin install codedna@claude-community
Open on GitHub

What codedna does

The plugin annotates project files with exports:, used_by:, and rules: fields. Run /codedna:init to annotate files that lack notes, /codedna:check to find missing annotations and stale references, or /codedna:manifest to view the project architecture map. Before a refactor, /codedna:impact <file> shows the dependency chain for a file.

Four hooks handle session and edit events: they read .codedna at session start, remind Claude to check a docstring before tool use, validate annotations after writes and edits, and give a reminder when the session ends. The codedna-reviewer agent can be invoked through /agents. The annotation-check hook requires Python 3.11+, so that check depends on having that version available. CodeDNA covers 12 programming languages across 28 extensions and 7 template families; AXL uses experimental native frames.

What it helps with

  • annotate project files that lack architecture notes
  • locate stale used_by: references
  • view the project architecture map
  • trace dependent files before a refactor
  • validate annotations after file edits

Example prompts for the agent

  • Add annotations to project files that do not have them yet: /codedna:init.
  • Find unannotated files and stale used_by: references: /codedna:check.
  • Before changing src/auth.ts, show me its dependent-file chain: /codedna:impact src/auth.ts.

How to install codedna

Plugin marketplace

/plugin marketplace add anthropics/claude-plugins-community
/plugin install codedna@claude-community

Step by step, with commands for each platform: Claude Code plugins: marketplaces, installing, and building your own

Questions about codedna

How do I install codedna in Claude Code?

Run /plugin marketplace add anthropics/claude-plugins-community, then /plugin install codedna@claude-community.

What does codedna do?

It adds source-file annotations describing exports, dependents, and constraints. Its commands can report annotation coverage, map the project, and trace refactor impact.

Does codedna require Python?

Python 3.11+ is required by the hook that checks annotations. The plugin also includes four automatic hooks and a codedna-reviewer agent.

Source text

codedna-plugin · MIT
# CodeDNA Plugin for Claude Code

Extends Claude Code with the [CodeDNA](https://github.com/Larens94/codedna) in-source AI communication protocol.

## What it does

- **/codedna:init** — annotate all unannotated files in the project
- **/codedna:check** — coverage report: which files lack annotation, which `used_by:` references are stale
- **/codedna:manifest** — full architectural map in one pass (replaces 10-20 file reads)
- **/codedna:impact `<file>`** — cascade dependency chain before a refactor
- **4 automatic hooks** — SessionStart (reads `.codedna`), PreToolUse (reminds to read docstring), PostToolUse (validates L1 + L2 annotations on every Write/Edit), Stop (session end reminder)
- **codedna-reviewer agent** — on-demand compliance reviewer, invokable via `/agents`

## Install

```bash
claude plugin marketplace add Larens94/codedna
claude plugin install codedna@codedna
```

Or test locally:

```bash
claude --plugin-dir ./codedna-plugin
```

## Usage

```
/codedna:init               # annotate all unannotated files
/codedna:check              # find unannotated files and stale used_by: refs
/codedna:manifest           # show project architecture map
/codedna:impact <file>      # show who depends on this file
```

## What is CodeDNA?

CodeDNA is an inter-agent communication protocol embedded in source files. Every file carries a structured annotation that tells AI agents:

- **`exports:`** — what this file provides publicly
- **`used_by:`** — who depends on it (reverse dependency graph)
- **`rules:`** — hard constraints that must never be violated
- **`agent:`** — append-only session log from previous AI agents
- **`message:`** — agent-to-agent chat: open observations, promoted to `rules:` or dismissed

This gives any AI agent instant architectural context without reading dozens of files. Supports 12 programming languages across 28 extensions, plus 7 template families; AXL uses experimental native frames rather than comments.

See the [full spec](https://github.com/Larens94/codedna/blob/main/SPEC.md) for details.

## Requirements

- Claude Code
- Python 3.11+ (for the annotation check hook)

© Larens94 · MIT · Larens94/codedna

Similar plugins

All plugins for Agent setup: memory, context, orchestration →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor