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/cycloidio/cycloid-mcp-server/pythongit clone --depth 1 https://github.com/cycloidio/cycloid-mcp-serverWhat 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.00000 | $0.00667 |
| Opus 5 | $0.00000 | $0.00333 |
| Sonnet 5 | $0.00000 | $0.00133 |
| Haiku 4.5 | $0.00000 | $0.00067 |
Grade A, and why
python 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.
What it actually says
You are an expert in Python and MCP server development, specifically for the Cycloid MCP Server with its optimized architecture.
Key Principles
- Write concise, technical responses with accurate Python examples using our optimized patterns
- Use BaseHandler inheritance for all handlers (from src.base_handler)
- Import types from src.types instead of typing directly (JSONDict, JSONList, etc.)
- Use @handle_errors decorator for consistent error handling
- Apply proper import organization: stdlib → third-party → local → relative
- Use descriptive variable names with auxiliary verbs (e.g., is_active, has_permission)
- Use lowercase with underscores for directories and files (e.g., components/stacks/stacks_handler.py)
- Favor composition with BaseHandler over deep inheritance hierarchies
- Use the Receive an Object, Return an Object (RORO) pattern with proper typing
Architecture Patterns (CYCLOID MCP SERVER SPECIFIC)
-
Handler Pattern: All handlers inherit from BaseHandler and get self.cli, self.logger automatically
-
Type Safety: Use centralized types from src.types (JSONDict, JSONList, CliFlags, etc.)
-
Error Handling: Use @handle_errors decorator with descriptive actions and suggestions
-
CLI Integration: Use execute_cli_command with auto_parse parameter
-
Memory Optimization: Use conditional debug logging and proper resource management
Error Handling and Validation
- Use @handle_errors decorator from src.error_handling for consistent error handling:
- Provide descriptive action names: @handle_errors(action="validate configuration")
- Include helpful suggestions: suggestions=["Check syntax", "Verify fields"]
- Let decorator handle CycloidCLIError vs Exception automatically
- Handle errors and edge cases at the beginning of functions
- Use early returns for error conditions to avoid deeply nested if statements
- Place the happy path last in the function for improved readability
- Avoid unnecessary else statements; use the if-return pattern instead
- Use guard clauses to handle preconditions and invalid states early
- Use self.logger (provided by BaseHandler) for consistent logging
Type Safety (CENTRALIZED TYPES)
- Import common types from src.types instead of typing directly:
- Use JSONDict instead of Dict[str, Any]
- Use JSONList instead of List[Dict[str, Any]]
- Use CliFlags instead of Dict[str, Union[str, bool]]
- Use OptionalString instead of Optional[str]
- Avoid Any usage - prefer specific type aliases from src.types
- Use ElicitationResult, StackCreationParams for complex operations
Dependencies
- fastmcp (FastMCP 2.0)
- pydantic (for configuration and validation)
- Python 3.12+
Performance Optimization
- Use conditional debug logging to prevent unnecessary string creation: if logger.isEnabledFor(logger.DEBUG): logger.debug(...)
- Apply @lru_cache only for static data (configuration discovery)
- NEVER cache CLI API responses (dynamic data that changes)
- Use tempfile.NamedTemporaryFile(delete=True) for automatic resource cleanup
- Use execute_cli_command with auto_parse parameter to avoid duplication
- Minimize blocking I/O operations; use asynchronous operations for all CLI calls
- Use proper resource management with context managers
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.
- yesterday First seen · 67 lines · 667 tokens per session scan A 29aab784f8dc
python is a cursor rule published in the GitHub repository cycloidio/cycloid-mcp-server (0 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 667 tokens. 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
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.
typescript
Changes to these high-fan-out internals can affect every message, delta, element, or rerun. Keep work in them minimal, and benchmark changes with representative stress-test apps.
coolify-ai-docs
Master reference to all Coolify AI documentation in .ai/ directory.
python_lib
Tips and guidelines specific to the development of the Streamlit Python library, not applicable to scripts and e2e tests.
specs
This directory contains product and tech specs for Streamlit features.