rich

rich is a skill for Claude Code, Codex from CN-big-cabbage/github-skill-distiller. It costs 15 tokens per session (1,072 once invoked), scanned A, original, MIT.

A guide to Rich, a Python library for creating styled terminal output such as tables, progress bars, highlighted code, formatted logs, and readable errors.

In plain words
What is it for?
Use it when building Python command-line programs that need formatted text, tables, progress indicators, Markdown, syntax highlighting, structured logs, or improved tracebacks.
Why use it?
Basic terminal printing can be difficult to scan, especially for tables, progress, or error details. Rich provides ready-made components for presenting that information clearly.

Skill for Claude CodeCodex

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 skills/cn-big-cabbage/github-skill-distiller/rich
Any agent
npx skills add CN-big-cabbage/github-skill-distiller --skill rich
Clone the repo
git clone --depth 1 https://github.com/CN-big-cabbage/github-skill-distiller

Made for: Claude Code, Codex.

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/skills/cn-big-cabbage/github-skill-distiller/rich.svg)](https://agentmods.dev/skills/cn-big-cabbage/github-skill-distiller/rich)
Your own site
<a href="https://agentmods.dev/skills/cn-big-cabbage/github-skill-distiller/rich"><img src="https://agentmods.dev/badge/skills/cn-big-cabbage/github-skill-distiller/rich.svg" alt="Measured on agentmods" height="20"></a>
Per session 15 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,072 The whole file, excluding the scripts and references it only reads on demand.
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.00015 $0.01072
Opus 5 $0.00008 $0.00536
Sonnet 5 $0.00003 $0.00214
Haiku 4.5 $0.00002 $0.00107

Measured 4d ago against content hash f2391cc55736, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 4d 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.

cases/rich/SKILL.md · 126 lines

How it starts

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

Rich - Python 终端富文本和美化格式库

技能概述

本技能帮助用户使用 Rich 在 Python 终端程序中输出美观的富文本内容,支持以下场景:

  • 彩色输出: 使用标记语法为文本添加颜色、样式和表情符号
  • 表格渲染: 创建美观的 ASCII 表格,支持多种边框样式
  • 进度条: 显示任务进度、下载进度、批量操作进度
  • Markdown 渲染: 在终端中渲染 Markdown 文本
  • 语法高亮: 对代码片段进行语法高亮显示
  • 结构化日志: 替换标准 logging,输出格式化日志
  • Python 对象美化打印: 替代 pprint,输出带颜色和折叠的对象

GitHub: https://github.com/Textualize/rich(56k+ Stars)

使用流程

AI 助手将引导你完成以下步骤:

  1. 安装 Rich(如未安装)
  2. 选择合适的组件(Console、Table、Progress 等)
  3. 编写代码并查看效果
  4. 根据需求调整样式和配置

关键章节导航

AI 助手能力

当你向 AI 描述终端输出需求时,AI 会:

  • 自动生成对应的 Rich 代码片段
  • 选择最合适的 Rich 组件(Table/Panel/Progress 等)
  • 调整颜色、样式等视觉参数
  • 集成到现有项目代码中
  • 处理不同终端环境的兼容性问题
  • 将 print/logging 替换为 Rich 输出

核心功能

  • 支持 Console 对象统一管理终端输出
  • 支持标记语法(Markup)设置文本样式
  • 支持 16/256/True Color 颜色模式
  • 支持 Table(表格)、Panel(面板)、Tree(树形)等渲染组件
  • 支持 Progress(进度条)和 Live(动态刷新)
  • 支持 Syntax(语法高亮)和 Markdown(文档渲染)
  • 支持 Traceback(美化异常追踪)
  • 支持 Inspect(对象检查)
  • 支持 Logging Handler 集成
  • 支持导出 HTML/SVG 终端截图

快速示例

# 最简单的用法 - 使用全局 print
from rich import print
print("[bold magenta]Hello[/bold magenta], [green]World[/green]! :sparkles:")

# 使用 Console 对象
from rich.console import Console
console = Console()
console.print("[bold]Rich[/bold] is [italic green]awesome[/italic green]!")

# 美化打印 Python 对象
from rich import pretty
pretty.install()
{"name": "rich", "stars": 56000, "features": ["color", "table", "progress"]}
# 渲染表格
from rich.console import Console
from rich.table import Table

console = Console()
table = Table(title="Python 包对比")
table.add_column("名称", style="cyan", no_wrap=True)
table.add_column("Stars", style="magenta")
table.add_column("用途", style="green")
table.add_row("rich", "56k+", "终端美化")
table.add_row("click", "14k+", "命令行解析")
table.add_row("typer", "13k+", "CLI 框架")
console.print(table)
# 进度条
from rich.progress import track

for step in track(range(100), description="处理中..."):
    # 执行任务
    pass

Read the full file on GitHub · 126 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 4d ago First seen · 126 lines · 15 tokens per session scan A f2391cc55736

Subscribe to this mod's changes

rich is a skill published in the GitHub repository CN-big-cabbage/github-skill-distiller (4 stars, last pushed 2mo ago), licensed MIT. It adds 15 tokens to every session and 1,072 once invoked, about $0.0001 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.