Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add rules/nerds-odd-e/doughnut/frontend-componentgit clone --depth 1 https://github.com/nerds-odd-e/doughnutWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.00919 |
| Opus 5 | $0.00000 | $0.00460 |
| Sonnet 5 | $0.00000 | $0.00184 |
| Haiku 4.5 | $0.00000 | $0.00092 |
Grade A, and why
frontend-component scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 89 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Frontend Component Rules
File Organization
- Frontend code lives in
frontend/src/. - Test code lives in
frontend/tests/. - Generated backend API code is in
frontend/src/generated/backend.
Core Technologies
- Vue 3 with TypeScript.
- DaisyUI + Tailwind for styling: unprefixed Tailwind utilities (
flex,text-primary, …) anddaisy--prefixed DaisyUI component classes (daisy-btn,daisy-card, …). - Vitest for testing with Playwright browser mode.
- Biome for linting and formatting.
Icons
- Prefer Lucide for normal UI icons via
@lucide/vue(import { IconName } from "@lucide/vue"). Import only the icons each file needs; rely oncurrentColorso icons follow text/theme color. @lucide/vuedefaults to 24x24 via thesizeprop. Use:size="..."and/or Tailwindw-*,h-*, orsize-*on icons.
Naming Conventions
- Component files should use PascalCase, for example
NoteShow.vueorGlobalBar.vue. - Test files should match component names with a
.spec.tssuffix. - Use
.vuefor components and.tsfor TypeScript files.
Component Structure
<script setup lang="ts">
import { computed, onMounted, ref } from "vue"
const props = defineProps<{
value: string
}>()
const emit = defineEmits<{
(e: "update:value", value: string): void
}>()
const loading = ref(false)
const displayValue = computed(() => props.value.toUpperCase())
const handleClick = () => {
emit("update:value", "new value")
}
onMounted(() => {
// ...
})
</script>
<template>
<div class="daisy-component">
<!-- template content -->
</div>
</template>
<style scoped lang="scss">
// scoped styles
</style>
Modals And Dialogs
- Use
Modalfrom@/components/commons/Modal.vuefor modal overlays. It wraps a native<dialog>teleported tobodyand centralizes stacking, ESC, backdrop click, and route-change close. The dim background is the native::backdroppseudo-element. - Put panel content in
#body, optionally#header. Listen for@close_requestto hide the modal, such as parentv-ifor clearing model state. The overlay X is optional viashowCloseButtononModal. - Use
v-ifonModalwhen the dialog opens, or keepModalmounted and drive visibility from props; wireclose_requestand cancel buttons to the same close handler. - Layout variants:
alignToppins the panel to the top of the viewport,sidebar="left" | "right"renders a full-height side panel. UseisPopupfor nested popups viausePopupsso they do not participate in the ESC modal stack. - In tests, the dialog renders inside
document.body. Query the DOM viadocument.querySelector("dialog"),.close-button,.modal-container,.modal-sidebar, or.modal-mask, not the dialog's internal layout wrapper.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 89 lines · 0 tokens per session scan A 544e7330432b
frontend-component is a cursor rule published in the GitHub repository nerds-odd-e/doughnut (49 stars, last pushed 2d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 919 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other cursor rules, from other repositories
webkit-browser
Cursor rule "webkit-browser" from duckduckgo/apple-browsers, covering webkit & browser development guidelines, webview configuration, basic webview setup, user scripts management and tab management.
cypress-e2e-testing-cursorrules-prompt-file
Cursor rules for Cypress development with E2E testing.
vasu-playwright-utils
../../templates/cursor-rules/vasu-playwright-utils.mdc.
dev-browser
Fallback browser automation with persistent Chrome state. Use only when Browser Use is unavailable or blocked.
node-dependencies
Enforce Node.js versioning and package management best practices.
security-standards
Cursor rule "security-standards" from wjgogogo/cursor-rules, covering 安全规范, 核心原则 [p0], 输入验证, xss 防护 and csrf 防护.