Open Source

agent-rules

What it is

Open-source, modular instructions for AI coding agents. One source of rules renders into AGENTS.md, CLAUDE.md, Cursor rules, GitHub Copilot instructions, Claude Code skills and Windsurf/Devin formats through a zero-dependency CLI.

I built agent-rules (package name `agentkit-rules`), a set of modular, production-grade instructions for AI coding agents, with an installer that writes each tool's current file format. You pick the stacks you actually use, and one `.mdc` source per rule is rendered into every format so they never drift.

The problem

Every coding agent wants its own rules file: AGENTS.md, CLAUDE.md, Cursor .mdc, Copilot instructions, Claude Code skills, Windsurf and Devin rules. Keeping the same guidance in sync across all of them by hand is tedious, and each format has its own frontmatter and loading rules.

What it does

  • Source rules for TypeScript, Next.js (App Router, server actions, caching), React, Node.js, NestJS, Prisma, Drizzle, Tailwind CSS and shadcn/ui, plus core rules for git, security, testing, accessibility and performance
  • A CLI that detects your stacks from package.json and components.json, then writes AGENTS.md, CLAUDE.md, .cursor/rules/*.mdc, .github/copilot-instructions.md with path-specific instructions, .claude/skills/<name>/SKILL.md, and .devin/rules / .windsurf/rules
  • Marker blocks in merged documents, so re-running the installer updates its own sections and leaves your text alone, with --dry-run, --force with backups, list and validate commands
  • A validator that checks Cursor keys, Copilot applyTo, skill name/description, Windsurf trigger and the 12,000-character workspace rule limit
  • Committed example output for a Next.js SaaS stack and a NestJS API stack

How it's built

TypeScript on Node.js 20.19+, with no runtime dependencies beyond Node itself. Tests use the built-in node --test runner, and CI runs the validator, the test suite and tsc.

Stack

  • TypeScript
  • Node.js
  • AI Agents
  • AGENTS.md
  • CLAUDE.md
  • Cursor
  • Claude Code
  • GitHub Copilot
  • Windsurf
  • CLI
  • Open Source

Gallery