ai-context-engineering-for-frontend / rules
Cursor rule2 starsChanged 8 months agoUnlicenseView on GitHub
Frontend Context Engineering — project context for Cursor IDE
- Reads credentials
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 4,144 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 repository70 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- .cursor/rules/01b-component-gen-next.mdcCursor rule
- .cursor/rules/01-component-gen.mdcCursor rule
- .cursor/rules/02-component-tests.mdcCursor rule
- .cursor/rules/03b-vue-doctor.mdcCursor rule
- .cursor/rules/03-react-doctor.mdcCursor rule
- .cursor/rules/04-ui-tweak.mdcCursor rule
- .cursor/rules/05-refactor.mdcCursor rule
- .cursor/rules/06-frontend-code-review.mdcCursor rule
- .cursor/rules/07-fe-repo-scout.mdcCursor rule
- .cursor/rules/08-be-repo-scout.mdcCursor rule
- .cursor/rules/09-web-vitals.mdcCursor rule
- .cursor/rules/10-browser-check.mdcCursor rule
- .cursor/rules/11-api-bind.mdcCursor rule
- .cursor/rules/12-e2e-tests.mdcCursor rule
- .cursor/rules/13-api-mocks.mdcCursor rule
- agents-checkerSkill
- api-bindSkill
- api-mocksSkill
- be-repo-scoutSkill
- browser-checkSkill
- component-gen-nextSkill
- component-genSkill
- component-testsSkill
- curate-lessonsSkill
- e2e-testsSkill
- fe-repo-scoutSkill
- fix-markdownSkill
- frontend-code-reviewSkill
- init-agentSkill
- init-projectSkill
- init-skillSkill
- prSkill
- react-doctorSkill
- refactorSkill
- setup-configsSkill
- skill-auditSkill
- spec-auditSkill
- ui-tweakSkill
- update-ai-setupSkill
- vue-doctorSkill
- web-vitalsSkill
- agents-checkerSkill
- api-bindSkill
- api-mocksSkill
- be-repo-scoutSkill
- browser-checkSkill
- component-gen-nextSkill
- component-genSkill
- component-testsSkill
- curate-lessonsSkill
- e2e-testsSkill
- fe-repo-scoutSkill
- fix-markdownSkill
- frontend-code-reviewSkill
- init-agentSkill
- init-projectSkill
- init-skillSkill
- The first 60 shown.
The file
We split this 00-project-context.mdc into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
ALWAYS prioritize the context defined in CLAUDE.md and .claude/frontend_agent.md.
≈ “Common” is an estimate: at least 1 in 5 of the 6,668 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: Frontend Context Engineering — project context for Cursor IDE alwaysApply: true --- # Frontend Context Engineering ALWAYS prioritize the context defined in `CLAUDE.md` and `.claude/frontend_agent.md`. ## Context - **Project:** AI Context Engineering Template for Vue 3 / React 18 - **Role:** Frontend Lead (Orchestrator) - **Frameworks:** React 18 + Vue 3 (both supported via framework parameter) - **Documentation:** in English > **Tech Stack, Core Principles, Safety Protocols:** see `CLAUDE.md` at root (SSOT) ## Anti-Patterns (BANNED) | Problem | What to do instead | |---------|--------------------| | `: any` or `as any` in TypeScript | Explicit interface or `unknown` | | Business logic in JSX/template | Extract to custom hook or composable | | `useEffect` without deps (React) | Explicit dependency array | | `v-for` without `:key` (Vue) | `:key="item.id"` always | | Hardcoded API URLs | `import.meta.env.VITE_API_BASE_URL` | | Missing loading/error state | All 4 states: loading / error / empty / success | | `div onClick` without role | Use `<button type="button">` | ## Skills (How to Use in Cursor) To run a skill, add the SKILL.md file to context and describe the task. | Task | Add to context | |------|----------------| | Generate component (+ FSD scaffold) | `.claude/skills/component-gen/SKILL.md` | | Bind API | `.claude/skills/api-bind/SKILL.md` | | Write tests + a11y audit | `.claude/skills/component-tests/SKILL.md` | | E2E tests | `.claude/skills/e2e-tests/SKILL.md` | | Explore repo | `.claude/skills/fe-repo-scout/SKILL.md` | | Init project | `.claude/skills/init-project/SKILL.md` | | Explore backend repo | `.claude/skills/be-repo-scout/SKILL.md` | | Browser check (verify running UI) | `.claude/skills/browser-check/SKILL.md` | | Generate Next.js component | `.claude/skills/component-gen-next/SKILL.md` | | Create PR | `.claude/skills/pr/SKILL.md` | ## Workflow ```text /component-gen → /api-bind → /component-tests ``` > Full project context: `CLAUDE.md` > Agent and skills: `.claude/frontend_agent.md`
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
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.

