Free tool

AI Coding Rules Generator

Generate project instructions for Claude Code, Cursor, AGENTS.md, Gemini CLI and GitHub Copilot.

No AI API. Everything runs in your browser.

Which AI coding tools do you use?

Pick one or more. Each gets its own file in its own format.

Your project

Everything is generated in your browser. Your project details aren't sent to HistChat.

Your files

Choose at least one tool above.

Your file appears here and updates as you change the form. Each tool gets its own format, filename and location.

More utilities for working with AI assistants: all free tools.

Guide

What are AI coding rules?

AI coding agents start every session knowing nothing about your project. An instructions file is a short Markdown document in your repository that they read first: how to build and test, which conventions to follow, and what they must never do. Each tool looks for its own filename in its own place, so a team that uses more than one agent ends up maintaining several near-identical files.

This generator takes one description of the project and writes a separate file for each tool, using that tool's filename, location and section style. It is a deterministic template, not an AI: the same inputs always give the same files, and every line comes from a choice you made.

  1. Pick the AI coding tools you use. Nothing is selected until you choose.
  2. Describe the project, stack, commands and rules. Only what you fill in appears in the output.
  3. Copy or download each file and save it at the path shown under the preview.

One ruleset, multiple coding agents

The five formats differ in filename, location and how they apply. Checked against each vendor's documentation on ; formats change, so confirm against the linked source if something looks off.

