Agent skill

Ca Prune

by arbiterForge in arbiterForge/codeArbiter

Trim transcript clutter to extend session lifetime — analyze, prune a copy, or toggle the after-each-turn service.

AGPL-3.0Auto-check passed

Install Ca Prune

skills CLI
$ npx skills add arbiterForge/codeArbiter --skill ca-prune -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install arbiterForge/codeArbiter ca-prune --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/arbiterForge/codeArbiter.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/ca-pi/skills/ca-prune .claude/skills/ca-prune && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
ca-prune
GitHub stars
147
Token cost
~1.6k tokens
SKILL.md length
766 words
Files
1
Skills in repo
12
Repo updated
First seen
Licence
AGPL-3.0

At a glance

Trim transcript clutter to extend session lifetime — analyze, prune a copy, or toggle the after-each-turn service.

  • Works in 3 steps: status / dry / audit — run the backing… → run — confirm the path is a copy or an… → on/off — explain the after-each-turn…
  • SKILL.md covers Argument, Flow, When NOT to use and Hard gate
  • Calls python3 and python

What it does

Ca Prune is an agent skill from arbiterForge/codeArbiter. Trim transcript clutter to extend session lifetime — analyze, prune a copy, or toggle the after-each-turn service. Dry-run by default; gains land at resume/compaction, not the current turn.

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: Open-source governance and hard gates for AI coding agents across Claude Code, Codex CLI, and Pi. The licence is AGPL-3.0.

Example prompts

  • “/ca-prune”

Requirements

  • Python 3

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. status / dry / audit — run the backing tool and present its output verbatim. Resolve the
  2. run — confirm the path is a copy or an inactive session, then
  3. on/off — explain the after-each-turn service: UserPromptSubmit and PreCompact hooks

What it can do on your machine

Read from SKILL.md and the folder at commit cd5b0a0. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • python3
    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Ca Prune loads about 1.6k tokens when it runs. Until then it costs about 50 tokens; SKILL.md has 766 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~50
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from arbiterForge/codeArbiter at commit cd5b0a0, republished under its AGPL-3.0 licence (© arbiterForge). 766 words, ~1,612 tokens.

