DEV Community

fang liu
fang liu

Posted on

How I Stopped Losing Context with AI Coding Assistants (And Built 6 AGENTS.md Templates to Share)

If you've been using Claude Code, Cursor, or Codex for more than a week, you've hit this wall: the AI forgets what you told it three sessions ago.
Your project has conventions. Preferred libraries. Architecture decisions. But every new chat starts from scratch.
AGENTS.md changes that.
It's a markdown file you drop in your repo root. AI coding tools read it automatically and carry context across sessions — preferred patterns, architecture rules, file naming conventions, anything that matters to your project.
The concept isn't new. Over 60,000 open source projects already use AGENTS.md. But most developers I talked to either:

  • Didn't know it existed
  • Knew it but didn't know what to put in it
  • Tried once, got generic results, gave up I built 6 production-ready templates to solve the last two problems:
  • React + Vite + TypeScript — component patterns, state management, testing conventions
  • Node.js REST API — Express structure, auth middleware, error handling
  • Go Microservices — project layout, dependency injection, testing
  • Python FastAPI — async patterns, Pydantic models, dependency injection
  • Playwright E2E — page object patterns, locator strategy, test data
  • Chrome Extension MV3 — manifest, background scripts, content script patterns Each template is the real thing — patterns I've used in production, not theoretical examples. The free samples (Node.js REST API + Python FastAPI) are on GitHub: → github.com/liufang88789-ui/agentsmd-templates Full bundle ($12) includes all 6 templates plus lifetime updates: → liufang1.gumroad.com/l/agentsmd

Top comments (0)