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.
git clone --depth 1 https://github.com/zoxknez/ai-coding-rulesWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/rules/zoxknez/ai-coding-rules/60-stack-frontend)<a href="https://agentmods.dev/rules/zoxknez/ai-coding-rules/60-stack-frontend"><img src="https://agentmods.dev/badge/rules/zoxknez/ai-coding-rules/60-stack-frontend/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/rules/zoxknez/ai-coding-rules/60-stack-frontend"><img src="https://agentmods.dev/badge/rules/zoxknez/ai-coding-rules/60-stack-frontend.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What 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.1 | $0.00000 | $0.00803 |
| Opus 5.5 | $0.00000 | $0.00321 |
| Sonnet 5.5 | $0.00000 | $0.00161 |
| Haiku 4.5 | $0.00000 | $0.00080 |
Grade A, and why
60-stack-frontend scanned grade A with 1 finding 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 1mo 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
fetch(url, { next: { revalidate: 60 } }); Copies of this mod
1 near-identical copy found in the catalogue:
- 60-stack-frontend — 100% identical, 0 lines differ
How it starts
The opening of the file, as written. The whole thing — 117 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Frontend (TypeScript/React)
Type Safety
- Ban
any— useunknownwith type guards if needed. - Prefer
interfacefor object shapes,typefor unions/intersections. - Use strict TypeScript configuration.
React Style
- Functional components + hooks only — no class components.
- Avoid unnecessary state; prefer reducer/context for complex state.
- Handle all UI states: loading, empty, error, success.
Exports
- Prefer named exports over default exports.
- One component per file for main components.
Performance
- Avoid unnecessary re-renders; memoize only when justified.
- Use dynamic imports for heavy components.
- Prevent N+1 fetches in UI loops.
Accessibility (A11y)
- Buttons must be
<button>elements. - Inputs must have associated labels.
- Use
aria-labelfor icon-only buttons. - Ensure keyboard navigation for menus/dialogs.
Next.js 15 App Router (Optional)
Apply when working with Next.js 15+ App Router architecture.
Component Strategy
| Type | When to Use | Directive |
|---|---|---|
| Server Component | Default for all components | None needed |
| Client Component | Event handlers, hooks, browser APIs | 'use client' at top |
Rule: Start with Server Components. Add 'use client' only when you need:
useState,useEffect, or other hooks- Event handlers (
onClick,onChange, etc.) - Browser-only APIs (
window,localStorage, etc.)
Data Fetching Patterns
Parallel Fetching (Avoid Waterfalls)
// ❌ BAD: Sequential (waterfall) — slow
const user = await getUser();
const posts = await getPosts();
const comments = await getComments();
// ✅ GOOD: Parallel — fast
const [user, posts, comments] = await Promise.all([
getUser(),
getPosts(),
getComments()
]);
Server Actions for Mutations
// ✅ Preferred: Server Action
async function createPost(formData: FormData) {
'use server';
const title = formData.get('title');
// Validation, DB insert, etc.
revalidatePath('/posts');
}
// Usage in component
<form action={createPost}>
<input name="title" />
<button type="submit">Create</button>
</form>
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.
- 1mo ago First seen · 117 lines · 0 tokens per session scan A 6fbbd8e43d59
60-stack-frontend is a cursor rule published in the GitHub repository zoxknez/ai-coding-rules (29 stars, last pushed 5mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 803 tokens. A static security scan graded it A with 1 finding (makes network calls). 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
django-python
Rules for writing Python services at PostHog (Python servers powered by the Django framework).
rust
Rules for writing Rust services at PostHog. Focuses on writing async Rust with Tokio and encoding general Rust best practices from the Rust book and docs.
react-typescript
Rules for writing frontend code at PostHog (mostly React + Typescript with Kea).
react-typescript
Rules for writing frontend code at PostHog (mostly React + Typescript with Kea).
ai-agent-specialist
Cursor rules for TypeScript, React, Node.js, clean architecture, testing, and WHY-oriented engineering guidance.
react-chakra-ui---typescript-usage
Guidance for using TypeScript with Chakra UI components in React. It covers typed component props, custom themes, editor support, and avoiding the unsafe any type.