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/dafthunk-com/dafthunk/05-web-developmentgit clone --depth 1 https://github.com/dafthunk-com/dafthunkWhat 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.01322 |
| Opus 5 | $0.00000 | $0.00661 |
| Sonnet 5 | $0.00000 | $0.00264 |
| Haiku 4.5 | $0.00000 | $0.00132 |
Grade A, and why
05-web-development 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 — 175 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Web application
Guidelines
- Always write complete, functional components using
tsxwith a namedexport function Component. - Use Tailwind CSS classes for styling and accessibility best practices.
- Prefer
shadcn/uiandlucide-reactif appropriate. - All code should work in a Vite + React + TypeScript setup.
- Include only one file per code block. Avoid multi-file outputs.
- Use Vitest for testing; include test blocks where relevant.
- Use
import typewhen importing types from libraries. - Avoid dynamic imports, external APIs, or CDN usage unless requested.
- Escaped JSX characters like
<,>,{, and}must be in string literals.
Code block structure
Use the following format for code blocks:
export function Component() {
// your component here
}
Examples
Good Example: React component using Tailwind and shadcn/ui
import { Button } from "@/components/ui/button"
export function Component() {
return <Button className="text-primary">Click me</Button>
}
Bad Example: Missing export, bad styling, incorrect file structure
function Button() {
return <button style={{ color: 'blue' }}>Click</button>
}
// Missing `export default`
// Uses inline styles instead of Tailwind
// No project/file/type metadata
Good Example: Test file using Vitest
import { describe, it, expect } from "vitest"
import { add } from "./add"
describe("add", () => {
it("adds two numbers", () => {
expect(add(2, 3)).toBe(5)
})
})
Bad Example: Jest used instead of Vitest
import { test, expect } from "@jest/globals"
test("adds numbers", () => {
expect(add(2, 3)).toBe(5)
})
// This is incorrect because the project uses Vitest, not Jest
React Loading State Best Practices with SWR
When fetching data in React components, use the library SWR (stale-while-revalidate) for its benefits in caching, revalidation, and focus tracking. The primary approach should be to consolidate related data fetching for a view into a single useSWR call.
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 · 175 lines · 0 tokens per session scan A debf57b6f5b9
05-web-development is a cursor rule published in the GitHub repository dafthunk-com/dafthunk (119 stars, last pushed 6d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,322 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
frontend-architecture
Vite + React SPA architecture - directory layout, providers, bundle splitting. Tailwind styling in tailwind.mdc.
on-load-rule
This guide outlines the critical development principles for this Swift project.
analyze-pr-changes
Comprehensive analysis of Pull Request changes.
project-rules
Cursor rule "project-rules" from Ahmet-Ruchan/ML-Engineer-RoadMap, covering 🏗️ 1. general structure, 🧩 2. technology stack, ⚙️ 3. core principles, 🗄️ 4. database rules and core tables.
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.
dev-standard
Apache Superset development standards and guidelines for Cursor IDE.