Skills-Agent / rules
Cursor rule4 starsChanged 33 days agoMITView on GitHub
Improve existing code — refactor, optimize performance, tighten security, or enhance UX. Use when the user wants to make code better without changing its purpose. Triggers: enhance, improve, refactor, optimize, review, cải thiện, tối ưu, nhanh hơn, code dài quá.
We split this enhance.mdc into the rules it gives an agent
13 rules. About 0 are common, 5 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 10
START: Read .ai-memory.md from project root.
- Very specific: line 11
END: Update .ai-memory.md using Memory Compaction Rules with: what changed, impact, tradeoffs, and remaining tech debt.
- Very specific: line 17
If enhancing performance → read .kiro/skills/agents/agents/performance-optimizer.md and apply its knowledge
- Very specific: line 18
If tightening security → read .kiro/skills/agents/agents/security-auditor.md and apply its knowledge
- Very specific: line 19
If improving UI/UX → read .kiro/skills/agents/agents/frontend-specialist.md and apply its knowledge
- Very specific: line 20
If refactoring backend/API → read .kiro/skills/agents/agents/backend-specialist.md and apply its knowledge
- Very specific: line 21
If improving database queries → read .kiro/skills/agents/agents/database-architect.md and apply its knowledge
- Distinctive: line 28
If any answer is unclear, ASK before proceeding.
- Distinctive: line 54
Prefer small, meaningful upgrades over broad rewrites.
- Distinctive: line 55
If performance is discussed, explain where the gain comes from.
- Distinctive: line 56
Avoid changing unrelated files.
- Distinctive: line 57
Always read and update the memory file.
- Very specific: line 65
All code snippets and example files referenced or produced by this skill must be UTF-8 encoded.
≈ “Common” is an estimate: at least 1 in 5 of the 6,350 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
--- description: "Improve existing code — refactor, optimize performance, tighten security, or enhance UX. Use when the user wants to make code better without changing its purpose. Triggers: enhance, improve, refactor, optimize, review, cải thiện, tối ưu, nhanh hơn, code dài quá." encoding: "UTF-8" agents: [performance-optimizer, security-auditor, frontend-specialist] globs: "" alwaysApply: false --- ## Memory Protocol **START**: Read `.ai-memory.md` from project root. Check past enhancements, known pain points, tech debt notes, performance baselines, and architecture decisions. **END**: Update `.ai-memory.md` using **Memory Compaction Rules** with: what changed, impact, tradeoffs, and remaining tech debt. ## Goal Improve an existing implementation without breaking working behavior. ## Agent Routing - If enhancing performance → read `.kiro/skills/agents/agents/performance-optimizer.md` and apply its knowledge - If tightening security → read `.kiro/skills/agents/agents/security-auditor.md` and apply its knowledge - If improving UI/UX → read `.kiro/skills/agents/agents/frontend-specialist.md` and apply its knowledge - If refactoring backend/API → read `.kiro/skills/agents/agents/backend-specialist.md` and apply its knowledge - If improving database queries → read `.kiro/skills/agents/agents/database-architect.md` and apply its knowledge ## Socratic Gate Before enhancing, verify: 1. What specific aspect needs improvement? (performance, security, UX, maintainability?) 2. What is the current pain point or metric? 3. Are there existing tests that must continue to pass? If any answer is unclear, ASK before proceeding. ## Workflow 1. **Read Memory** — Load `.ai-memory.md` for project context and past enhancement history. 2. Understand the current state and pain points. 3. Identify high-impact improvements in quality, maintainability, performance, reliability, or UX. 4. Prioritize improvements by value versus effort. 5. Implement or recommend the top changes. 6. Explain tradeoffs and validation steps. 7. **Quality Gate** — Read `.kiro/skills/_scripts/checklist.md` and verify enhancements don't break existing behavior. 8. **Update Memory** — Save enhancement details and outcomes to `.ai-memory.md`. ## Checklist - [ ] Current state documented - [ ] Pain points identified - [ ] Improvements prioritized by value/effort - [ ] Existing behavior preserved - [ ] Tradeoffs explained - [ ] Tests still passing - [ ] Memory file updated - [ ] Clean code chuẩn (Standard clean code applied) - [ ] Cập nhật đầy đủ tất cả các file liên quan (All related files fully updated) ## Rules - Preserve behavior unless the user asked for a behavior change. - Prefer small, meaningful upgrades over broad rewrites. - If performance is discussed, explain where the gain comes from. - Avoid changing unrelated files; if improvement requires broad refactor, ASK before doing it. - Always read and update the memory file. ## Related Skills - `/debug` → read `.kiro/skills/debug/SKILL.md` — Fix issues found during enhancement - `/test` → read `.kiro/skills/test/SKILL.md` — Verify enhancements don't break things - `/plan` → read `.kiro/skills/plan/SKILL.md` — Plan large-scale refactoring ## Encoding All code snippets and example files referenced or produced by this skill must be UTF-8 encoded. When applicable, include `encoding: "UTF-8"` in SKILL.md front-matter and ensure saved files use UTF-8 (no BOM).
Where files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.
Of the Cursor rule files we read, the 3,978 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository96 other files it gives its agents.
- .cursor/rules/agents.mdcCursor rule
- .cursor/rules/brainstorm.mdcCursor rule
- .cursor/rules/clean.mdcCursor rule
- .cursor/rules/create.mdcCursor rule
- .cursor/rules/debug.mdcCursor rule
- .cursor/rules/deploy.mdcCursor rule
- .cursor/rules/explain.mdcCursor rule
- .cursor/rules/instructions.mdcCursor rule
- .cursor/rules/integrate.mdcCursor rule
- .cursor/rules/motion-ui.mdcCursor rule
- .cursor/rules/orchestrate.mdcCursor rule
- .cursor/rules/plan.mdcCursor rule
- .cursor/rules/preview.mdcCursor rule
- .cursor/rules/status.mdcCursor rule
- .cursor/rules/test.mdcCursor rule
- .cursor/rules/ui-ux-pro-max.mdcCursor rule
- agentsSkill
- brainstormSkill
- cleanSkill
- createSkill
- debugSkill
- deploySkill
- enhanceSkill
- explainSkill
- integrateSkill
- motion-uiSkill
- orchestrateSkill
- planSkill
- previewSkill
- statusSkill
- testSkill
- ui-ux-pro-maxSkill
- agentsSkill
- brainstormSkill
- cleanSkill
- createSkill
- debugSkill
- deploySkill
- enhanceSkill
- explainSkill
- integrateSkill
- motion-uiSkill
- orchestrateSkill
- planSkill
- previewSkill
- statusSkill
- testSkill
- ui-ux-pro-maxSkill
- agentsSkill
- brainstormSkill
- cleanSkill
- createSkill
- debugSkill
- deploySkill
- enhanceSkill
- explainSkill
- integrateSkill
- motion-uiSkill
- orchestrateSkill
- planSkill
- The first 60 shown.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

