corral

corral is a skill for Claude Code, Codex from x0c/corral. It costs 80 tokens per session (7,997 once invoked), scanned A, original, MIT.

A read-only command-line tool for searching and inspecting past coding-agent sessions stored on your computer. It can work with histories from Claude Code, Codex CLI, OpenCode, Kimi Code CLI, Cursor Agent CLI, and Pi.

In plain words
What is it for?
Use it to list recent sessions, search by topic, inspect a session, export a transcript with tool calls and reasoning, or prepare context for continuing interrupted work.
Why use it?
It helps recover context from earlier work without opening each tool or changing the stored conversation history.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: reads .claude/ paths; mentions Claude Code; reads ~/.codex paths.

Good fit Use it to list recent sessions, search by topic, inspect a session, export a transcript with tool calls and reasoning, or prepare context for continuing interrupted work.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/x0c/corral/docs
View source ↗ x0c/corral
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.

Any agent
npx skills add x0c/corral --skill docs
Clone the repo
git clone --depth 1 https://github.com/x0c/corral

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 corral

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/x0c/corral/docs"><img src="https://agentmods.dev/badge/skills/x0c/corral/docs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 80 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 7,997 The whole file, excluding the scripts and references it only reads on demand.
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.00080 $0.07997
Opus 5.5 $0.00032 $0.03199
Sonnet 5.5 $0.00016 $0.01599
Haiku 4.5 $0.00008 $0.00800

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

Security

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 16d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (screenshots/capture.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

docs/SKILL.md · 317 lines

How it starts

The opening of the file, as written. The whole thing — 317 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 / not_resumable / internal_error)
  • message:人类可读的错误说明
  • hint:建议的排查方向
  • next_commands:可以直接执行的后续命令列表(绝对入口身份,照抄即可;不要改写成裸 corral,以免命中 PATH 上另一份旧副本)

退出码:0 成功、1 一般失败(含未预料的 internal_error)、2 用法错误(参数不对,含未知 --fields)、3 会话不存在、5 会话标识有歧义。 不要只看 stdout 是否有内容来判断成功,检查退出码或 ok 字段。

安装与探针(CLI 缺失时不要停下问人)

调任何子命令前先确认入口与能力。corral 不在 PATH 上时,按下面可信源装到用户目录后继续原任务(用户要这个能力即已授权用户目录安装;sudo/系统目录/覆盖已装版本仍需显式授权):

  • 可信源:github.com/x0c/corral(corral 包)。安装渠道三选一:pipx install corral、brew install x0c/corral/corral、源码树内 bash cli/scripts/dev-install.sh(editable,供开发)。
  • 装完先钉绝对路径并验能力(之后全会话只用该绝对路径;next_commands 给的即是):
CORRAL_BIN="$(command -v corral)"          # 钉住本会话唯一入口
"$CORRAL_BIN" describe >/dev/null && echo describe-ok
"$CORRAL_BIN" diagnose | python3 -c "import json,sys; d=json.load(sys.stdin); assert d['ok']; print('diagnose-ok', d['data']['version'])"
  • diagnose 的 package_file / install_channel / stale_source_warning 告诉你当前跑的是哪份拷贝;源码树里开发却加载了别处副本时会有告警,以告警为准换入口。
  • diagnose 的 keepalive_server 报告保活 tmux server 的调度档(priority、interactive_job、clamped)。clamped: true 表示托管助手整体被 macOS 限流(新会话起得慢、同样的活比 Corral 外慢数倍);只能重启一次 server 解决,见 docs/MAINTAINER_GUIDE.md「Keepalive server scheduling class」。
  • 源码树 editable 安装用于维护和开发,不会替代环境准备。跑耗时检查前先用 python3 scripts/dev_env.py check --repo . 确认就绪(未就绪时跑 python3 scripts/dev_env.py prepare --repo .;只诊断用 doctor --repo . --json,命令经 run --repo . -- <cmd> 走 checkout .venv),再按 测试环境指南(python3 scripts/acceptance.py --json,只演练用 --dry-run)做隔离验收;focused acceptance 不代替完整 UI/终端及干净安装门禁。安装/依赖失败应先按环境问题处理,不要误判成会话查询结果为空。

Read the full file on GitHub · 317 lines

Files

What ships with it

54 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. 16d ago Changed e6f9804b01b9
  2. 24d ago Changed · +2 lines 2f7539b50e2b
  3. 29d ago Changed · +33 lines fda90746fa89
  4. 1mo ago Changed · +2 lines f77e4760b8b7
  5. 1mo ago Changed · +13 lines 2743f0ab4bff
  6. 1mo ago Changed 2310429b4cfc
  7. 1mo ago Changed 9456ce83d2d1
  8. 1mo ago Changed 5d73be59edde
  9. 1mo ago First seen · 267 lines · 80 tokens per session scan A d6b93bfebd37

Subscribe to this mod's changes

corral is a skill published in the GitHub repository x0c/corral (3 stars, last pushed 16d ago), licensed MIT. It adds 80 tokens to every session and 7,997 once invoked, about $0.0003 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.

Related

Other skills, from other repositories

memory-clean

Audit memory directory for structural issues (orphans, dangling refs, duplicates, missing sections, oversized entries) and staleness against session-history transcripts; report-first, fix-on-confirmation. Use when the user says "audit memory", "memory hygiene", or "find stale/duplicate memories".

OutlineDriven/odin-codex-plugin · 62 tokens

memory-update

Scan agent's session-history transcripts for save-worthy signals (corrections, preferences, decisions, references), propose and write auto-memory files with valid frontmatter and MEMORY.md entry. Use when the user says "save this to memory", "remember that", or "scan this session for memories".

OutlineDriven/odin-codex-plugin · 62 tokens

memory-sanitize

Produce share-safe copies of memory files under /tmp with PII redacted (paths, emails, session IDs, dates) and credentials scanned (tokens, keys); never mutates originals. Use when the user says "sanitize memory for sharing", "redact memory PII", or "scan memory for credentials".

OutlineDriven/odin-codex-plugin · 67 tokens

vsearch

You CAN search other sessions' conversations. This is a full-text search across every vlx-term session on this machine or within one specified session, so a past discussion is findable even when nobody remembers which session held it. Use it whenever the user gestures at earlier work — "last time", "we solved this…

vlinx-io/VelaTerm · 141 tokens

unifly

Inspect and manage UniFi Network infrastructure with the unifly CLI: devices, clients, VLANs, WiFi, firewall, VPN, switch ports, site settings, and cloud fleets. Use for UniFi network configuration, monitoring, and troubleshooting, not UniFi Protect camera or recording management.

hyperb1iss/unifly · 63 tokens

neo4j-agent-memory-skill

Authoritative reference for the neo4j-agent-memory Python package — a graph-native memory system for AI agents built on Neo4j — and for the hosted service (NAMS) at memory.neo4jlabs.com. Use this skill whenever the user mentions neo4j-agent-memory, agent memory with Neo4j, context graphs, the POLE+O model…

neo4j-contrib/neo4j-skills · 223 tokens