compaction

compaction is a skill for Claude Code, Codex from StarRocks/starrocks-debug-skills. It costs 92 tokens per session (7,557 once invoked), scanned A, original, Apache-2.0.

A troubleshooting guide for compaction problems in shared-nothing databases, where each server manages its own data. Compaction reorganizes stored data so imports and queries can keep working efficiently.

In plain words
What is it for?
Use it to investigate compaction scores and related node or cluster metrics, then follow the matching path for import overload, delete-related version growth, or large-tablet issues.
Why use it?
It helps identify why data versions or background work are piling up, causing failed imports or slow MERGE queries. It separates three stated causes: heavy imports, batch deletes, and large tablets that are not compacted automatically.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument.

Good fit Use it to investigate compaction scores and related node or cluster metrics, then follow the matching path for import overload, delete-related version growth, or large-tablet issues.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/starrocks/starrocks-debug-skills/compaction
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 StarRocks/starrocks-debug-skills --skill compaction
Clone the repo
git clone --depth 1 https://github.com/StarRocks/starrocks-debug-skills

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 compaction

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/starrocks/starrocks-debug-skills/compaction"><img src="https://agentmods.dev/badge/skills/starrocks/starrocks-debug-skills/compaction.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 92 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 7,557 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00092 $0.07557
Opus 5.5 $0.00037 $0.03023
Sonnet 5.5 $0.00018 $0.01511
Haiku 4.5 $0.00009 $0.00756

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

Security

Grade A, and why

compaction scanned grade A with 1 finding 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- curl
compaction/SKILL.md · 694 lines

How it starts

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

Compaction Troubleshooting (Shared-Nothing)

This skill applies to shared-nothing deployments only. For shared-data, compaction is managed by the storage layer and diagnosed differently.

Three root causes account for the vast majority of cases:

  • Cause A — import rate exceeds cumulative compaction throughput (rowset pile-up)
  • Cause B — batch DELETE statements causing version explosion
  • Cause C — large tablet where base compaction is not self-triggering

Metric Taxonomy — Read This First

Before using any metrics, understand the two-layer structure:

BE-level metrics (type-specific, per-node)

Metric name Meaning
starrocks_be_tablet_cumulative_max_compaction_score Highest cumulative compaction score among all tablets on this BE, updated each scheduler round
starrocks_be_tablet_base_max_compaction_score Highest base compaction score on this BE, updated each scheduler round
starrocks_be_tablet_update_max_compaction_score Highest PK (update) compaction score on this BE. Not forwarded to FE.

FE-level metric (aggregated, cross-node)

Metric name Meaning
starrocks_fe_max_tablet_compaction_score Max of max(cumulative_score, base_score) across all BEs. ⚠️ Does NOT include update (PK) compaction score — update scores are never forwarded from BE to FE.

How to retrieve metrics

Option 1 — curl the BE HTTP port (immediate, no Prometheus needed)

# Pull all compaction-related metrics from one BE
curl -s "http://<be_ip>:<be_http_port>/metrics" | grep -E "compaction_score|compaction_num"

# Targeted: cumulative, base, update scores on one BE
curl -s "http://<be_ip>:<be_http_port>/metrics" \
  | grep -E "tablet_cumulative_max_compaction_score|tablet_base_max_compaction_score|tablet_update_max_compaction_score"

# Loop across all BEs (replace IPs and port as needed)
for be in 10.0.0.1 10.0.0.2 10.0.0.3; do
  echo "=== $be ==="
  curl -s "http://$be:8040/metrics" \
    | grep -E "tablet_(cumulative|base|update)_max_compaction_score"
done

Read the full file on GitHub · 694 lines

Files

What ships with it

2 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. 1mo ago First seen · 694 lines · 92 tokens per session scan A 7ab4f8e50f01

Subscribe to this mod's changes

compaction is a skill published in the GitHub repository StarRocks/starrocks-debug-skills (77 stars, last pushed 5mo ago), licensed Apache-2.0. It adds 92 tokens to every session and 7,557 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

doris-debug-compaction

Use for Doris -235 / too many versions and compaction lag. Error raised in RowsetBuilder::checktabletversioncount when versioncount > maxtabletversionnum (default 2000) or meta serialize size limit.

apache/doris-skills · 53 tokens

reproduce-bug

Reproduce a reported bug in googleapis/mcp-toolbox and decide whether it is real, delivering an evidence-backed verdict: confirmed, already fixed, misconfiguration, client-side, works as intended, not reproducible, or blocked. Use whenever a maintainer asks you to reproduce, verify, confirm, or investigate a bug…

googleapis/mcp-toolbox · 130 tokens

triage-issues

Triage GitHub issues in the googleapis/mcp-toolbox repo: propose the correct labels (type / priority / product / status), check for duplicates, verify a bug has enough info to act on, and draft a triage comment. Use whenever a maintainer asks you to triage, label, categorize, prioritize, or "look at" an issue (or a…

googleapis/mcp-toolbox · 164 tokens

postgresql-indexing

PostgreSQL indexing best practices for Prowler: index design, partial indexes, partitioned table indexing, EXPLAIN ANALYZE validation, concurrent operations, monitoring, and maintenance. Trigger: When creating or modifying PostgreSQL indexes, analyzing query performance with EXPLAIN, debugging slow queries, reviewing…

prowler-cloud/prowler · 108 tokens

graphjin-eval

Create, extend, run, baseline, and diagnose GraphJin agent evaluations through the graphjin eval CLI.

dosco/graphjin · 27 tokens

axiom-audit-grdb-performance

Use when the user mentions GRDB performance review, slow GRDB queries, app-group database setup audit, a ValueObservation that stopped updating, or pre-release GRDB scan.

CharlesWiltgen/Axiom · 43 tokens