AI Skills
Complete Guide
All Tools
March 2026

The Complete Guide to AI Coding Rules in 2026

Every AI coding tool has its own rules format. This guide covers all of them — SKILL.md, .cursorrules, .windsurfrules, Copilot instructions, GEMINI.md, and Kiro rules.

March 6, 202612 min read

Quick Reference: Rules File by Tool

Claude Code

SKILL.md

Cursor

.cursorrules

Windsurf

.windsurfrules

VS Code Copilot

copilot-instructions.md

Gemini CLI

GEMINI.md

Amazon Kiro

.kiro/rules/*.md

All Formats in Detail

Claude Code

Guide

Rule Files

  • SKILL.md (in .claude/skills/)
  • CLAUDE.md (project root)

Scope

Project or global, per-skill modular

Setup: Create .claude/skills/skill-name.md with frontmatter

---
name: typescript-expert
description: TypeScript strict patterns
---
Always use strict TypeScript...

Cursor

Guide

Rule Files

  • .cursorrules (project root)
  • .cursor/rules/*.md (named rules)

Scope

Project-level, applies to all Cursor AI interactions

Setup: Create .cursorrules in project root

You are a TypeScript expert.
Always use strict mode...

Windsurf

Guide

Rule Files

  • .windsurfrules (project root)
  • Global Rules (Settings UI)

Scope

Project or global, hierarchical directories

Setup: Create .windsurfrules in project root

TypeScript strict mode required.
No any types...

VS Code + GitHub Copilot

Guide

Rule Files

  • .github/copilot-instructions.md
  • Settings → Copilot instructions

Scope

Repository-level

Setup: Create .github/copilot-instructions.md

## Project Instructions
This is a Next.js 15 App Router project...

Gemini CLI

Guide

Rule Files

  • GEMINI.md (project root or ~/.gemini/GEMINI.md for global)

Scope

Project or global

Setup: Create GEMINI.md in project root

# Project Overview
TypeScript Next.js project.
Always use App Router patterns...

Amazon Kiro

Guide

Rule Files

  • .kiro/rules/*.md

Scope

Project-level rule modules

Setup: Create .kiro/rules/ directory with rule files

---
name: security-rules
---
All API routes must authenticate...

Universal Principles for Writing Good AI Rules

Regardless of which tool you use, these principles make rules more effective:

Be specific, not aspirational

✓ Good

Use parameterized queries for all SQL

✗ Avoid

Write secure code

Use imperatives

✓ Good

Always add error handling for async functions

✗ Avoid

Error handling is important

Include anti-patterns

✓ Good

Never use any in TypeScript

✗ Avoid

Use TypeScript correctly

Reference your stack

✓ Good

Use shadcn/ui components from /components/ui/

✗ Avoid

Use a component library

Keep it scannable

✓ Good

Bullet points, headers, grouped by topic

✗ Avoid

Dense paragraphs of instructions

The Multi-Tool Strategy

Many developers use multiple AI tools. Here's how to maintain rules across all of them without duplicating work:

  1. Write your rules once in Markdown format
  2. Create tool-specific wrapper files that reference the same content
  3. Use a shared AI_RULES.md at the project root and import/reference it in each tool's config
  4. Or maintain separate files per tool — they're small and tool-specific tweaks are often needed anyway

What Goes in Rules vs CLAUDE.md / README?

ContentGoes in
What the project is, tech stack, architectureCLAUDE.md / README
Coding conventions and patterns to followRules files (SKILL.md / .cursorrules)
Anti-patterns to avoidRules files
How to run the projectREADME
Team standards for code qualityRules files (committed to git)
API keys and configuration.env files (never in rules)

Frequently Asked Questions

Which AI tool has the best rules support?

Claude Code's SKILL.md system is the most flexible — modular, named skills that you can mix and match. Cursor's .cursorrules is the most widely adopted due to Cursor's popularity. Both are excellent in practice.

Should I create different rules for different team members?

Project rules (committed to git) should apply to everyone. Personal preferences go in global rules (in your tool's settings, not committed). This separation gives consistency where it matters and flexibility where it doesn't.

Start with the Must-Have Skills

Get the complete starter set of AI Skills covering every part of your stack.