perf

perf is a cursor rule for Cursor from timurgaleev/vibestack. It costs 329 tokens per session, scanned A, original, MIT.

A set of guidance for choosing model tiers, managing limited conversation context, and handling complex work such as large refactors or difficult debugging. A context window is the amount of conversation and code an AI can consider at once.

In plain words
What is it for?
It supports model selection, context planning, multi-file implementation, large refactors, complex debugging, and build troubleshooting.
Why use it?
It helps avoid losing important information or using an unsuitable model when a task is large or reasoning-heavy.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc). Also seen: mentions subagents.

Good fit It supports model selection, context planning, multi-file implementation, large refactors, complex debugging, and build troubleshooting.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/timurgaleev/vibestack/perf
Install

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.

Clone the repo
git clone --depth 1 https://github.com/timurgaleev/vibestack

Made for: Cursor.

Wrote 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.

agentmods badge for perf

README.md
[![agentmods](https://agentmods.dev/badge/rules/timurgaleev/vibestack/perf/github.svg)](https://agentmods.dev/rules/timurgaleev/vibestack/perf)
Your own site
<a href="https://agentmods.dev/rules/timurgaleev/vibestack/perf"><img src="https://agentmods.dev/badge/rules/timurgaleev/vibestack/perf/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.

agentmods 80×15 button for perf

Your own site · 80×15
<a href="https://agentmods.dev/rules/timurgaleev/vibestack/perf"><img src="https://agentmods.dev/badge/rules/timurgaleev/vibestack/perf.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 329 This file is loaded in full into every session.
When invoked 329 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00329 $0.00329
Opus 5 $0.00164 $0.00164
Sonnet 5 $0.00066 $0.00066
Haiku 4.5 $0.00033 $0.00033

Measured yesterday against content hash 6264dbd94d66, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-20, from the pricing page.

Security

Grade A, and why

perf 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 yesterday.

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.

config/cursor/rules/perf.mdc · 59 lines

What it actually says

Performance Optimization

Model Selection Strategy

Refer to model tiers, not pinned versions, so this guidance stays current as new releases ship. Always prefer the latest model in each tier.

Latest Opus tier (Deepest reasoning, PREFERRED):

  • Complex architectural decisions
  • All subagent workflows (task-planner, system-designer, etc.)
  • Main development work
  • Maximum reasoning requirements
  • Research and analysis tasks

Latest Sonnet tier (Best balance for coding):

  • Simple code generation when Opus is not needed
  • Quick edits and modifications
  • Orchestrating workflows

Latest Haiku tier (Fast and economical):

  • Simple utility functions
  • Documentation updates
  • Quick queries

Context Window Management

Avoid last 20% of context window for:

  • Large-scale refactoring
  • Feature implementation spanning multiple files
  • Debugging complex interactions

Lower context sensitivity tasks:

  • Single-file edits
  • Independent utility creation
  • Documentation updates
  • Simple bug fixes

For Complex Tasks

For complex tasks requiring deep reasoning:

  1. Switch to Opus model for maximum reasoning
  2. Plan the approach before writing any code
  3. Break into independent subtasks
  4. Use specialized subagents for isolated context and diverse analysis

Build Troubleshooting

If build fails:

  1. Use build-doctor subagent
  2. Analyze error messages
  3. Fix incrementally
  4. Verify after each fix
Changes

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.

  1. yesterday First seen · 59 lines · 329 tokens per session scan A 6264dbd94d66

Subscribe to this mod's changes

perf is a cursor rule published in the GitHub repository timurgaleev/vibestack (6 stars, last pushed yesterday), licensed MIT. It adds 329 tokens to every session, about $0.0016 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-09-19.