Instruction file formats for five AI coding tools and what this tool generates
ToolMain fileTypical locationScopeGenerated by this tool
Claude CodeCLAUDE.mdProject root, or .claude/CLAUDE.mdLoaded from the working directory and every directory above it, then concatenated. Files in subdirectories load when Claude works on a file there.Project file (not .claude/rules or CLAUDE.local.md)
AGENTS.md (Codex and others)AGENTS.mdRepository root; optionally one per packageRepository root; monorepo packages may add their own. The closest AGENTS.md to the edited file wins, and an explicit chat prompt overrides everything.Root file
Cursorproject.mdc.cursor/rules/ folderAlways Apply, or auto-attached when a file matching your globs is in context. Rules live in .cursor/rules and are version-controlled..mdc rule: Always Apply or specific files
Gemini CLIGEMINI.mdProject root; global copy in ~/.gemini/Global ~/.gemini/GEMINI.md plus files found in your workspace directories and their parents; everything found is concatenated and sent with every prompt.Project file
GitHub Copilotcopilot-instructions.md.github/ folderRepository-wide: applies to Copilot requests in the repository. Path-specific .github/instructions/*.instructions.md files can be added alongside it.Repository-wide file (not path-specific files)

CLAUDE.md generator

Claude Code loads CLAUDE.md from your working directory and every directory above it, concatenating them rather than overriding. Files in subdirectories load when Claude works on a file there. Files can import others with @path/to/file up to four hops deep, and /init can draft a starter file from your codebase.

Anthropic's guidance is specific and short: under 200 lines, concrete instructions such as “Run npm test before committing” rather than “test your changes”, grouped under headings. The generated file therefore leads with commands, keeps rules as one-line bullets, and warns you if it passes 200 lines.

AGENTS.md generator

AGENTS.md is not tied to one vendor. It is an open, plain-Markdown format with no required fields, now stewarded by the Agentic AI Foundation, and read by Codex, Cursor, GitHub Copilot and many other agents. The closest file to the code being edited wins, and an explicit instruction in chat overrides everything.

The generated file uses the section names the AGENTS.md site suggests: project overview, build and test commands, code style, testing instructions, security considerations and commit guidelines. Codex stops adding instruction files once the combined size reaches 32 KiB by default, so keep it lean. This tool generates the root-level file; nested per-package files are up to you.

Cursor rules generator

Cursor's current system is Project Rules: .mdc files in .cursor/rules with description, globs and alwaysApply in the frontmatter. With alwaysApply: true the rule is always included. With alwaysApply: false and a comma-separated globs value it attaches when a matching file is in context. Cursor ignores a plain .md file in that folder.

The generator writes .cursor/rules/project.mdc as Always Apply by default, or scoped to the file patterns you enter. Cursor recommends keeping a rule under 500 lines, and the tool flags it if you go over.

What about the old .cursorrules file?

Cursor's help page describes the .cursorrules file in the project root as legacy and says it will be deprecated; it points to Project Rules instead. To migrate, create a new rule, paste the old content, set it to Always Apply and delete .cursorrules. Cursor has not published a removal date. This tool only writes the current format.

GEMINI.md generator

Gemini CLI's default context file is GEMINI.md, with a global copy at ~/.gemini/GEMINI.md. It gathers files from your workspace directories and their parents, concatenates everything it finds and sends it with every prompt. Imports use @file.md, and the file name can be changed with context.fileName in settings.json, for example to read AGENTS.md.

Google's example is plain Markdown that begins with a # Project: heading, followed by General Instructions and Coding Style, and the generated file follows that shape. Google's Gemini CLI site also notes that unpaid-tier and Google One users moved to Antigravity CLI on June 18, 2026.

GitHub Copilot instructions generator

Repository-wide Copilot instructions go in .github/copilot-instructions.md, written as Markdown. GitHub advises short, self-contained statements that apply to most requests, because they are sent with every chat message. Path-specific files in .github/instructions use an applyTo glob; they are not generated here.

Which Copilot features also read AGENTS.md, CLAUDE.md or GEMINI.md varies by surface, and GitHub maintains a support table. The generated file uses GitHub's own sample headings: Project Overview, Libraries and Frameworks and Coding Standards.

What should you put in an AI coding instructions file?

  • Exact commands. Install, build, test, lint and typecheck. Agents run what you list, so leave out anything you are not sure of.
  • Stack and structure. Language, framework, package manager and database, so the agent stops guessing.
  • Specific conventions. “Use 2-space indentation” beats “format code properly”.
  • Hard boundaries. Secrets, generated files, destructive database operations and git history.
  • Only what is not obvious from the code. A linter is a better home for a full style guide.

These files guide an agent; they do not enforce anything. Treat them as context, and use tests, linters and permissions for the rules that must never be broken.

Sources

Frequently asked questions

What is CLAUDE.md?
CLAUDE.md is the Markdown file Claude Code reads for project instructions: build commands, conventions, project layout and “always do X” rules. It usually lives in the project root (./.claude/CLAUDE.md also works). Anthropic recommends keeping it under 200 lines, and says Claude treats it as context rather than enforced configuration.
What is AGENTS.md?
AGENTS.md is an open format, described as a “README for agents”: plain Markdown with no required fields, placed at the root of a repository. It is now stewarded by the Agentic AI Foundation under the Linux Foundation and is read by tools such as Codex, Cursor and GitHub Copilot. In a monorepo, the closest AGENTS.md to the edited file wins.
What's the difference between CLAUDE.md and AGENTS.md?
CLAUDE.md is Claude Code's own file; AGENTS.md is a shared format many tools read. Claude Code reads AGENTS.md only when no CLAUDE.md exists in the working directory or above. To keep one source of truth, start your CLAUDE.md with the line @AGENTS.md and add Claude-specific notes underneath.
Where should Cursor rules go?
Project Rules live in .cursor/rules as .mdc files, and Cursor ignores a plain .md file there. The tool generates .cursor/rules/project.mdc with the frontmatter fields description and alwaysApply, plus globs if you scope the rule to specific files.
Does Gemini CLI use GEMINI.md?
Yes. GEMINI.md is the default context file name, with a global copy at ~/.gemini/GEMINI.md and project files found in your workspace directories and their parents. You can change the name with context.fileName in settings.json, for example to read AGENTS.md. Google's Gemini CLI site also notes that Gemini CLI was replaced by Antigravity CLI for unpaid-tier and Google One users on June 18, 2026, so check which tool you run.
Where do GitHub Copilot repository instructions go?
In a file named .github/copilot-instructions.md in the repository root, written as Markdown. GitHub also supports path-specific .instructions.md files under .github/instructions with an applyTo glob; this tool generates only the repository-wide file.
Can I use the same rules across multiple AI coding tools?
Yes, that is the point of the tool. You describe the project once and it writes a separate file for each tool you pick, using each tool's own filename, location and section style. Several tools can also read AGENTS.md, so that file is often a good shared base.
Is my project information uploaded?
No. The files are generated in your browser by plain code, with no AI model and no server call. What you type is not sent to HistChat, not stored, not placed in the page address and not included in analytics. It disappears when you reload or close the page.

More free tools: MCP Config Generator, AI Token Counter and AI Chat to Markdown Converter.