Modular Cursor AI assistant configuration with comprehensive pre-implementation checklist. Enforces systematic codebase analysis before making changes, preventing duplicate code and ensuring architectural consistency.
This skill enforces a comprehensive pre-implementation workflow that prevents code duplication and ensures architectural consistency. Before any code changes, the AI assistant must perform systematic codebase analysis and document findings.
**CRITICAL**: Before writing ANY code or suggesting ANY changes, the assistant MUST complete all three phases below.
Run these searches and document all results:
```bash
grep_search for functionality
file_search for similar files
list_dir in relevant directories
```
Complete this comprehensive analysis template:
```markdown
1. [First step with estimated effort]
2. [Second step with estimated effort]
3. [Additional steps as needed]
```
1. **Always Search Before Creating**: Never create new files without verifying that similar functionality doesn't already exist
2. **Enhance Over Create**: Prefer enhancing existing code to creating new implementations
3. **Document Everything**: Maintain clear documentation of all findings and decisions
4. **Seek Approval**: Get explicit user approval before proceeding with implementation
5. **Prevent Duplication**: Stop code duplication at the planning stage, not during code review
When user requests: "Add user authentication"
**Correct Workflow**:
1. Search for existing auth code (`grep_search "auth"`, `file_search "auth"`)
2. Document findings (found `lib/auth.ts`, `middleware/auth.ts`, `utils/session.ts`)
3. Analyze gaps (missing password reset, has login/logout)
4. Propose enhancement of existing files rather than creating new ones
5. Wait for approval before implementing
**Incorrect Workflow** (violation):
1. ❌ Immediately suggest creating `src/auth/authentication.ts`
2. ❌ Skip searching for existing code
3. ❌ Duplicate functionality that already exists
This rule set works alongside project-specific rules (Next.js, SaaS, e-commerce) by enforcing the pre-implementation checklist regardless of project type. It serves as a foundational workflow that prevents architectural drift and technical debt.
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/cursor-ai-rules-builder/raw