rich

rich is a cursor rule for Cursor from synmux/myriad. It costs 2,180 tokens per session, scanned A, original, MIT.

Coding and project-structure rules for Rich, a Python library used to build formatted terminal applications.

In plain words
What is it for?
Use it when writing or reviewing Python terminal applications that use Rich.
Why use it?
It provides consistent guidance for readable Python code, project layout, dependencies, and supported Python versions.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc).

Good fit Use it when writing or reviewing Python terminal applications that use Rich.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/synmux/myriad/rich
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/synmux/myriad

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 rich

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

Your own site · 80×15
<a href="https://agentmods.dev/rules/synmux/myriad/rich"><img src="https://agentmods.dev/badge/rules/synmux/myriad/rich.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,180 This file is loaded in full into every session.
When invoked 2,180 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.02180 $0.02180
Opus 5.5 $0.00872 $0.00872
Sonnet 5.5 $0.00436 $0.00436
Haiku 4.5 $0.00218 $0.00218

Measured 1mo ago against content hash d1d60d9b1137, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

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

configuration/cursor/rules/rich.mdc · 160 lines

How it starts

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

  • General Guidelines

    • Adhere to PEP 8 coding style guidelines for Python code, emphasizing readability and consistency.
    • Limit lines to a maximum of 79 characters to enhance readability across different environments.
    • Prioritize code clarity and simplicity, making it easy to understand and maintain.
    • Use UTF-8 encoding for source files to ensure compatibility with a wide range of characters.
  • Installation and Environment

    • Use uv for installing dependencies to improve speed and reliability, if appropriate.
    • Specify Python 3.12 or later to leverage the latest language features and performance improvements. (If applicable for the specific features of rich you are using)
  • Code Organization and Structure

    • Directory Structure: Follow a logical directory structure.

      project_root/ ├── src/ │ ├── main.py # Entry point of the application │ ├── utils/ │ │ ├── init.py │ │ ├── helper_functions.py │ ├── modules/ │ │ ├── init.py │ │ ├── module_a.py # Rich-related components │ │ ├── module_b.py ├── tests/ │ ├── init.py │ ├── test_main.py │ ├── test_module_a.py ├── README.md ├── pyproject.toml # Or requirements.txt

    • File Naming: Use descriptive lowercase names with underscores (e.g., console_output.py).

    • Module Organization: Group related functionalities into separate modules (e.g., rich_display.py, data_formatting.py).

    • Component Architecture: Design modular components with clear interfaces for reusability and maintainability.

    • Code Splitting: Break down large files into smaller, more manageable pieces based on functionality. Consider lazy loading of less-frequently used modules.

  • Coding Style and Best Practices

    • Indentation: Use 4 spaces for indentation.
    • Blank Lines: Separate top-level functions and classes with two blank lines, and methods within a class with one blank line.
    • Imports:
      • Group imports in the following order:
        1. Standard library imports
        2. Third-party library imports (including Rich)
        3. Local application imports
      • Use absolute imports for clarity, unless relative imports significantly improve readability within a package.
      • Avoid wildcard imports (from module import *).
    • Naming Conventions:
      • Use lowercase with underscores for function and variable names (my_variable, my_function).
      • Use CapWords for class names (MyClass).
      • Use UPPER_CASE_WITH_UNDERSCORES for constants (MAX_VALUE).
    • String Quotes: Use double quotes consistently for strings, especially for docstrings.
  • Rich Library Specific Best Practices

    • Console Instantiation: Create a single Console instance for your application and reuse it throughout. python from rich.console import Console

      console = Console()

      def my_function(): console.print("Hello, [bold red]World![/bold red]")

    • Styling: Use Rich's markup system for styling text. Refer to the Rich documentation for available styles and their usage. python console.print("[link=https://example.com]Click here[/link] to visit example.com")

    • Tables: Utilize the Table class for structured data display. Configure columns and rows appropriately. python from rich.table import Table

      table = Table(title="My Data") table.add_column("Name", style="cyan", no_wrap=True) table.add_column("Age", style="magenta") table.add_row("Alice", "30") table.add_row("Bob", "25") console.print(table)

    • Progress Bars: Employ the Progress class for tracking long-running tasks. Configure the progress bar to accurately reflect the task's progress. python from rich.progress import Progress import time

      with Progress() as progress: task1 = progress.add_task("[red]Downloading...", total=1000) task2 = progress.add_task("[green]Processing...", total=100)

Read the full file on GitHub · 160 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. 1mo ago First seen · 160 lines · 2,180 tokens per session scan A d1d60d9b1137

Subscribe to this mod's changes

rich is a cursor rule published in the GitHub repository synmux/myriad (2 stars, last pushed today), licensed MIT. It adds 2,180 tokens to every session, about $0.0087 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.