agent-align

Creates and maintains AGENTS.md as the canonical repository agent instruction entry point.

1|Updated Aug 18, 2026
One-click install
npx skills add https://github.com/davidsneighbour/clerkwork --skill agent-align-davidsneighbour
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: agent-align
Source: https://github.com/davidsneighbour/clerkwork/tree/main/skills/agent-align
Command: npx skills add https://github.com/davidsneighbour/clerkwork --skill agent-align-davidsneighbour

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Repositories often accumulate scattered, duplicated, or conflicting AI agent instruction files (AGENTS.md, CLAUDE.md, ad-hoc docs) that confuse coding agents and waste context. This Skill establishes a single canonical instruction hierarchy so Claude Code and Codex read consistent, well-scoped guidance. ## Core Features & Use Cases - Canonical AGENTS.md setup: Creates or refactors AGENTS.md as the sole repository-level instruction entry point, keeping only universal behavioural rules. - Scoped instructions and references: Moves path-scoped rules into .agents/instructions/ with non-global applyTo patterns and task-triggered knowledge into .agents/references/. - Legacy handling and validation: Detects obsolete CLAUDE.md files, hands cleanup to agent-instructions-audit, and validates that no global scopes, duplicates, or lost instructions remain. - Use Case: You onboard a new repository for AI-assisted development and want Claude Code and Codex to follow one consistent, minimal set of instructions without a CLAUDE.md compatibility shim. ## Quick Start Ask the agent to run agent alignment for this repository and confirm when prompted before any files are changed.

Frequently Asked Questions about agent-align

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up AGENTS.md for Claude Code and Codex?▼

Run agent alignment to create AGENTS.md as the single canonical instruction entry point. Current Claude Code reads AGENTS.md natively when no CLAUDE.md exists, and Codex reads it natively, so no compatibility adapter is needed.

What is the difference between .agents/instructions and .agents/references?▼

Files in .agents/instructions/ hold behavioural rules with a non-global applyTo scope determined by file paths. Files in .agents/references/ hold task-triggered specialised knowledge with no applyTo, loaded only when the task requires it.

Does agent-align create or keep a CLAUDE.md file?▼

No. It never creates CLAUDE.md, since current Claude Code falls back to AGENTS.md natively. An existing CLAUDE.md is reported and handed to agent-instructions-audit, which migrates unique content before removal.

Can agent-align edit files outside AGENTS.md and .agents?▼

No. Its scope is limited to AGENTS.md, .agents/instructions/, and .agents/references/. It asks for explicit permission before overwriting files, deleting instructions, committing, or touching anything outside that scope.

When should I use agent-instructions-audit instead of agent-align?▼

Use agent-align for structural alignment of the AGENTS.md hierarchy. Use agent-instructions-audit when the structure is bloated, duplicated, poorly scoped, or contains legacy agent-specific files like CLAUDE.md needing migration and removal.