Download SKILL.mdSave it as .claude/skills/ca-prune/SKILL.md (or your agent's skills folder).
name
ca-prune
description
Trim transcript clutter to extend session lifetime — analyze, prune a copy, or toggle the after-each-turn service. Dry-run by default; gains land at resume/compaction, not the current turn.
argument-hint
status | dry | run <path> | audit <path> | on | off

/ca-prune — session transcript pruner

Long sessions die when their semantic history fills the context window with bulk: oversized tool outputs, thinking blocks, MCP/shell noise, stale file reads, and host-specific sidecars. The shared policy trims that bulk at safe quiescence boundaries while each host codec preserves its native integrity model and the K most recent tool-bearing turns verbatim. Claude keeps byte-safe JSONL serialization; Pi uses semantic entries and returns a native custom-compaction result. Gains land at the host's next native resume/restart or compaction boundary, not by mutating the running session's active file. Pi-native compaction is event-driven and never rewrites an active Pi session file.

Argument

$ARGUMENTS is one of:

  • status (default) — report cumulative reduction and service state for this session from ~/.codearbiter/prune-state.json, and whether CODEARBITER_PRUNE is on/dry/off. When the service has run in dry mode, every would-be prune is also recorded — one JSONL row per decision, across all sessions — to the shared data-collection log ~/.codearbiter/metrics/prune-dry.jsonl (override with CODEARBITER_PRUNE_METRICS). That log is the evidence base for the dry→on decision: a clean record (every row verdict: dry-run, validation_errors: 0) over a representative set of sessions is the signal that enabling is safe. Read context_bytes_freed / context_est_tokens_freed for model-context benefit and file_bytes_freed / file_pct for disk and resume-parse benefit. sidecar-collapse is explicitly file-only; it must not count toward the context-benefit or cold-cache decision. The legacy freed_bytes, pct, and est_tokens_before / est_tokens_after fields remain whole-file compatibility aliases; do not use them as model-context evidence.
  • dry — create a read-only semantic plan (or analyze a scratch copy where the host exposes a serialized transcript); present the per-strategy reduction table with every strategy labeled context or file-only. Never writes the active session.
  • run <path> — prune the target with --execute. Targets a copy or an old/inactive transcript only — the tool refuses an active or recently-modified target by construction.
  • audit <path> — read-only integrity report: line-parse, uuid chain, tool-pair coverage, condensation markers.
  • on / off — guidance on enabling or disabling the after-each-turn service.

Flow

  1. status / dry / audit — run the backing tool and present its output verbatim. Resolve the interpreter once by presence — PY=python3; { command -v python3 >/dev/null 2>&1 && python3 --version >/dev/null 2>&1; } || PY=python — never python3 X || python X, which reruns X on any nonzero exit (#577):

    "$PY" "<plugin-root>/hooks/prune-transcript.py" <subcommand> [<path>]

    For serialized hosts, dry analyzes <path>.copy.jsonl; Pi active sessions use the native semantic planner and return a custom compaction result without session-file writes.

  2. run — confirm the path is a copy or an inactive session, then:

    "$PY" "<plugin-root>/hooks/prune-transcript.py" <path> --execute [--tier T]

    Present the per-strategy reduction report; follow with audit on the result.

  3. on/off — explain the after-each-turn service: UserPromptSubmit and PreCompact hooks prune at safe quiescence points, always exit 0, and never block the prompt. Tiers: gentle (sidecar + oversize clamp), standard (+ reasoning fold, aged/MCP/shell), aggressive (+ stale-read, reminder dedup, image evict). Config via CODEARBITER_PRUNE (off|dry|on, ships off), CODEARBITER_PRUNE_TIER, CODEARBITER_PRUNE_KEEP_RECENT (the K most recent tool turns kept verbatim — each turn is an assistant tool_use plus its results), CODEARBITER_PRUNE_MAXBYTES. Enabling is the user's explicit choice — never set it unbidden. In dry mode the service writes no transcript but appends each would-be prune to ~/.codearbiter/metrics/prune-dry.jsonl (path override: CODEARBITER_PRUNE_METRICS) for data collection; in on mode the executed prunes are recorded in ~/.codearbiter/prune.log. If a prior service-mode prune was killed mid-write, the next run self-heals the transcript from the newest backup in ~/.codearbiter/prune-backups/ before doing anything else.

    Cold-miss nudge [Feature Forge — preview]: when CODEARBITER_PRUNE is on, an optional submit-time speed bump warns once before a cold cache re-cache lands on bloated context. Enable with CODEARBITER_PRUNE_NUDGE=on (default off). When all arming conditions hold (idle ≥ CODEARBITER_PRUNE_NUDGE_IDLE_SECS, default 240 s; estimated model-context tokens freed ≥ CODEARBITER_PRUNE_NUDGE_MIN_TOKENS, default 80 000), the hook blocks the submit once with an advisory on stderr and returns exit code 2. File-only sidecar reduction never arms it. The advisory names the approximate avoidable context-token count and the host-native actions that move the re-cache to pruned context: native compaction or a normal exit + resume/restart. Resubmitting immediately proceeds. The block fires at most once per cold window; a subsequent warm submit (idle < floor) resets the window so the next genuine cold stretch re-arms. The gate is strictly opt-in, never fires in dry/off mode, and fails open on any error — a pruner fault will never block the session.

Show full SKILL.md (80 more words)Show less

When NOT to use

  • Context bar nowhere near compaction — the most recent turns are protected anyway.
  • Install health → /ca-doctor.
  • Project progress → /ca-status.

Hard gate

  • MUST NOT run --execute against the live session's transcript — the tool refuses a recently-modified file by construction; manual run targets copies or old sessions only.
  • MUST surface the native-boundary-only gains limitation whenever a user expects an immediate active-file context drop.
  • MUST NOT enable the service (CODEARBITER_PRUNE=on) on behalf of the user — explain and let them decide.

© arbiterForge, AGPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in plugins/ca-pi/skills/ca-prune of arbiterForge/codeArbiter.

Open the folder on GitHubat commit cd5b0a0

Compare with similar skills

Ca Prune next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Ca Prune compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Ca Prune this skillarbiterForge/codeArbiter147—~1.6kAutomated safety check: PassAGPL-3.0
Baoyu Youtube TranscriptJimLiu/baoyu-skills26k1 repos~2.4kAutomated safety check: PassMIT
Youtube Transcriptbrowser-act/skills6.1k—~2.1kAutomated safety check: PassMIT
Youtube Transcriptsickn33/agentic-awesome-skills47k1 repos~1.3kAutomated safety check: PassMIT
Transcription0xsline/OpenChatCut2.2k1 repos~1.1kAutomated safety check: PassAGPL-3.0
Youtube Transcript Skillssickn33/agentic-awesome-skills47k1 repos~1.2kAutomated safety check: PassMIT

Similar skills

  • Baoyu Youtube Transcript

    JimLiu/baoyu-skills

    Downloads YouTube video transcripts/subtitles and cover images by URL or video ID.

    26k GitHub starsUsed in 1 repo~2.4k tokens
    Media & CreativeAuto-check passed
  • Youtube Transcript

    browser-act/skills

    YouTube transcript extraction and content reformatting: given a YouTube video URL, opens the video's transcript panel, extracts all timestamped segments, and transforms the raw transcript into…

    6.1k GitHub stars~2.1k tokensUpdated 1 mo ago
    Knowledge ManagementAuto-check passed
  • Youtube Transcript

    sickn33/agentic-awesome-skills

    Fetch YouTube transcripts through DeepAPI or local fallback tooling and save clean text output.

    47k GitHub starsUsed in 1 repo~1.3k tokens
    Knowledge ManagementAuto-check passed
  • Transcription

    0xsline/OpenChatCut

    A skill your agent uses when a video/audio task needs OpenChatCut transcription, captions, subtitles, subtitle styling, transcript search, transcript readiness checks, or enabling captions…

    2.2k GitHub starsUsed in 1 repo~1.1k tokens
    Media & CreativeAuto-check passed
  • Youtube Transcript Skills

    sickn33/agentic-awesome-skills

    Fetch YouTube video transcripts, search videos/channels, browse channels, and extract playlists via the getyoutubetranscript.com API - free tier, no card required.

    47k GitHub starsUsed in 1 repo~1.2k tokens
    Knowledge ManagementAuto-check passed
  • Video Transcripts

    udecode/plate

    Generate structured video transcripts from local files or video URLs using Gemini Files API.

    17k GitHub stars~1.5k tokensUpdated today
    Knowledge ManagementAuto-check passed

More from arbiterForge/codeArbiter

All 12 skills in this repo
  • Sandbox Claude Inside

    arbiterForge/codeArbiter

    Run Claude Code INSIDE a ca-sandbox box (--with-claude). An agent skill from arbiterForge/codeArbiter.

    147 GitHub stars~2.4k tokensUpdated 2 days ago
    Auto-check passed
  • Ca Adr

    arbiterForge/codeArbiter

    Record user-decided ADRs or inspect their health read-only. An agent skill from arbiterForge/codeArbiter.

    147 GitHub stars~1.7k tokensUpdated 2 days ago
    Auto-check passed
  • Ca Conflict

    arbiterForge/codeArbiter

    Stop everything and surface a rule conflict — persona vs. An agent skill from arbiterForge/codeArbiter.

    147 GitHub stars~574 tokensUpdated 2 days ago
    Auto-check passed
  • Ca Feature

    arbiterForge/codeArbiter

    Start a feature: brainstorm a spec, get it approved, then drive it test-first through the pipeline.

    147 GitHub stars~2.2k tokensUpdated 2 days ago
    Auto-check passed
  • Ca Init

    arbiterForge/codeArbiter

    Opt this repo into codeArbiter — scaffold the root-level .codearbiter/ state store.

    147 GitHub stars~1.3k tokensUpdated 2 days ago
    Auto-check passed
  • Ca Metrics

    arbiterForge/codeArbiter

    Read-only 3-metric governance glance — override rate, small-lane rate, sprint low-confidence ratio — each with a trend arrow vs.

    147 GitHub stars~966 tokensUpdated 2 days ago
    Auto-check passed

Questions about Ca Prune

What does Ca Prune do?

Trim transcript clutter to extend session lifetime — analyze, prune a copy, or toggle the after-each-turn service. Ca Prune is an agent skill from arbiterForge/codeArbiter. Trim transcript clutter to extend session lifetime — analyze, prune a copy, or toggle the after-each-turn service.

How do I install Ca Prune in Claude Code?

Run `npx skills add arbiterForge/codeArbiter --skill ca-prune -a claude-code`. Or copy the skill folder (plugins/ca-pi/skills/ca-prune in arbiterForge/codeArbiter) into .claude/skills/ca-prune in your project. Claude Code loads it when a task matches its description.

How do I install Ca Prune in Codex?

Run `npx skills add arbiterForge/codeArbiter --skill ca-prune -a codex`. Or copy the skill folder (plugins/ca-pi/skills/ca-prune in arbiterForge/codeArbiter) into .agents/skills/ca-prune in your project. Codex loads it when a task matches its description.

Can I use Ca Prune in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add arbiterForge/codeArbiter --skill ca-prune -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/ca-prune, .gemini/skills/ca-prune, .github/skills/ca-prune and .opencode/skills/ca-prune in your project.

What does Ca Prune need to run?

Going by SKILL.md and its folder, Ca Prune needs the command-line tools its instructions call (python3 and python). Our summary lists: Python 3.

Does Ca Prune access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Ca Prune safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Ca Prune use?

Ca Prune is published under the AGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Ca Prune use?

About 1.6k tokens (SKILL.md is roughly 6.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Ca Prune?

Skills that share tags, products or a category with Ca Prune: Baoyu Youtube Transcript (JimLiu/baoyu-skills, 26k stars), Youtube Transcript (browser-act/skills, 6.1k stars), Youtube Transcript (sickn33/agentic-awesome-skills, 47k stars) and Transcription (0xsline/OpenChatCut, 2.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Ca Prune?

arbiterForge (a GitHub organization) maintains it in arbiterForge/codeArbiter, which has 147 GitHub stars. The repository holds 12 skills in this directory. The repository was last updated on October 5, 2026.

Source: arbiterForge/codeArbiter on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.