trae-rules-writer
Create Trae IDE rules (.trae/rules/*.md) for AI behavior constraints. Use when user wants to: create a project rule, set up code style guidelines, enforce naming conventions, make AI always do X, or customize AI behavior for specific files. Triggers on: '创建 rule', 'project rule', '.trae/rules/', 'AGENTS.md', 'CLAUDE.md', 'make AI always use PascalCase'. Do NOT use for skills (use trae-skill-writer) or agents (use trae-agent-writer).
Best use case
trae-rules-writer is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Create Trae IDE rules (.trae/rules/*.md) for AI behavior constraints. Use when user wants to: create a project rule, set up code style guidelines, enforce naming conventions, make AI always do X, or customize AI behavior for specific files. Triggers on: '创建 rule', 'project rule', '.trae/rules/', 'AGENTS.md', 'CLAUDE.md', 'make AI always use PascalCase'. Do NOT use for skills (use trae-skill-writer) or agents (use trae-agent-writer).
Teams using trae-rules-writer should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/trae-rules-writer/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How trae-rules-writer Compares
| Feature / Agent | trae-rules-writer | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Create Trae IDE rules (.trae/rules/*.md) for AI behavior constraints. Use when user wants to: create a project rule, set up code style guidelines, enforce naming conventions, make AI always do X, or customize AI behavior for specific files. Triggers on: '创建 rule', 'project rule', '.trae/rules/', 'AGENTS.md', 'CLAUDE.md', 'make AI always use PascalCase'. Do NOT use for skills (use trae-skill-writer) or agents (use trae-agent-writer).
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Trae Rules Writer Create Trae IDE rules by analyzing project conventions first, then designing rules that match existing patterns. ## Workflow ``` 1. ANALYZE → Scan project structure, code style (ls .trae/rules/, cat AGENTS.md) 2. IDENTIFY → What conventions exist? What needs guidance? 3. DESIGN → Choose rule type and application mode 4. CREATE → Write rules in Trae's official format ``` ## Rule Format ```markdown --- description: When to apply this rule (for intelligent mode) globs: "*.ts,*.tsx" alwaysApply: false --- # Rule Title Concise guidance for AI. ``` ## Application Modes | Mode | Frontmatter | Use Case | | ------------------- | -------------------------------- | ----------------------------- | | Always Apply | `alwaysApply: true` | Global conventions (naming) | | File-Specific | `globs: "*.tsx,*.jsx"` | Language-specific rules | | Apply Intelligently | `description: "When doing X..."` | Context-dependent guidance | | Manual Only | (no frontmatter) | Invoke with `#RuleName` | ## Rule Types | Type | Location | Scope | | ------------- | ------------------------- | --------------- | | User Rules | Settings > Rules & Skills | All projects | | Project Rules | `.trae/rules/*.md` | Current project | ## Compatible Files | File | Description | | ----------------- | -------------------------- | | `AGENTS.md` | Reusable across IDEs | | `CLAUDE.md` | Compatible with Claude Code| | `CLAUDE.local.md` | Local-only, gitignored | ## Example ``` User: "Create rules for this TypeScript React project" Analysis: - Structure: src/components/, src/hooks/ - Naming: PascalCase components, camelCase functions - No existing .trae/rules/ Creating: .trae/rules/ 📄 code-style.md --- alwaysApply: true --- # Code Style - PascalCase for components and types - camelCase for functions and variables 📄 react-patterns.md --- globs: "*.tsx,*.jsx" --- # React Patterns - Use functional components with hooks - Custom hooks go in src/hooks/ ``` ## References - [Application Mode Examples](examples/application-modes.md) - Complete examples - [Rule Template](assets/rule.md.template) - Starter template
Related Skills
managing-traefik
Manages Traefik reverse proxy for local development. Use when routing domains to local services, configuring CORS, checking service health, or debugging connectivity issues.
framer-motion-rules
Defines framer motion is being used for animations
cursor-rules-synchronizer
Synchronizes Cursor Rules (.mdc files in .cursor/rules/) to CLAUDE.md by generating a Rules section with context-efficient descriptions and usage instructions. Use when setting up Cursor Rules for the first time, after adding or modifying rules, or when the Rules section in CLAUDE.md is missing or outdated.
cursor-rules-review
Audit Cursor IDE rules (.mdc files) against quality standards using a 5-gate review process. Validates frontmatter (YAML syntax, required fields, description quality, triggering configuration), glob patterns (specificity, performance, correctness), content quality (focus, organization, examples, cross-references), file length (under 500 lines recommended), and functionality (triggering, cross-references, maintainability). Use when reviewing pull requests with Cursor rule changes, conducting periodic rule quality audits, validating new rules before committing, identifying improvement opportunities, preparing rules for team sharing, or debugging why rules aren't working as expected.
content-research-writer
Assists in writing high-quality content by conducting research, adding citations, improving hooks, iterating on outlines, and providing real-time feedback on each section. Transforms your writing process from solo effort to collaborative partnership.
metadata-and-seo-rules
Focuses on optimizing metadata and SEO to improve discoverability of the documentation.
Ad Copy Writer
Write high-converting advertising copy for paid media campaigns
writer
Document creation, format conversion (ODT/DOCX/PDF), mail merge, and automation with LibreOffice Writer.
vercel-kv-database-rules
Defines how to interact with Vercel's KV database for storing and retrieving session and application data.
tone-rewriter
Rewrite text in any of 10 tones (professional, casual, friendly, formal, empathetic, persuasive, academic, simple, witty, urgent) while preserving meaning. x402 pay-per-use: $0.01 USDC. Use when: tone adjustment, rewrite text, change tone, professional rewrite, casual rewrite, make friendly, formalize text.
python-fastapi-scalable-api-cursorrules-prompt-fil
Apply for python-fastapi-scalable-api-cursorrules-prompt-fil. --- description: Defines conventions specific to FastAPI usage in the backend. globs: backend/src/**/*.py
python-django-best-practices-cursorrules-prompt-fi
Apply for python-django-best-practices-cursorrules-prompt-fi. --- description: Configurations for Django settings file with the list of dependencies and conventions. globs: **/settings.py