Editor Rules
How to use Ultracite with Cursor, Windsurf or Zed.
Ultracite provides seamless integration with modern AI-powered code editors by automatically generating editor-specific rule files. These rules help guide AI assistants to write better, more consistent code that follows best practices.
The editor rules work alongside Biome's linting and formatting. While Biome handles code formatting and catches syntax errors, the editor rules guide AI assistants to write better code from the start, reducing the need for fixes later.
This dual approach ensures both automated code quality (through Biome) and intelligent code generation (through editor rules).
Setup
Automatic Setup
When you run npx ultracite init
, you'll be prompted to select which editor rules you want to enable:
? Which editor rules do you want to enable (optional)?
◯ GitHub Copilot (VSCode)
◯ Cursor
◯ Windsurf
# ... etcetera
This will create the relevant file in your project directory.
Manual Setup
If you want to manually create the rules file, you can do so by creating the relevant file in your project directory e.g. .cursor/rules/ultracite.mdc
for Cursor, .rules
for Zed, etc.
Then, copy and paste this content into the file.
Supported Editors
Editor | Rule File Location |
---|---|
GitHub Copilot | .github/copilot-instructions.md |
Cursor | .cursor/rules/ultracite.mdc |
Windsurf | .windsurf/rules/ultracite.md |
Zed | .rules |
Claude Code | .claude/CLAUDE.md |
OpenAI Codex | AGENTS.md |
Kiro IDE | .kiro/steering/ultracite.md |
Cline | .clinerules |
AMP | AGENT.md |
Aider | ultracite.md |
Firebase Studio | .idx/airules.md |
Open Hands | .openhands/microagents/repo.md |
Gemini CLI | GEMINI.md |
Junie | .junie/guidelines.md |
Augment Code | .augment/rules/ultracite.md |
Kilo Code | .kilocode/rules/ultracite.md |
Codename Goose | .goosehints |
Benefits
Using Ultracite editor rules provides several advantages:
- Consistency: All AI-generated code follows the same conventions
- Quality: Rules enforce best practices and prevent common mistakes
- Accessibility: Built-in accessibility guidelines ensure inclusive code
- Performance: Rules promote efficient patterns and avoid anti-patterns
- Security: Guidelines help prevent common security vulnerabilities
Customization
While the default rules are comprehensive, you can customize them for your specific needs:
- Modify existing rules: Edit the rule files directly
- Add project-specific rules: Append additional guidelines
- Disable rules: Remove or comment out rules that don't apply to your project