No slash command · from ed3d-extending-claude
Analyzes code changes after development phases or branches to identify stale CLAUDE.md or AGENTS.md files and coordinates updates to contracts, dependencies, and architectural decisions.
Ships in ed3d-extending-claude. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
REQUIRED SUB-SKILL: Use ed3d-extending-claude:writing-claude-md-files for all context file creation and updates.
Context files (CLAUDE.md or AGENTS.md) document contracts and architectural intent. When code changes contracts, the documentation must update. Stale documentation is worse than no documentation.
Trigger: End of development phase, branch completion, or any work that changed contracts, APIs, or domain structure.
Before any updates, detect what format this repository uses:
# Check for AGENTS.md at root
ls -la AGENTS.md 2>/dev/null
# Check for CLAUDE.md at root
ls -la CLAUDE.md 2>/dev/null
| Root AGENTS.md? | Format | Action |
|---|---|---|
| Yes | AGENTS.md-canonical | Update AGENTS.md files, create companion CLAUDE.md |
| No | CLAUDE.md-canonical | Update CLAUDE.md files directly |
Key principle: We use OUR format structure (Purpose, Contracts, Dependencies, Invariants, etc.) regardless of filename. AGENTS.md is just for cross-platform AI agent compatibility.
When the repo uses AGENTS.md:
Read @./AGENTS.md and treat its contents as if they were in CLAUDE.md
| Change Type | Update Required? | What to Update |
|---|---|---|
| New domain/module | Yes | Create domain context file |
| API/interface change | Yes | Contracts section |
| Architectural decision | Yes | Key Decisions section |
| Invariant change | Yes | Invariants section |
| Dependency change | Yes | Dependencies section |
| Bug fix (no contract change) | No | - |
| Refactor (same behavior) | No | - |
| Test additions | No | - |
Diff against the base (branch start or phase start):
# Get changed files
git diff --name-only <base-sha> HEAD
# Get detailed changes
git diff <base-sha> HEAD --stat
Categorize changes:
For each significant change, determine which context file should document it:
| Change Location | Context File Location |
|---|---|
| Project-wide pattern | Root context file |
| New domain | <domain>/ context file (create) |
| Existing domain contract | <domain>/ context file (update) |
| Cross-domain dependency | Both affected domains |
Hierarchy rule: Information belongs at the lowest level where it applies. Domain-specific contracts go in domain files, not root.
For AGENTS.md-canonical repos: When creating new domain context files, create both AGENTS.md (with content) and CLAUDE.md (companion pointer).
For each affected context file, verify:
# Find domain's public exports
grep -r "export" <domain>/index.ts
# Find domain's imports (dependencies)
grep -r "from '\.\." <domain>/
For updates:
date +%Y-%m-%dFor new domains (CLAUDE.md-canonical repos):
<domain>/CLAUDE.md using template from writing-claude-md-filesFor new domains (AGENTS.md-canonical repos):
<domain>/AGENTS.md using template from writing-claude-md-files<domain>/CLAUDE.md:
Read @./AGENTS.md and treat its contents as if they were in CLAUDE.md
git add <affected CLAUDE.md files>
git commit -m "docs: update project context for <branch-name>"
Has code changed?
├─ No → Skip (nothing to update)
└─ Yes → Detect format first (AGENTS.md at root?)
│
└─ What changed?
├─ Only tests/internal details → Skip
└─ Contracts/APIs/structure → Continue
│
├─ New domain created?
│ ├─ AGENTS.md repo → Create AGENTS.md + companion CLAUDE.md
│ └─ CLAUDE.md repo → Create CLAUDE.md
│
├─ Existing domain changed?
│ └─ Update domain context file (read first!)
│
└─ Project-wide pattern changed?
└─ Update root context file
Always update when:
Never update for:
| Mistake | Fix |
|---|---|
| Updating for every change | Only update for contract changes |
| Forgetting freshness date | Always use date +%Y-%m-%d |
| Documenting implementation | Document contracts and intent |
| Putting domain info in root | Use domain context files for domain contracts |
| Skipping verification | Read the code, confirm contracts hold |
| Skipping format detection | Always check for AGENTS.md first |
| Writing AGENTS.md without reading | Always read existing content before updating |
| Forgetting companion CLAUDE.md | AGENTS.md repos need both files |
Called by:
Uses:
What SKILL.md sets; muted values are Claude Code's defaults
9 skills in this plugin
/creating-an-agentUse when creating specialized subagents for Claude Code plugins or the Task tool - covers description writing for auto-delegation, tool selection, prompt structure, and testing agents/creating-a-pluginUse when creating a new Claude Code plugin or setting up plugin structure - provides complete file organization, manifest format, and component definitions for commands, agents, skills, hooks, and MCP servers/maintaining-a-marketplaceUse when creating, releasing, or maintaining a Claude Code Plugin Marketplace - covers marketplace.json schema, version management, release checklists, changelog conventions, and validation to prevent sync drift between plugin.json and marketplace.jsonnpx claudepluginhub ed3dai/ed3d-plugins --plugin ed3d-extending-claudeOther plugins' skills for the same job