Claude Prompt for Rules & Instructions Files
Generate a narrow, path-scoped rule file that fires only on C++ files in a Electron desktop.
More prompts for Rules & Instructions Files.
Port an existing Continue.dev rules file into the Windsurf format, preserving intent and adapting to Windsurf's capabilities.
Port an existing Codeium rules file into the Windsurf format, preserving intent and adapting to Windsurf's capabilities.
Ready-to-paste Windsurf rules/instructions file tuned for Spring Boot service codebases owned by solo founder. Enforces SQL migrations must be reversible.
Generate a narrow, path-scoped rule file that fires only on Swift files in a Go microservice.
Ready-to-paste Zed Assistant rules/instructions file tuned for VS Code extension codebases owned by 100+ engineer enterprise. Enforces never use default exports -- named only.
Ready-to-paste Windsurf rules/instructions file tuned for Kubernetes operator codebases owned by YC-batch pre-seed team. Enforces use composition over inheritance.
You are a seasoned senior C++ engineer specializing in {{specialty}}. Your work has helped hundreds of {{clientType}} achieve measurable results.
Write a narrowly-scoped rule file -- not a whole-repo ruleset -- that applies only to C++ code in a Electron desktop.
**Target file:** .rules (Zed)
**Scope:** only C++ source files
**Project:** Electron desktop
**Convention in focus:** SQL migrations must be reversible
**Refactor recipe the rule should encourage:** rename symbol across repo
## Why scoped rules
A single monolithic rules file pollutes every AI turn with irrelevant context. Scoped rules (e.g. `.cursor/rules/*.mdc` with `globs`, or a dedicated `CLAUDE.md` imported via `@path`) only load when relevant files are in play. Smaller, precise prompts -> better output.
## Required output
### Header / frontmatter
For Cursor scoped rules (`.mdc`):
```
---
description: <concise purpose>
globs: **/*.{ext1,ext2}
alwaysApply: false
---
```
For Claude Code, use a short `CLAUDE.md` in the relevant subfolder (Claude Code recursively reads CLAUDE.md from the cwd up to the repo root).
### Body (40-80 lines)
1. **Applies to** -- exact glob(s) and a one-line purpose
2. **Hard rules** (5-8 imperatives) specific to C++ in a Electron desktop:
- Each rule cites the footgun it prevents
- Include at least one rule enforcing SQL migrations must be reversible
- Include at least one rule that nudges toward the rename symbol across repo refactor when appropriate
3. **Preferred idioms** with one-line code shape examples (describe the shape, do not paste real code unless short)
4. **Forbidden idioms** with the wrong shape shown
5. **Testing note** -- which Go testing + Testify patterns match these files
6. **Escape hatch** -- when a human should override the rule (and how to signal it in a comment)
## Style
- Every bullet is an imperative
- No prose paragraphs longer than 2 sentences
- No "we recommend" -- use "do" / "do not"
- Use precise technical terminology appropriate for the audience
- Include code examples, configurations, or specifications where relevant
- Document assumptions, prerequisites, and dependencies
- Provide error handling and edge case considerations
Provide a ready-to-use template with placeholder markers {{like_this}} that the user can fill in. Include instructions for each placeholder.