skills/agents-md/SKILL.md
Create and maintain AGENTS.md files for services, components, and subagents with scoped skill references and hierarchical context. Trigger: When creating AGENTS.md for a new service or component, updating existing AGENTS.md, or defining subagent context boundaries.
npx skillsauth add 333-333-333/agents agents-mdInstall 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.
AGENTS.md for a new microservice, app, or infrastructure componentAGENTS.md (root) ← Global norms, skill registry, project overview
├── api/AGENTS.md ← Backend architecture, shared API conventions
│ ├── api/auth/AGENTS.md ← Auth service: domain model, endpoints, config
│ ├── api/booking/AGENTS.md ← Booking service context
│ └── api/payment/AGENTS.md ← Payment service context
├── mobile/AGENTS.md ← Flutter mobile conventions
├── web/AGENTS.md ← Flutter web conventions
└── infra/AGENTS.md ← Terraform / IaC conventions
When guidance conflicts, the most specific AGENTS.md wins:
root/AGENTS.md < api/AGENTS.md < api/auth/AGENTS.md
(general) (backend) (service-specific)
./AGENTS.md)The root AGENTS.md is the single source of truth for:
skill-sync)Already exists in this repo. Do NOT recreate. Use
skill-syncto update skill tables.
{component}/AGENTS.md)Component-level files define architectural context for a major area:
| Component | Defines |
|-----------|---------|
| api/ | Microservice architecture, communication patterns, shared conventions |
| mobile/ | Flutter patterns, state management, navigation |
| web/ | Web-specific conventions, SSR, routing |
| infra/ | IaC conventions, environments, deployment |
| docs/ | Documentation standards, LaTeX compilation |
{component}/{service}/AGENTS.md)The most specific level. Defines everything an agent needs to work on this service autonomously:
ALL AGENTS.md content MUST be written in English. This includes section headers, descriptions, table content, and comments. Code examples naturally remain in English.
Each AGENTS.md can reference skills that are relevant to its scope. This tells agents which skills to load when working in that directory.
## Skills Reference
| Skill | Use For |
|-------|---------|
| `go-gin-handlers` | HTTP handlers, middleware, validation |
| `go-repository-pattern` | Persistence, PostgreSQL, migrations |
| `go-tdd` | Tests, mocks, table-driven tests |
Rules for scoped references:
skill-sync)| Section | Required | Purpose | |---------|----------|---------| | Overview | Yes | What this component area is | | Architecture | Yes | Patterns, layer rules, diagrams | | Service/Module Map | Yes | List of children with descriptions | | Shared Conventions | Yes | Response formats, naming, error codes | | Communication Patterns | If applicable | REST, gRPC, messaging between services | | Development Workflow | Yes | How to run, test, add new services | | Skills Reference | Yes | Scoped skills for this component |
| Section | Required | Purpose | |---------|----------|---------| | Overview | Yes | What this service does, bounded context | | Tech Stack | Yes | Technologies used (table format) | | Architecture | Yes | Directory structure with annotations | | Domain Model | Yes | Entities, value objects, ports | | API Endpoints | If HTTP | Method, path, description, auth | | Error Catalog | If HTTP | Domain errors mapped to HTTP status codes | | Database | If persistent | Provider, schema, migrations | | Configuration | Yes | Env vars with defaults and descriptions | | Running | Yes | Commands to run, test, build | | What's NOT Implemented | Recommended | Future work, missing features | | Skills Reference | Optional | Service-specific skill references |
Every service with HTTP endpoints MUST document its error catalog. This enables agents to:
The catalog has two parts:
1. Domain Errors — internal sentinel errors defined in domain/error.go:
| Error | Description |
|-------|-------------|
| `ErrUserNotFound` | User does not exist |
| `ErrEmailTaken` | Email already registered |
2. HTTP Error Mapping — how domain errors translate to HTTP responses:
| Domain Error | HTTP Status | Error Code | Message |
|-------------|-------------|------------|---------|
| `ErrInvalidEmail` | 400 | `VALIDATION_ERROR` | Invalid email format |
| `ErrEmailTaken` | 409 | `CONFLICT` | Email already registered |
| `ErrInvalidCredentials` | 401 | `UNAUTHORIZED` | Invalid credentials |
| _(unhandled)_ | 500 | `INTERNAL_ERROR` | An unexpected error occurred |
Error codes follow the shared conventions in the parent api/AGENTS.md. Domain errors are service-specific.
Each level provides INCREMENTAL context. Don't repeat what the parent already says.
❌ api/auth/AGENTS.md repeating the full clean architecture explanation
✅ api/auth/AGENTS.md saying "Follows clean architecture (see api/AGENTS.md)"
then showing the SPECIFIC directory structure for auth
Agents parse AGENTS.md for quick context. Optimize for scanning:
--- dividers between major sectionsUse the templates in assets/ as starting points:
{component}/AGENTS.md{component}/{service}/AGENTS.mdIs this a new microservice? → YES, Level 3
Is this a new major component (mobile/, web/)? → YES, Level 2
Is this a subdirectory within a service? → NO, parent covers it
Is this a shared library or package? → MAYBE, if complex enough
Does the directory have unique conventions? → YES
Does it just follow parent conventions? → NO
# Create AGENTS.md for a new service
cp skills/agents-md/assets/service-agents.md api/{service}/AGENTS.md
# Then fill in service-specific details
# Create AGENTS.md for a new component
cp skills/agents-md/assets/component-agents.md {component}/AGENTS.md
# Then fill in component-specific details
# After creating, sync skills if you added skill references
./skills/skill-sync/assets/sync.sh
| Don't | Do | |-------|-----| | Write AGENTS.md in Spanish or mixed languages | Write ALL content in English | | Duplicate parent context verbatim | Reference parent, add incremental details | | List every skill in every AGENTS.md | Only reference skills relevant to scope | | Write paragraphs of explanation | Use tables, code blocks, bullet points | | Include implementation code | Show directory structures and interfaces | | Describe how the code works line by line | Describe WHAT the service does and its boundaries | | Leave AGENTS.md stale after major changes | Update AGENTS.md when architecture changes |
testing
Review Flutter components and screens for UX/UI compliance. Trigger: When user invokes /ux-review command or requests UX audit.
development
TypeScript strict patterns and best practices. Trigger: When implementing or refactoring TypeScript in .ts/.tsx (types, interfaces, generics, const maps, type guards, removing any, tightening unknown).
testing
Testing philosophy and strategy for every feature: test pyramid, mandatory levels per change type, completion checklist, and skill delegation. Trigger: When planning tests for a feature, reviewing test coverage, defining acceptance criteria, or asking what tests a change needs.
development
Terraform security practices: sensitive variables, secret management, state protection, .gitignore patterns, and CI/CD credential handling. Trigger: When handling secrets in Terraform, configuring state backends, reviewing .gitignore for Terraform, or setting up CI/CD pipelines for infrastructure.