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

Skills-Agent / rules

Cursor rule4 starsChanged 33 days agoMITView on GitHub

Build new features, files, components, endpoints, pages, or scripts. Use when the user wants to create something new in the codebase. Triggers: create, build, add, new, scaffold, tạo, thêm mới, tạo trang, tạo API.

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

17 rules. About 0 are common, 8 are distinctive, and 9 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 9

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    START: Read .ai-memory.md from project root.

    line 10
  2. Very specific:

    END: Update .ai-memory.md using Memory Compaction Rules with: what was created, files touched, patterns used, decisions, and follow-ups.

    line 11
  3. Distinctive:

    Create a new implementation cleanly and with minimal disruption.

    line 14
  4. Very specific:

    If creating API/backend → read .kiro/skills/agents/agents/backend-specialist.md and apply its knowledge

    line 17
  5. Very specific:

    If creating UI component/page → read .kiro/skills/agents/agents/frontend-specialist.md and apply its knowledge

    line 18
  6. Very specific:

    If creating database schema/migration → read .kiro/skills/agents/agents/database-architect.md and apply its knowledge

    line 19
  7. Very specific:

    If creating tests → read .kiro/skills/agents/agents/test-engineer.md and apply its knowledge

    line 20
  8. Very specific:

    If creating deployment config → read .kiro/skills/agents/agents/devops-engineer.md and apply its knowledge

    line 21
  9. Distinctive:

    If any answer is unclear, ASK before proceeding.

    line 28
  10. Distinctive:

    Create or update the necessary files only.

    line 34
  11. Distinctive:

    Add brief usage notes, edge cases, and follow-up improvements.

    line 37
  12. Distinctive:

    Prefer incremental changes over large rewrites.

    line 54
  13. Distinctive:

    If tests exist nearby, add or update them when appropriate.

    line 57
  14. Distinctive:

    Avoid changing unrelated files.

    line 58
  15. Distinctive:

    Always read and update the memory file.

    line 59
  16. Very specific:

    After completing, read .kiro/skills/_scripts/checklist.md for cross-cutting quality checks.

    line 62
  17. Very specific:

    All code snippets and example files referenced or produced by this skill must be UTF-8 encoded.

    line 65

≈ “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
create.mdc
---
description: "Build new features, files, components, endpoints, pages, or scripts. Use when the user wants to create something new in the codebase. Triggers: create, build, add, new, scaffold, tạo, thêm mới, tạo trang, tạo API."
encoding: "UTF-8"
agents: [backend-specialist, frontend-specialist, database-architect]
globs: ""
alwaysApply: false
---

## Memory Protocol
**START**: Read `.ai-memory.md` from project root. Check tech stack, coding conventions, existing patterns, architecture decisions, and file structure notes.
**END**: Update `.ai-memory.md` using **Memory Compaction Rules** with: what was created, files touched, patterns used, decisions, and follow-ups.

## Goal
Create a new implementation cleanly and with minimal disruption.

## Agent Routing
- If creating API/backend → read `.kiro/skills/agents/agents/backend-specialist.md` and apply its knowledge
- If creating UI component/page → read `.kiro/skills/agents/agents/frontend-specialist.md` and apply its knowledge
- If creating database schema/migration → read `.kiro/skills/agents/agents/database-architect.md` and apply its knowledge
- If creating tests → read `.kiro/skills/agents/agents/test-engineer.md` and apply its knowledge
- If creating deployment config → read `.kiro/skills/agents/agents/devops-engineer.md` and apply its knowledge

## Socratic Gate
Before creating, verify:
1. What exactly should be created? (component, page, API, script?)
2. Does something similar already exist in the project?
3. What is the expected behavior/output?
If any answer is unclear, ASK before proceeding.

## Workflow
1. **Read Memory** — Load `.ai-memory.md` for project context, conventions, and patterns.
2. Understand the requested artifact and the existing project structure.
3. Identify the smallest complete implementation that satisfies the request.
4. Create or update the necessary files only.
5. Reuse existing patterns, naming, and architecture already present in the repo.
6. Include basic validation and error handling.
7. Add brief usage notes, edge cases, and follow-up improvements.
8. **Update Memory** — Save what was created, patterns used, and follow-up notes to `.ai-memory.md`.

## Checklist
- [ ] Requirement clearly understood
- [ ] Existing patterns/conventions checked
- [ ] Minimal files created/modified
- [ ] Validation and error handling included
- [ ] Project conventions matched (naming, structure)
- [ ] Tests added if test framework exists
- [ ] Usage notes provided
- [ ] 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
- Prefer incremental changes over large rewrites.
- Match the project's conventions.
- Include basic validation and error handling.
- If tests exist nearby, add or update them when appropriate.
- Avoid changing unrelated files; if unsure about side effects, ASK before editing broadly.
- Always read and update the memory file.

## Quality Gate
After completing, read `.kiro/skills/_scripts/checklist.md` for cross-cutting quality checks.

## 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).

## Related Skills
- `/plan` → read `.kiro/skills/plan/SKILL.md` — Plan before creating complex features
- `/test` → read `.kiro/skills/test/SKILL.md` — Write tests for new code
- `/debug` → read `.kiro/skills/debug/SKILL.md` — Fix issues in newly created code

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.

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.