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 skills/x0c/corral/docsnpx skills add x0c/corral --skill docsgit clone --depth 1 https://github.com/x0c/corralWhat 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.00080 | $0.06107 |
| Opus 5 | $0.00040 | $0.03053 |
| Sonnet 5 | $0.00016 | $0.01221 |
| Haiku 4.5 | $0.00008 | $0.00611 |
Grade A, and why
corral 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.
How it starts
The opening of the file, as written. The whole thing — 267 lines — stays where its author put it; the contents beside it link to each section on GitHub.
corral:本地编程会话数据接口
corral 扫描本机 ~/.claude/projects/、~/.codex/sessions/、~/.kimi-code/sessions/、~/.cursor/chats/ 和 OpenCode 的
SQLite 数据库(~/.local/share/opencode/opencode.db,只读打开)下的会话历史,为大模型 Agent
提供结构化查询命令。这些命令只读、无副作用:不会拉起新会话、不会自动接续任务、不会修改
任何历史文件。拿到数据之后要做什么(继续任务、汇总给用户、转发给另一个 Agent)由调用方决定。
所有命令输出统一 JSON envelope,写到 stdout:
{"ok": true, "data": {...}, "error": null, "meta": {"version": 1}}
失败时 ok 为 false,data 为 null,error 包含:
code:程序可判断的错误分类(usage_error/not_found/ambiguous/history_unavailable)message:人类可读的错误说明hint:建议的排查方向next_commands:可以直接执行的后续命令列表
退出码:0 成功、1 一般失败、2 用法错误(参数不对)、3 会话不存在、5 会话标识有歧义。
不要只看 stdout 是否有内容来判断成功,检查退出码或 ok 字段。
命令
跑 corral describe 获取全部命令的机器可读参数说明(与实现同源,不会漂移);
corral describe <command> 看单个命令的完整参数和输出字段。
| 命令 | 用途 |
|---|---|
corral list [--runtime R] [--limit N] [--top N] [--compact] [--status S] [--cwd 子串] [--live] [--fields a,b] |
结构化列出会话 |
corral search <关键词...> [--deep] [--runtime R] [--limit N] [--top N] [--compact] [--live] [--fields a,b] |
按主题找会话 |
corral show <会话> [--messages N | --full] [--compact] [--out 路径] [--fields a,b] |
会话详情 + 对话内容 |
corral share <会话> [--out 路径] [--compact] |
导出含 thinking / 工具调用的统一 transcript,给其他 Agent 做元认知 |
corral export [--since T] [--until T] [--runtime R] [--status S] [--cwd 子串] [--limit N] [--out 路径] [--compact] |
导出某时间范围内所有会话的完整对话,合并为一个 JSON |
corral context <会话> |
生成接续该会话所需的上下文数据包 |
corral plan continue <会话> --instruction <文本> |
生成带新指令的非交互式原生续接计划;只返回数据,不执行 |
corral describe [command] |
查看命令 / 参数 / 输出字段说明 |
corral diagnose |
只读诊断:events.log / embed-error.log / last_error / 截图目录 / tmux / 配色自检 / 安装路径(package_file、install_channel、stale_source_warning);不启动 TUI |
会话标识(<会话> 参数)
支持完整会话 ID、ID 前缀(如 8892cd3d)、或带运行时限定的 runtime:id(如 claude:8892cd3d、
opencode:ses_0ae26219、kimi:session_ef8275b0、cursor:<chat-uuid>)。
前缀在多个运行时之间重复时会返回退出码 5(ambiguous),error.next_commands 里给出具体候选
的 corral show runtime:id 命令,照着执行即可消歧。
What ships with it
15 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.
- CROSS_RUNTIME_HANDOFF_KNOWLEDGE_BASE.md 21 KB
- design/MOBILE_REMOTE_DATA_PLANE_DESIGN.md 24 KB
- design/PI_SESSION_IDENTITY_EXTENSION_DESIGN.md 48 KB
- design/WINDOWS_COMPATIBILITY_DESIGN.md 7.8 KB
- EMBEDDED_TERMINAL_KNOWLEDGE_BASE.md 50 KB
- MAINTAINER_GUIDE.md 205 KB
- NEW_RUNTIME_ONBOARDING_KNOWLEDGE_BASE.md 26 KB
- OBSERVABILITY_KNOWLEDGE_BASE.md 13 KB
- PERFORMANCE_KNOWLEDGE_BASE.md 39 KB
- REMOTE_KNOWLEDGE_BASE.md 32 KB
- screenshots/capture.py 22 KB runs code
- screenshots/list.png 187 KB
- screenshots/search.png 102 KB
- SESSION_SCANNING_KNOWLEDGE_BASE.md 57 KB
- TERMINAL_UI_KNOWLEDGE_BASE.md 136 KB
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 · 267 lines · 80 tokens per session scan A d6b93bfebd37
corral is a skill published in the GitHub repository x0c/corral (2 stars, last pushed 2d ago), licensed MIT. It adds 80 tokens to every session and 6,107 once invoked, about $0.0004 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 skills, from other repositories
write-documentation
Write and format Rust documentation correctly. Apply proactively when writing code with rustdoc comments (//! or ///). Covers voice & tone, prose style (opening lines, explicit subjects, verb tense), structure (inverted pyramid), intra-doc links (crate:: paths, reference-style), constant conventions (binary/byte…
organize-modules
Apply private modules with public re-exports (barrel export) pattern for clean API design. Includes conditional visibility for docs and tests. Use when creating modules, organizing mod.rs files, or before creating commits.
check-bounds-safety
Apply type-safe bounds checking patterns using VPIndex/VPLength types instead of usize. Use when working with arrays, buffers, cursors, viewports, or any code that handles indices and lengths.
check-code-quality
Run comprehensive Rust code quality checks including compilation, linting, documentation, and tests. Use after completing code changes and before creating commits.
analyze-performance
Establish performance baselines and detect regressions using flamegraph analysis. Use when optimizing performance-critical code, investigating performance issues, or before creating commits with performance-sensitive changes.
run-clippy
Run clippy linting, enforce comment punctuation rules, format code with cargo fmt, and verify module organization patterns. Use after code changes and before creating commits.