Enforces mandatory rule fetching before every response and code change in Cursor IDE
This skill enforces a strict workflow in Cursor IDE that requires fetching and applying project-specific rules before every AI response or code modification.
This skill establishes a mandatory rule-checking protocol that ensures all AI responses and code changes comply with project-specific guidelines. It requires the AI assistant to fetch rules dynamically at multiple checkpoints throughout development.
**You MUST call `fetch_rules` before EVERY action. No exceptions.**
1. **At conversation start** - Always fetch rules when a new conversation begins
2. **Before EVERY user request** - Fetch rules before processing any user input
3. **Before ANY code changes** - Never modify code without first fetching applicable rules
4. **When topic changes** - Fetch rules again if the conversation shifts to a different feature or area
5. **During active conversations when**:
- User mentions a new feature or component
- File type changes (e.g., switching from .py to .tsx)
- Task type changes (e.g., from debugging to adding features)
1. **Fetch rules** using the `fetch_rules` command/tool
2. **Check ALL matching rules**:
- General guidelines (ALWAYS apply these)
- Feature-specific rules (if working on a particular feature)
- File type rules (based on file extensions like .py, .mdc, .tsx, etc.)
3. **Apply rules** - Let rules override your general knowledge
4. **Proceed** - Only after applying all relevant rules, proceed with the response or code change
**Project rules ALWAYS override your base knowledge.** If a project rule conflicts with general best practices, follow the project rule.
```
User: "I need to add a new API endpoint"
Assistant: [Calls fetch_rules] → [Reviews general, API, and backend rules] → Responds with compliant approach
```
```
User: "Actually, let's work on the frontend instead"
Assistant: [Calls fetch_rules again] → [Reviews general, frontend, and React rules] → Responds with compliant approach
```
```
User: "Now let's update the Python data processing script"
Assistant: [Calls fetch_rules again] → [Reviews general and .py file rules] → Responds with compliant approach
```
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/elemental-cursor-rules-dynamic-rule-fetching/raw