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/tomasz-tomczyk/crit/frontend-architecturegit clone --depth 1 https://github.com/tomasz-tomczyk/critWrote 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/tomasz-tomczyk/crit/frontend-architecture)<a href="https://agentmods.dev/rules/tomasz-tomczyk/crit/frontend-architecture"><img src="https://agentmods.dev/badge/rules/tomasz-tomczyk/crit/frontend-architecture.svg" alt="Measured on agentmods" 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 | $0.00004 | $0.01254 |
| Opus 5 | $0.00002 | $0.00627 |
| Sonnet 5 | $0.00001 | $0.00251 |
| Haiku 4.5 | $0.00000 | $0.00125 |
Grade A, and why
frontend-architecture 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 4d 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 — 117 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Frontend Architecture
Two-Paradigm Page Fork
index.html serves both modes from a single HTML shell. A script block at load time checks window.location.pathname:
/live→ live mode (iframe-based pin review)- Everything else → code-review mode (file tree + diff/document views)
Each mode dynamically loads its own script set. They share: theme pill, settings overlay, and extracted modules.
Module Pattern
All custom JS uses the IIFE + dual-export pattern:
(function () {
'use strict';
// ... implementation ...
var api = { publicFn1, publicFn2 };
if (typeof window !== 'undefined') {
window.crit = window.crit || {};
window.crit.<namespace> = api;
}
if (typeof module === 'object' && module.exports) {
module.exports = api;
}
})();
- Runtime: accessed via
window.crit.<namespace> - Tests: required via
module.exports(Node.js--test) - Never use ES modules (
import/export) — no build step exists
Shared Modules (used by both modes)
| Module | Namespace | Purpose |
|---|---|---|
crit-shared.js |
window.crit.shared |
Cookie helpers, theme, tip rotation, image upload |
crit-renderer.js |
window.crit.renderer |
ContentRenderer registry (register/deregister/current) |
crit-sse.js |
window.crit.sse |
SSE client factory (createSSE) |
crit-draft.js |
window.crit.draft |
Autosave drafts to localStorage |
crit-comment-templates.js |
window.crit.commentTemplates |
Template bar + saved-snippet CRUD |
crit-comment-form.js |
window.crit.commentForm |
Shared comment form creation |
crit-comment-card.js |
window.crit.commentCard |
Comment card rendering + reply threading |
crit-comment-card-helpers.js |
window.crit.commentCardHelpers |
Author colors, timestamps, markdown rendering |
crit-settings-overlay.js |
window.crit.settingsOverlay |
Settings dialog lifecycle |
crit-settings-panes.js |
window.crit.settingsPanes |
Settings tab content |
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.
- 4d ago First seen · 117 lines · 4 tokens per session scan A 423ec65efa7a
frontend-architecture is a cursor rule published in the GitHub repository tomasz-tomczyk/crit (999 stars, last pushed 2d ago), licensed MIT. It adds 4 tokens to every session and 1,254 once invoked, about $0.0000 per session on Opus 5. 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
cursorrules
Este repo usa Knowledge-Driven Development (KDD). Las reglas completas para cualquier agente de IA (incluido Cursor) estan en .agents/AGENTS.md — leelo antes de escribir codigo.
react
React, TypeScript, and web development best practices for performance optimization.
cdv
How to drive the cdv MCP sidecar (observe, verify, remember, resume).
mcp-tools-readme
Keep README in sync when MCP tools change.
llm-wiki-quality
Quality checks for synthesized wiki content.
about-this-repo
このリポジトリの背景・概要・目的(OCD MCP プロジェクトコンテキスト).