agentleFS
VoTruongDanhVoTruongDanh/Skills-Agent/.cursor/rules/instructions.mdc

Skills-Agent / rules

Cursor rule4 starsChanged 33 days agoMITView on GitHub

AI Agent Skills — auto-routing system. Analyzes every request and routes to the correct specialist skill and agent.

We split this instructions.mdc into the rules it gives an agent

10 rules. About 0 are common, 2 are distinctive, and 8 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    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
  1. Distinctive:

    If the message is empty or contains no meaningful content → Respond with a friendly greeting, list the available skills below with one-line …

    line 14
  2. Distinctive:

    If the message is a greeting ("hi", "hello", "hey", "xin chào", "chào") → Respond warmly, briefly list what you can help with (the skills …

    line 15
  3. Very specific:

    If .ai-memory.md exists in project root, read it first for context.

    line 18
  4. Very specific:

    If Codex memory directories exist (memories/, memories/session/, memories/repo/), read relevant notes from memories/repo/.

    line 19
  5. Very specific:

    If .ai-memory.md doesn't exist, create it after completing the first task using the template at the end of this file.

    line 20
  6. Very specific:

    If still unclear → Read .kiro/skills/agents/SKILL.md and use @orchestrator to triage

    line 50
  7. Very specific:

    Run quality checks: Read .kiro/skills/_scripts/checklist.md for cross-cutting checks.

    line 70
  8. Very specific:

    If memories/repo/ exists (Codex layout), mirror the most important 1-3 bullets into a repo memory note.

    line 74
  9. Very specific:

    If you notice duplicates, apply .kiro/skills/_scripts/memory-dedupe.md and merge bullets instead of appending.

    line 75
  10. Very specific:

    If .ai-memory.md exceeds 500 lines or sections exceed limits, apply .kiro/skills/_scripts/memory-compact.md to compact it.

    line 76

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
instructions.mdc
---
description: "AI Agent Skills — auto-routing system. Analyzes every request and routes to the correct specialist skill and agent."
globs: ""
alwaysApply: true
---

## AI Agent Skills — System Bootstrap

This project uses an **AI Skills system** with 16 skills, 11 specialist agents, and a memory protocol.

### On EVERY request, follow this flow:

0. **Validate input**:
   - If the message is empty or contains no meaningful content → Respond with a friendly greeting, list the available skills below with one-line descriptions, and ask what the user would like to work on. Do NOT proceed to classification.
   - If the message is a greeting ("hi", "hello", "hey", "xin chào", "chào") → Respond warmly, briefly list what you can help with (the skills below), and ask how you can help. Do NOT proceed to classification.

1. **Read memory**:
   - If `.ai-memory.md` exists in project root, read it first for context.
   - If Codex memory directories exist (`memories/`, `memories/session/`, `memories/repo/`), read relevant notes from `memories/repo/`.
   - If `.ai-memory.md` doesn't exist, create it after completing the first task using the template at the end of this file.

2. **Classify the request** — Match to one of these skills:

   | Command | Skill file to read | When to use |
   |---------|-------------------|-------------|
   | `/brainstorm` | `.kiro/skills/brainstorm/SKILL.md` | Explore options, ideate solutions |
   | `/plan` | `.kiro/skills/plan/SKILL.md` | Create implementation plan with milestones |
   | `/create` | `.kiro/skills/create/SKILL.md` | Build new feature/file/component |
   | `/debug` | `.kiro/skills/debug/SKILL.md` | Fix bugs, analyze errors |
   | `/test` | `.kiro/skills/test/SKILL.md` | Write tests, improve coverage |
   | `/enhance` | `.kiro/skills/enhance/SKILL.md` | Improve existing code without breaking it |
   | `/deploy` | `.kiro/skills/deploy/SKILL.md` | Deployment and release guidance |
   | `/clean` | `.kiro/skills/clean/SKILL.md` | Remove junk files, clean up |
   | `/status` | `.kiro/skills/status/SKILL.md` | Project status summary |
   | `/preview` | `.kiro/skills/preview/SKILL.md` | Preview output/UX before implementing |
   | `/orchestrate` | `.kiro/skills/orchestrate/SKILL.md` | Coordinate multi-step workflows |
   | `/ui-ux-pro-max` | `.kiro/skills/ui-ux-pro-max/SKILL.md` | Advanced UI/UX improvements |
   | `/motion-ui` | `.kiro/skills/motion-ui/SKILL.md` | Motion UI with Framer Motion micro-interactions |
   | `/explain` | `.kiro/skills/explain/SKILL.md` | Explain code, walk through logic, understand architecture |
   | `/integrate` | `.kiro/skills/integrate/SKILL.md` | Integrate provided sample code with minimal impact |

3. **If the request is vague/general** (no clear skill match):
   - "Help me with this project" → Read `.kiro/skills/status/SKILL.md` first, then suggest next steps
   - "Review my code" → Read `.kiro/skills/enhance/SKILL.md` with all agents (not just performance)
   - "I'm stuck" / "What should I do?" → Read `.kiro/skills/status/SKILL.md` then `.kiro/skills/plan/SKILL.md`
   - "Make this better" → Read `.kiro/skills/enhance/SKILL.md`
   - "Explain this code" / "What does this do?" / "giải thích code" → Read `.kiro/skills/explain/SKILL.md`
   - Complaints about code quality ("too long", "messy", "sao dài quá", "rối quá") → Read `.kiro/skills/enhance/SKILL.md` or `.kiro/skills/clean/SKILL.md`
   - Any multi-step or complex request → Read `.kiro/skills/orchestrate/SKILL.md`
   - If still unclear → Read `.kiro/skills/agents/SKILL.md` and use @orchestrator to triage

4. **Load the agent**: Each skill specifies agents. To load an agent persona, read its file:

   | Agent handle | File to read |
   |-------------|-------------|
   | `@debugger` | `.kiro/skills/agents/agents/debugger.md` |
   | `@backend-specialist` | `.kiro/skills/agents/agents/backend-specialist.md` |
   | `@frontend-specialist` | `.kiro/skills/agents/agents/frontend-specialist.md` |
   | `@database-architect` | `.kiro/skills/agents/agents/database-architect.md` |
   | `@security-auditor` | `.kiro/skills/agents/agents/security-auditor.md` |
   | `@devops-engineer` | `.kiro/skills/agents/agents/devops-engineer.md` |
   | `@test-engineer` | `.kiro/skills/agents/agents/test-engineer.md` |
   | `@performance-optimizer` | `.kiro/skills/agents/agents/performance-optimizer.md` |
   | `@documentation-writer` | `.kiro/skills/agents/agents/documentation-writer.md` |
   | `@orchestrator` | `.kiro/skills/agents/agents/orchestrator.md` |
   | `@project-planner` | `.kiro/skills/agents/agents/project-planner.md` |

5. **Execute the skill workflow** — Follow the steps in the SKILL.md file.

6. **Run quality checks**: Read `.kiro/skills/_scripts/checklist.md` for cross-cutting checks.

7. **Update memory**:
   - Save findings to `.ai-memory.md` using the **Memory Compaction Rules** in `.ai-memory.md` (short bullets, dedupe, enforce section limits).
   - If `memories/repo/` exists (Codex layout), mirror the most important 1-3 bullets into a repo memory note.
   - If you notice duplicates, apply `.kiro/skills/_scripts/memory-dedupe.md` and merge bullets instead of appending.
   - If `.ai-memory.md` exceeds 500 lines or sections exceed limits, apply `.kiro/skills/_scripts/memory-compact.md` to compact it.

### .ai-memory.md Template (create if not exists)

```markdown
# Project Memory

## Tech Stack
- Language: (detected)
- Framework: (detected)
- Database: (if any)
- Package manager: (detected)

## Architecture
- Pattern: (detected)
- Key directories: (discovered)

## Decisions
- (date) Decision and rationale

## Known Issues
- (none yet)

## Recent Work
- (none yet)
```

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

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.