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/yerdaulet-damir/vibe-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/yerdaulet-damir/vibe-coding-rules/decomposition)<a href="https://agentmods.dev/rules/yerdaulet-damir/vibe-coding-rules/decomposition"><img src="https://agentmods.dev/badge/rules/yerdaulet-damir/vibe-coding-rules/decomposition/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/yerdaulet-damir/vibe-coding-rules/decomposition"><img src="https://agentmods.dev/badge/rules/yerdaulet-damir/vibe-coding-rules/decomposition.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.01408 | $0.01408 |
| Opus 5.5 | $0.00563 | $0.00563 |
| Sonnet 5.5 | $0.00282 | $0.00282 |
| Haiku 4.5 | $0.00141 | $0.00141 |
Grade A, and why
decomposition 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 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.
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 — 184 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Decomposition Rules
Files grow. Without a rule, they grow until grep is the only navigation tool. These rules tell you exactly when to split, and how to split safely.
File Size Limits
| LOC range | State | Action required |
|---|---|---|
| 0–400 | Green | None. |
| 400–600 | Yellow | Plan a split. Add # TODO(decompose): A1 — split by ... header. |
| 600+ | Red | Block the merge. Decompose first. |
CI runs python scripts/check_loc.py app/ and fails on any file > 600 LOC.
When to Convert a File into a Package
Convert <file>.py into <file>/ when any is true:
- Crosses 400 LOC and the next change would push it past 500.
- Contains 2+ disjoint sub-domains (image vs video, user vs admin).
- Mixes HTTP handlers with worker handlers.
- Mixes Pydantic schemas + auth deps + route handlers.
- Has 2+ callers each importing only one symbol — the split lines are obvious.
How to Split Safely (Atomic PR Pattern)
-
Create the package.
<file>/__init__.pyis empty for now. -
Move disjoint pieces to sub-files (
a.py,b.py,c.py). -
Re-export old public names from
__init__.py:# services/wallet/__init__.py from .user import WalletUserService from .admin import WalletAdminService # backwards-compat alias for old imports WalletService = WalletUserService __all__ = ["WalletUserService", "WalletAdminService", "WalletService"] -
Run tests — they must pass without changes.
-
Open a follow-up PR to migrate callers off the legacy alias. Once it lands, delete the alias.
Static Data Separation
Static data goes in app/data/ (project-wide) or <domain>/registry.py (domain-local). Never inline:
# ❌ BAD — pricing constants tangled into service file
class AIService:
PRICING = {
"gpt-4o": Decimal("0.005"),
"claude-3-5": Decimal("0.003"),
# ... 80 more lines ...
}
async def generate(self, ...): ...
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 · 184 lines · 1,408 tokens per session scan A 5fa0f6aa26ba
decomposition is a cursor rule published in the GitHub repository yerdaulet-damir/vibe-coding-rules (30 stars, last pushed 5mo ago), licensed MIT. It adds 1,408 tokens to every session, about $0.0056 per session on Opus 5.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-31.
Other cursor rules, from other repositories
skill-dag-runner
Como construir e executar grafos de tasks (DAG) do método DARE com paralelismo lógico via dare-dag.yaml. O Cursor é o executor; o CLI dare é orquestrador.
skill-mcp-server
Padrões DARE para servidores MCP (Model Context Protocol da Anthropic) em TypeScript ou Python. Tools, resources, prompts; transports stdio/SSE/HTTP; validação Zod/Pydantic; autorização por tool; observabilidade; testes; publicação.
skill-nestjs-api
Padrões DARE para APIs REST em NestJS + TypeScript + Prisma + Swagger. Modules, Controllers, Services, DTOs com class-validator, Guards JWT, throttler, exceções globais, Jest + Supertest, OpenAPI auto-gerado.
skill-rails-api
Padrões DARE para APIs em Ruby on Rails 8 — API mode, ActiveRecord, Solid Queue, Solid Cable, Action Cable, strong parameters, services, serializers (Blueprinter/Alba), Devise/JWT, rack-attack, rswag/grape-swagger.
skill-telemetry
Rastreamento de Tokens e Modelos do Cursor utilizados em cada etapa do DARE.
skill-laravel-api
Padrões Globais para Projetos Laravel API (Context Engineering).