Free tool
Rules file converter
Write a rule once and use it in every coding agent your team runs. Paste a rule in any agent's format and get the file path and frontmatter for 11 targets, keeping when the rule applies. Formats checked against each vendor's docs on 2026-10-19. Nothing leaves your browser.
Scope: Only for matching files (src/main/**/*.java, src/main/**/*.kt, src/test/**/*.java, src/test/**/*.kt, src/main/resources/application*.yml, src/main/resources/application*.properties)
Detected from: globs
Convert to
Save as: .cursor/rules/spring-boot.mdc
--- globs: src/main/**/*.java, src/main/**/*.kt, src/test/**/*.java, src/test/**/*.kt, src/main/resources/application*.yml, src/main/resources/application*.properties alwaysApply: false --- - Use constructor injection with final fields; no @Autowired on fields. - Bind configuration to @ConfigurationProperties classes or records instead of scattering @Value. - Use jakarta.* imports, never javax.* for servlet, validation or persistence APIs. - Use records for request and response DTOs; never return JPA entities from controllers. - Validate request bodies with @Valid and Bean Validation annotations. - Handle errors in a @RestControllerAdvice that returns ProblemDetail responses. - Put @Transactional on service methods, not controllers or repositories. - Use RestClient for outgoing HTTP calls instead of RestTemplate. - In tests, use @MockitoBean (not @MockBean), slice tests such as @WebMvcTest or @DataJpaTest, and Testcontainers for real databases.
Format source: Cursor docs.
How scope maps between agents
| When it applies | Cursor .mdc | Claude Code | GitHub Copilot | Kiro | Antigravity / Devin |
|---|---|---|---|---|---|
| Always on | alwaysApply: true | no paths | applyTo: "**" | inclusion: always | trigger: always_on |
| Matching files | globs | paths | applyTo | inclusion: fileMatch | trigger: glob |
| Agent decides | description | (use a Skill) | description (VS Code) | inclusion: auto | trigger: model_decision |
| Manual | no description, no globs | (use a Skill) | neither (VS Code) | inclusion: manual | trigger: manual |
AGENTS.md, GEMINI.md and Codex have no frontmatter: put the file in the folder it applies to. Zed reads only the first instruction file it finds, so a .cursorrules file wins over AGENTS.md there.
Related
Rules formats keep changing
Get one email a week when a coding agent changes where it reads rules or how it scopes them.