best-practices

best-practices is a cursor rule for Cursor from tecnomanu/pampa. It costs 569 tokens per session, scanned A, original, ISC.

Project-wide development rules covering code quality, documentation, testing, design, review, and incremental implementation. TDD means writing tests before the code when practical.

In plain words
What is it for?
Use them as general guidance when designing, writing, testing, reviewing, or refactoring project code.
Why use it?
They provide a shared baseline for making changes safely and consistently across different technologies.

Cursor rule for Cursor

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.

agentmods
npx agentmods add rules/tecnomanu/pampa/best-practices
Clone the repo
git clone --depth 1 https://github.com/tecnomanu/pampa

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 best-practices

README.md
[![agentmods](https://agentmods.dev/badge/rules/tecnomanu/pampa/best-practices.svg)](https://agentmods.dev/rules/tecnomanu/pampa/best-practices)
Your own site
<a href="https://agentmods.dev/rules/tecnomanu/pampa/best-practices"><img src="https://agentmods.dev/badge/rules/tecnomanu/pampa/best-practices.svg" alt="Measured on agentmods" height="20"></a>
Per session 569 This file is loaded in full into every session.
When invoked 569 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.00569 $0.00569
Opus 5 $0.00284 $0.00284
Sonnet 5 $0.00114 $0.00114
Haiku 4.5 $0.00057 $0.00057

Measured 5d ago against content hash d3b90fd6e741, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

best-practices 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 5d 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.

.cursor/rules/rules-kit/global/best-practices.mdc · 66 lines

How it starts

The opening of the file, as written. The whole thing — 66 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Global Best Practices

This document defines best practices applicable to any development project, regardless of the technology stack used.

General Principles

  • Code Quality: Maintain high quality standards throughout all code.
  • Documentation: Update documentation when functionality changes.
  • Testing: Implement tests for all new or modified code.
  • Single Responsibility: Each component should have a single responsibility.
  • DRY (Don't Repeat Yourself): Avoid duplication of code and logic.

Code Development and Modification

When creating or modifying any component of the system, follow these guidelines:

Development Process

  1. Context Understanding: Fully understand the problem before writing code.
  2. Prior Design: Design the solution before implementing it.
  3. Incremental Development: Implement in small, verifiable increments.
  4. Code Review: Review code before considering it complete.
  5. Refactoring: Improve existing code without changing its behavior.

Testing

  1. Test First: Consider writing tests before implementing code (TDD when possible).
  2. Coverage: Ensure new features have adequate tests.
  3. Automation: Run tests automatically before committing changes.
  4. Verification: Ensure all tests pass before finalizing.

Quality and Maintenance

  1. Error Handling: Implement appropriate error and exception handling.
  2. Logging: Add appropriate logs to facilitate debugging and monitoring.
  3. Security: Consider security implications in every change.
  4. Performance: Evaluate the performance impact of changes made.

Source Code Management

  1. Version Control: Properly use the version control system.
  2. Small Commits: Make small, focused commits with specific purposes.
  3. Descriptive Messages: Write clear and descriptive commit messages.
  4. Working Branches: Use branches for features, fixes, or tasks.
  5. Pull Requests: Request code review through pull requests.

Read the full file on GitHub · 66 lines

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. 5d ago First seen · 66 lines · 569 tokens per session scan A d3b90fd6e741

Subscribe to this mod's changes

best-practices is a cursor rule published in the GitHub repository tecnomanu/pampa (30 stars, last pushed 11mo ago), licensed ISC. It adds 569 tokens to every session, about $0.0028 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.