@bashh0409/agentsmd
v0.1.0
Published
Scaffold, validate, and sync AI agent context files (CodingAgent.md / AGENTS.md)
Maintainers
Readme
agentsmd
Scaffold, validate, and sync AI agent context for your app. Author context in CodingAgent.md (or AGENTS.md), then sync so Cursor and other tools load it automatically.
Quick start
npm install
npm run build
npm link # optional: use `agentsmd` globally
cd your-app
agentsmd init
# Edit CodingAgent.md with your product, stack, commands, conventions
agentsmd sync
agentsmd doctorCommands
| Command | Description |
|---------|-------------|
| agentsmd init | Create CodingAgent.md from template |
| agentsmd sync | Write AGENTS.md and .cursor/rules/app-context.mdc |
| agentsmd sync --no-cursor | Skip Cursor rule; only update AGENTS.md |
| agentsmd validate | Check sections, size, @file references |
| agentsmd doctor | Setup checklist (files present, in sync) |
| agentsmd show | List discovered context files |
| agentsmd print | Output merged markdown (for scripts / MCP) |
How context is discovered
From your current directory up to the git root (or cwd), agentsmd collects:
CodingAgent.md(preferred authoring name)AGENTS.md(standard name read by Cursor)
Nested folders merge root → leaf; deeper files add more specific guidance.
Programmatic API
import { loadContext, syncContext, validateContext } from "agentsmd";
const ctx = loadContext("/path/to/project");
if (ctx) {
console.log(ctx.markdown); // inject into your agent / MCP
}Recommended workflow
agentsmd init— oneCodingAgent.mdat repo root- Fill in Product, Stack, Commands, Architecture, Conventions, Guardrails, Workflow
agentsmd sync— keepsAGENTS.md+ Cursor rule in syncagentsmd validatein CI (use--strictto fail on warnings)- Add nested
CodingAgent.mdin monorepo packages when rules differ
License
MIT
