skills/agents-update/SKILL.md
Analyze a code repository's architecture and produce (or update) an AGENTS.md file that gives LLM coding agents a map of the project. Use this skill whenever the user says 'generate AGENTS.md', 'create AGENTS.md', 'update AGENTS.md', 'map this repo', 'document this project for agents', 'analyze the architecture', or any variation of 'help an LLM understand this codebase'. Also trigger when the user asks to onboard an AI agent onto a project, describe a repo's structure for Claude/Copilot/Cursor, or identify the architectural pattern of a codebase. If someone says 'what pattern does this project use' or 'where is everything in this repo', use this skill.
npx skillsauth add ryan-mahoney/ryan-llm-skills agents-updateInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Generate or update an AGENTS.md file that gives coding agents and human contributors a reliable, opinionated map of a repository. The goal is to capture everything needed to work confidently in the codebase, especially the things a newcomer or agent would get wrong without being told.
Coding agents make assumptions. They assume Rails conventions in a Django project, guess that src/ is the frontend when it's the backend, and hallucinate file paths. AGENTS.md exists to short-circuit those mistakes by giving contributors ground truth about the project up front. Every section should earn its place by preventing a real class of navigation, implementation, or maintenance error.
Survey the repository before writing anything. Use these checks as a recommended workflow and adapt the order to the repository's structure.
List the root directory contents. Pay attention to:
package.json, pyproject.toml, Cargo.toml, go.mod, Gemfile, pom.xml, build.gradle, composer.json, mix.exs, pubspec.yaml, etc.workspaces in package.json, lerna.json, nx.json, turbo.json, Cargo.toml with [workspace], packages/ or apps/ directories.Dockerfile, docker-compose.yml, .devcontainer/..github/workflows/, .gitlab-ci.yml, Jenkinsfile, .circleci/.terraform/, cdk.json, serverless.yml, pulumi/.Open the dependency files. Extract:
"engines": {"node": ">=20"}, python_requires, rust-toolchain.toml).Walk the directory structure 2–3 levels deep. Identify:
Open the files that reveal routing and wiring:
app.py, main.go, src/index.ts, config/routes.rb, urls.py, Program.cs.app/layout.tsx, src/App.vue, src/main.tsx, pages/_app.tsx.schema.prisma, models.py, db/migrate/).If one exists, read it fully. You will update it rather than replace it wholesale — preserve any human-written sections, custom notes, or team-specific guidance that is still accurate. Mark stale sections for revision.
Based on reconnaissance, determine:
Name the pattern precisely. Don't just say "MVC" — say which flavor. Examples:
If the project doesn't fit a clean label, describe it honestly rather than forcing a name.
If monorepo: identify each package/service, its role, and how they relate.
Produce the file using the template below. Every section exists because it prevents a specific category of contributor or agent mistake. Do not add fluff sections. Include sections only when they are verified and materially useful; if a section is relevant but cannot be confirmed from the repository, omit it or mark it with <!-- REVIEW: reason --> rather than guessing.
# AGENTS.md
> Auto-generated architecture guide for LLM coding agents.
> Last updated: YYYY-MM-DD
## Project Overview
One paragraph: what this project is, who it's for, what it does.
## Architecture
**Pattern:** [Named pattern from Step 2]
**Monorepo:** [Yes/No — if yes, list packages/services]
[2-4 sentences explaining how the pieces fit together. Focus on what a contributor or agent
would get wrong: "Despite having a `pages/` directory, routing is NOT file-based;
all routes are registered explicitly in `src/router/index.ts`."]
## Tech Stack
| Layer | Technology | Version | Notes |
| ---------- | ---------- | ------- | ----- |
| Language | | | |
| Runtime | | | |
| Framework | | | |
| ORM / DB | | | |
| Frontend | | | |
| Styling | | | |
| Testing | | | |
| CI/CD | | | |
| Deployment | | | |
## Directory Map
Annotated tree showing where things live. Only include directories that matter.
Use inline comments to explain non-obvious placements.
repo-root/
├── src/ # [what lives here]
│ ├── routes/ # [backend API route handlers]
│ ├── models/ # [ORM model definitions]
│ ├── services/ # [business logic layer]
│ └── ...
├── client/ # [frontend SPA]
│ ├── components/ # [React components]
│ └── pages/ # [client-side route pages]
├── db/
│ └── migrations/ # [database migrations — run with X command]
├── config/ # [app configuration files]
└── ...
## Routing
### Backend / API Routes
[How routes are defined, where they live, naming conventions.
Example: "Routes are defined in `src/routes/*.ts` and auto-loaded by the
framework. Each file exports a Hono router. API prefix is `/api/v1`."]
### Frontend Routes
[How pages map to URLs. File-based? Explicit router config? Both?
Example: "File-based routing via Next.js App Router. Layouts in `app/layout.tsx`.
Dynamic segments use `[param]` folder convention."]
## Data Layer
### Database
[What DB, how to connect, where the schema is defined.]
### Migrations
[Where migrations live, how to create and run them, any naming conventions.
Example: "`npx prisma migrate dev` to apply. Schema at `prisma/schema.prisma`."]
### Models / Schema
[Where models are defined. If there's a single source of truth (e.g., Prisma
schema generates types), say so. If models are hand-maintained, say that too.]
## Key Conventions
Things that deviate from what a coding agent or new contributor would assume by default:
- [e.g., "All API responses are wrapped in `{ data, error, meta }` — never
return raw arrays or objects."]
- [e.g., "Use `snake_case` for DB columns and API fields, `camelCase` only
in frontend TypeScript."]
- [e.g., "Never import from `@/utils` — use the domain-specific utility
module like `@/billing/utils` instead."]
- [e.g., "Tests must be colocated: `foo.ts` → `foo.test.ts` in the same dir,
not in a top-level `__tests__/` folder."]
## Commands
| Task | Command |
|-------------------------|---------------------------------|
| Install dependencies | `...` |
| Run dev server | `...` |
| Run tests | `...` |
| Run linter | `...` |
| Build for production | `...` |
| Run database migrations | `...` |
| Generate types/code | `...` |
## Gotchas & Unexpected Behavior
Things that WILL trip up a coding agent or new contributor if not stated explicitly:
- [e.g., "The `user` table is called `accounts` in the DB but `User` in the
ORM — the mapping is in `src/models/user.ts`."]
- [e.g., "Environment variables are validated at startup via Zod in
`src/env.ts` — adding a new env var requires updating the schema there,
not just `.env`."]
- [e.g., "This project uses path aliases: `@/` maps to `src/` but `~/`
maps to `client/src/` — don't confuse them."]
- [e.g., "Some routes are guarded by middleware defined in a non-obvious
place: `src/middleware/auth.ts` wraps routes in `src/routes/admin/*`."]
- [e.g., "The `build` command doesn't just compile — it also runs codegen.
If you edit a `.graphql` file, you must rebuild before types update."]
## Environment & Config
[Where env vars are defined, whether there's validation, any required
secrets for local dev. Mention `.env.example` if it exists.]
<!-- REVIEW: [reason] --> so a human can verify.Before finalizing, verify:
AGENTS.md tell them exactly where to put the route file, the model, the test, and the migration?<!-- REVIEW: ... -->.AGENTS.md.testing
This skill should be used when the user asks to "run the spec", "implement the spec", or "execute the spec". Implements every step in a SpecOps implementation spec by delegating each step (or logical group of adjacent steps) to a sequential subagent, conventional-committing each one independently, and — when `roborev` is on the path — running `roborev check` on every commit and `roborev fix` (with spec context, so the fix cannot silently drift the implementation away from the spec) on any commit that fails.
development
Exhaustively audit a top-level UI implementation component against an HTML prototype and produce a grouped markdown checklist of corrections. Use when a user asks for UI parity review, visual QA, design implementation audit, pixel-level drift detection, or behavior/style mismatch analysis between prototype HTML and shipped component code.
development
Audit a SpecOps implementation spec against its source analysis spec to find requirements, policies, contracts, edge cases, error modes, invariants, defaults, side effects, or implementation steps that the implementation has dropped, weakened, contradicted, or silently changed — then patch the implementation spec to restore them. Use this skill whenever the user mentions auditing, comparing, conforming, reconciling, or checking an implementation spec against an analysis spec, finding gaps between two specs, ensuring an implementation spec preserves analysis behavior, or verifying spec derivation or traceability. Also trigger when the user describes "did the implementation spec lose anything from the analysis," "does the implementation match the analysis," "verify the implementation spec covers everything," or asks to confirm one spec is faithful to another. Run this before generating code from an implementation spec and after either spec is edited.
development
Audit a set of SpecOps analysis specs for cross-spec coherence — establish a dependency-ordered implementation sequence, then verify pairwise integration contracts at module boundaries plus three cross-cutting consistency dimensions (shared data models, side-effect ownership, terminology) — and patch the affected specs to resolve gaps. Use this skill whenever the user mentions cross-spec consistency, integration gaps between specs, conflicts between specs, duplicate work across specs, implementation order, dependency order for migration, building an implementation-order checklist, ensuring specs interoperate, terminology drift across specs, or shared data model conflicts. Also trigger when the user describes "do my specs agree with each other," "what order should I implement these in," "find inconsistencies across all my specs," or asks to audit a folder of analysis specs as a set rather than individually. Run this once after generating a full set of analysis specs, before deriving implementation specs.