brainstorming
Structured design dialogue that validates ideas before implementation begins.
agents-md-authoring-majo
Write effective AGENTS.md files for AI coding agents.
Full skill instructions
Goal: Write effective, high-signal-to-noise AGENTS.md files that outperform skills-based approaches (100% vs 79% pass rate based on Vercel research).
writing-docs-majo)skill-authoring-majo)Write effective AGENTS.md files that outperform skills-based approaches.
Minimize root file; maximize signal-to-noise ratio through strategic structure, not exhaustive documentation.
AGENTS.md is loaded on every agent request. Keep it concise but information-dense.
| Approach | Use When | Performance |
|---|---|---|
| AGENTS.md | Project-specific knowledge, always-needed context, version-matched docs | 100% pass rate |
| Skills | Cross-project patterns, progressive disclosure, large reference material | 79% pass rate |
Key Finding (Vercel Research): AGENTS.md achieved 100% pass rate vs 79% with skills, even with explicit skill invocation instructions.
Why AGENTS.md Wins:
Use AGENTS.md for:
Use Skills for (see skill-authoring-majo):
Structure your AGENTS.md around six key areas (300-800 tokens total):
Exact, copy-paste-ready commands with flags.
## Build Commands
```bash
# Build the package
pnpm build
# Development mode
pnpm dev
# Run tests
pnpm test
**Why**: Agents reference repeatedly; vague instructions create clarification loops.
### 2. Testing (~50 tokens)
Framework, location, coverage minimum, run command.
```markdown
## Testing
Framework: Jest
Location: tests/
Coverage: 80% minimum
Run: pnpm test
Don't include philosophy or lengthy examples.
Strategic hints, not exhaustive paths.
## Project Structure
src/ — Application code (READ)
tests/ — Unit/integration tests
docs/ — Markdown (WRITE)
Agents discover files well; structure drifts. Skip detailed file listings.
One real repo example showing BOTH positive and negative patterns.
## Code Style
```python
# GOOD: Use retry() for polling/waiting
from next_test_utils import retry
await retry(async () => {
const text = await browser.elementByCss('p').text()
expect(text).toBe('expected value')
})
# AVOID: Don't use setTimeout for waiting
await new Promise((resolve) => setTimeout(resolve, 1000))
One example > three paragraphs of description. Show the anti-pattern too.
### 5. Git Workflow (~40 tokens)
Commit format, branch naming, PR requirements.
```markdown
## Git Workflow
Commits: feat(scope): description (Conventional Commits)
Branches: feature/*, bugfix/*, docs/*
PRs: lint ✓, tests ✓, focused diff
Three-tier system: Always/Ask/Never (more effective than flat "don't" lists).
## Boundaries
ALWAYS: Run tests before commits; follow naming conventions
ASK FIRST: Before schema changes; before new dependencies; before CI/CD changes
NEVER: Commit secrets; edit node_modules; remove failing tests without approval
Why three tiers: Eliminates agent ambiguity better than flat lists.
Link to detailed docs instead of inlining:
Detailed patterns: [see docs/api.md §3.2]
Quick reference: Endpoints return { "data": {...}, "error": null }
Use pipe-delimited format for complex concepts. Vercel achieved 80% reduction (40KB → 8KB):
[Docs Index]|root: ./.docs
|01-getting-started:{installation.md,project-structure.md}
|02-api:{routing.md,caching.md}
Extended TOC at top; full sections below. Keeps frequent tasks in focus.
Based on Vercel's Next.js AGENTS.md:
# Project Development Guide
## Quick Start
```bash
# Install dependencies
pnpm install
# Start development
pnpm dev
# Run tests
pnpm test
src/ — Application code tests/ — Test files docs/ — Documentation
pnpm build # Production build
pnpm dev # Development server
pnpm test # Run all tests
pnpm test:watch # Watch mode
Framework: Vitest Location: tests/ Coverage: 80% minimum
// GOOD: Use retry() for polling
await retry(async () => {
expect(await page.text()).toBe('done')
})
// AVOID: Don't use setTimeout
await new Promise(r => setTimeout(r, 1000))
Commits: feat(scope): description Branches: feature/*, bugfix/* PRs: tests pass, lint clean
ALWAYS: Run tests before push; update AGENTS.md after agent mistakes ASK FIRST: Before adding dependencies; before architectural changes NEVER: Commit .env files; modify generated code directly
pnpm buildpnpm types to check
## Nested AGENTS.md (Monorepos)
For monorepos, use nested AGENTS.md files:
project/ ├── AGENTS.md # Global rules ├── packages/ │ ├── backend/ │ │ └── AGENTS.md # Backend-specific │ └── frontend/ │ └── AGENTS.md # Frontend-specific
Agents use the nearest AGENTS.md (like .gitignore). Keeps context tight and relevant.
## Iterative Refinement Process
1. **Start minimal**: Six-core-areas, ~400 tokens
2. **Run agents on real tasks**: Observe mistakes
3. **When agent misunderstands/fails**: Note it
4. **Add clarifying rule/example/boundary to AGENTS.md**
5. **Tell agent**: "I updated AGENTS.md. Given these new rules, refactor accordingly."
6. **Repeat**: Each iteration tightens spec, reduces future mistakes
**Example iterations**:
- Iteration 1: Agent uses old API → Add: "Use v2/users endpoint, not v1/users"
- Iteration 2: Agent skips validation → Add: "Always validate ID format"
- Iteration 3: Agent modifies tests when not asked → Add boundary: "Never modify tests unless explicitly asked"
## Anti-Patterns to Avoid
| Anti-Pattern | Problem | Fix |
|---|---|---|
| Vague rules | Agent asks clarifying questions (wasted tokens) | Be specific: "Never commit secrets" not "Be careful with secrets" |
| Outdated AGENTS.md | Agent ignores stale guidance or hallucinates | Update immediately after mistakes; track in git |
| Monolithic structure | Agent loads irrelevant context every task | Use nested AGENTS.md; progressive disclosure |
| Duplicate docs | Token waste; maintenance burden | Link instead of inlining |
| Abstract examples | Agents don't know how to apply guidance | Use real files: "copy DashForm.tsx" |
| Conflicting rules | Agent uncertain which rule applies | Use Always/Ask/Never tiers, not flat lists |
## Quick Checklist
- [ ] Root ≤ 800 tokens
- [ ] Six-core-areas framework present
- [ ] Three-tier boundaries (Always/Ask/Never)
- [ ] Real code examples (positive & negative)
- [ ] Links to external docs, not duplicates
- [ ] No file structure documentation
- [ ] No vague guidance
- [ ] Updated after every agent mistake
- [ ] Nested AGENTS.md for monorepos (if applicable)
- [ ] Progressive disclosure for large docs
## Testing Skills
- **Token count check**: Ensure root AGENTS.md ≤ 800 tokens (use wc or estimate)
- **Structure verification**: Confirm all 6 core areas are present
- **Boundary clarity**: Check Always/Ask/Never tiers are specific, not vague
- **Real examples test**: Verify code examples actually exist in the repo
- **Link validation**: Ensure linked docs exist and are accessible
- **Agent run test**: Perform a real task, verify agent follows AGENTS.md guidance
- **Iteration tracking**: Document each update and the mistake it fixed
## Integration with Other Skills
This skill extends `dev-standards-majo`. Always ensure `dev-standards-majo` is loaded for:
- AGENTS.md maintenance
- Universal code principles
- Documentation policies
Works alongside:
- `skill-authoring-majo` — For deciding when to use AGENTS.md vs create skills
- `task-planning-majo` — For planning AGENTS.md updates
- `git-majo` — For committing AGENTS.md changes
- `writing-docs-majo` — For writing documentation about AGENTS.md
## References
- Vercel Research: ["AGENTS.md outperforms skills in our agent evals"](https://vercel.com/blog/agents-md-outperforms-skills-in-our-agent-evals) (100% vs 79% pass rate)
- Next.js AGENTS.md: https://github.com/vercel/next.js/blob/canary/AGENTS.md
- agents.md specification: https://agents.md/
Structured design dialogue that validates ideas before implementation begins.
Comprehensive design intelligence for web and mobile UI/UX across 10 technology stacks.
Comprehensive implementation plans for multi-step tasks, breaking down specs into bite-sized, testable steps.
Introduction to the obra skills system with mandatory skill invocation rules and best practices.
Execute a written implementation plan with critical review and task checkpoints.
Delegate independent tasks to specialized agents working concurrently with isolated context.
Isolated git worktrees with smart directory selection and safety verification.
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
Plan searchable and shareable content that drives traffic, builds authority, and generates leads.
README-first repository scanner that extracts commands and classifies reproduction candidates without executing them.
Brainstorm and prioritize marketing strategies tailored to your SaaS stage, budget, and goals.
Plan and optimize your website's page hierarchy, navigation, URL structure, and internal linking.
The world's fastest calendar for remote work
Capture, organize, and utilize your knowledge effortlessly.
Instant Summaries of Audio & Video Interviews with AnySummary
Transform PDFs into engaging mind maps.
Chat with any PDF instantly
Create an optimal daily plan using your voice
A productivity platform to centralize organizational knowledge and workflows with contextual AI assistance.
AskYourPDF Pricing Plans: Tailored to Your Needs