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/metagit-ai/metagit-cli/project-levelgit clone --depth 1 https://github.com/metagit-ai/metagit-cliWhat 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.01340 | $0.01340 |
| Opus 5 | $0.00670 | $0.00670 |
| Sonnet 5 | $0.00268 | $0.00268 |
| Haiku 4.5 | $0.00134 | $0.00134 |
Grade A, and why
project-level 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 2d 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 — 131 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are an expert in Python, YAML configurations, and AI toolchain integration. Your role is to assist developers working on their projects, ensuring code quality, and maintainability.
Code Style and Structure
- Write Python code compliant with PEP 8 and optimized for readability and maintainability.
- Use type hints for all function parameters and return types.
- Always strongly type variables using the pydantic library for data structures.
- Always use Protocol definitions for interface definitions.
- Maintain a component driven project structure with each component in their own directory within the src/metagit/core path.
- Avoid duplication by using clear, modular code organization.
- All file paths should be constructed using os.path.join() instead of string concatenation.
- All library and class imports must be at the top of the file and never be imported on-demand.
- Remove all unused imports from each python file after editing them.
- Never assign variable names which are unused, instead assign these variables as '_'.
- Unit tests are expected for all functions and class methods and are to be stored centrally in the tests folder.
- Combine if statements instead of nesting them where possible.
- Use ternary operators to assign simple logic defined variables instead of
if-else-blocks. - Favor using Python native libraries instead of subprocess to reduce external dependencies.
- Use 2 spaces for indentation.
- Private class members should be prefixed with an underscore (
_). - Use
isinstance()for type comparisons.
Naming Conventions
- Use snake_case for variables, functions, and filenames.
- Use PascalCase for class names.
- Prefix environment variables with provider name (e.g.,
OLLAMA_,OPENAI_). - Use descriptive names for configuration files (e.g.,
agents.yaml,tasks.yaml).
Environment and Configuration
- Use
python-dotenvto manage environment variables. - Maintain
.env.exampleas a template for environment setup. - Structure YAML files clearly and validate on load:
- Use
yaml.safe_loadfor security. - Include clear error messages for missing or invalid keys.
- Use
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.
- 2d ago First seen · 131 lines · 1,340 tokens per session scan A 2df5d682de7b
project-level is a cursor rule published in the GitHub repository metagit-ai/metagit-cli (2 stars, last pushed 4d ago), licensed MIT. It adds 1,340 tokens to every session, about $0.0067 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-31.
Other cursor rules, from other repositories
architector-onboarding
Onboard or sync a codebase into MCP Architector (phased, context-safe). Use when importing a new repo, documenting architecture, or refreshing architector data.
self_improve
description: Guidelines for continuously improving Cursor rules based on emerging code patterns and best practices. globs: / alwaysApply: true.
cursor_rules
Guidelines for creating and maintaining Cursor rules to ensure consistency and effectiveness.
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.
dev-standard
Apache Superset development standards and guidelines for Cursor IDE.
cli-error-handling
CLI command error handling patterns.