Agent skill

Decompress Binary

by ClickHouse in ClickHouse/ClickHouse

Extract the inner ELF from a ClickHouse self-extracting clickhouse binary, including when its architecture differs from the host (e.g.

Apache-2.0Auto-check passedDatabases

Install Decompress Binary

skills CLI
$ npx skills add ClickHouse/ClickHouse --skill decompress-binary -a claude-code

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

GitHub CLI
$ gh skill install ClickHouse/ClickHouse decompress-binary --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/ClickHouse/ClickHouse.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/decompress-binary .claude/skills/decompress-binary && 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
decompress-binary
GitHub stars
50k
Token cost
~1.1k tokens
SKILL.md length
417 words
Files
2
Skills in repo
24
Repo updated
First seen
Licence
Apache-2.0

At a glance

Extract the inner ELF from a ClickHouse self-extracting clickhouse binary, including when its architecture differs from the host (e.g.

  • Works in 4 steps: Download the binary from the build job… → Extract the inner ELF → Verify it is the right build and has… → …
  • Gdb/lldb needs real symbols from a downloaded CI/release binary
  • SKILL.md covers When to use, Format, Steps and Notes
  • Runs Python scripts from its folder; calls curl and python3; reaches clickhouse-builds.s3.amazonaws.com

What it does

Decompress Binary is an agent skill from ClickHouse/ClickHouse. Extract the inner ELF from a ClickHouse self-extracting clickhouse binary, including when its architecture differs from the host (e.g. to load an aarch64 CI core dump on an x86 workstation). Use when gdb/lldb needs real symbols from a downloaded CI/release binary, or when self-extraction by running the binary is not possible because of an architecture mismatch.

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `extract_self_extracting.py`).

It sits in Databases, covering Data warehousing. It works with ClickHouse. The repository describes itself as: ClickHouse® is a real-time analytics database management system. The licence is Apache-2.0.

When your agent uses it

  • Gdb/lldb needs real symbols from a downloaded CI/release binary
  • Self-extraction by running the binary is not possible because of an architecture mismatch

Example prompts

  • “/decompress-binary”

Requirements

  • Python 3
  • Pre-approved tools (allowed-tools): Bash(python3:*), Bash(zstd:*), Bash(llvm-objdump:*), Bash(llvm-nm:*), Bash(file:*), Bash(curl:*), Bash(ls:*), Bash(stat:*), Read, Write

Workflow steps

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

  1. Download the binary from the build job for the exact commit, for example
  2. Extract the inner ELF
  3. Verify it is the right build and has symbols
  4. Use it with the core dump

What it can do on your machine

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

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash(python3:*)
    • Bash(zstd:*)
    • Bash(llvm-objdump:*)
    • Bash(llvm-nm:*)
    • Bash(file:*)
    • Bash(curl:*)
    • Bash(ls:*)
    • Bash(stat:*)
    • Read
    • Write

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships script files (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • curl
    • python3

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

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • clickhouse-builds.s3.amazonaws.com

    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

Decompress Binary loads about 1.1k tokens when it runs. Until then it costs about 96 tokens; SKILL.md has 417 words of instructions outside code blocks.

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

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 ClickHouse/ClickHouse at commit cd023af, republished under its Apache-2.0 licence (© ClickHouse). 417 words, ~1,106 tokens.

Download SKILL.mdSave it as .claude/skills/decompress-binary/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
decompress-binary
description
Extract the inner ELF from a ClickHouse self-extracting `clickhouse` binary, including when its architecture differs from the host (e.g. to load an aarch64 CI core dump on an x86 workstation). Use when gdb/lldb needs real symbols from a downloaded CI/release binary, or when self-extraction by running the binary is not possible because of an architecture mismatch.
allowed-tools
Bash(python3:*), Bash(zstd:*), Bash(llvm-objdump:*), Bash(llvm-nm:*), Bash(file:*), Bash(curl:*), Bash(ls:*), Bash(stat:*), Read, Write
argument-hint
<clickhouse-self-extracting> [output.elf]
disable-model-invocation
false

Decompress a ClickHouse Binary (Cross-Architecture)

ClickHouse release and CI clickhouse binaries are self-extracting: a small decompressor stub, followed by the zstd-compressed real ELF and a trailer.

The normal way to decompress is to run the binary once: it extracts the inner ELF in place and re-execs it. That works on the binary's own architecture, and also on a foreign architecture if qemu user-mode emulation for it is installed (e.g. qemu-aarch64 to run an aarch64 binary on x86). When qemu for the target is not available, you cannot run the binary at all and must extract the payload offline.

This skill extracts the inner ELF without executing anything, on any host.

When to use

  • You downloaded a CI/release clickhouse and gdb/lldb shows no real symbols (it only sees the decompressor stub's tiny symbol table).
  • The binary's architecture differs from the host (cannot self-extract by running).
  • You need the inner ELF to load a core dump (see ci/decrypt-cores.md for the matching core-dump decryption procedure).

Format

See utils/self-extracting-executable/types.h:

[ decompressor ELF ]
[ compressed file blobs ]
[ FileData[] ]                 # one per packed file, each followed by its name
[ MetaData (16 bytes) @ EOF ]

MetaData { uint64 number_of_files; uint64 start_of_files_data; }
FileData { uint64 start, end, name_length, uncompressed_size, umask; bool exec; }

MetaData sits at the very end of the file. start_of_files_data points at the FileData array; each 48-byte FileData is followed by the file name. The compressed bytes for a file are input[start:end] (zstd, possibly multi-frame). The packed clickhouse ELF is the entry with exec = true.

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

Steps

  1. Download the binary from the build job for the exact commit, for example:

    bash
    curl -s "https://clickhouse-builds.s3.amazonaws.com/PRs/<pr>/<sha>/pr/build_<arch>_<sanitizer>/clickhouse" -o clickhouse.sfx

    The path segment after <sha> is the normalized workflow name — pr for PR builds, masterci for master/reference builds (REFs/master/<sha>/masterci/...). Find the precise URL in the build job's artifact_report_build_*.json, or via .claude/tools/fetch_ci_report.js "<pr-url>". Download in the foreground (a killed/resumed curl can append garbage past EOF and break the trailer; verify the size matches Content-Length).

  2. Extract the inner ELF:

    bash
    python3 .claude/skills/decompress-binary/extract_self_extracting.py clickhouse.sfx clickhouse.elf
  3. Verify it is the right build and has symbols:

    bash
    file clickhouse.elf                                          # ELF ..., not stripped, with debug_info
    llvm-objdump -s -j .note.gnu.build-id clickhouse.elf | tail  # must match the core's build id

    The build id must equal the one in the crash report / core. A mismatched binary yields unusable backtraces.

  4. Use it with the core dump:

    bash
    gdb clickhouse.elf core.<pid>      # or: lldb clickhouse.elf -c core.<pid>

    gdb and lldb read foreign-architecture cores fine for backtraces and memory inspection (you are not executing the target).

Notes

  • A truncated or corrupted download is the most common failure: if the script reports an implausible number_of_files, re-download cleanly and check the size.
  • The inner ELF is large (several GB for sanitizer builds, unstripped). Make sure there is enough disk.
  • Shortcut when you can run the binary: if the host matches the binary's architecture, or qemu user-mode emulation for it is installed, just run ./clickhouse once to self-extract in place. This skill is for the case where neither is possible.

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

Files

SKILL.md and 1 other file in .claude/skills/decompress-binary of ClickHouse/ClickHouse.

  • SKILL.md
  • extract_self_extracting.py

Open the folder on GitHubat commit cd023af

Compare with similar skills

Decompress Binary 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.

Decompress Binary compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Decompress Binary this skillClickHouse/ClickHouse50k—~1.1kAutomated safety check: PassApache-2.0
Clickhouse Architecture Advisorvemetric/vemetric3942 repos~791Automated safety check: PassApache-2.0
Clickhouse Ioaffaan-m/ECC275k3 repos~2.3kAutomated safety check: PassMIT
Clickhouse Ioaffaan-m/ECC275k2 repos~2.3kAutomated safety check: PassMIT
Clickhouse Ioaffaan-m/ECC275k1 repos~2.7kAutomated safety check: PassMIT
Gram Telemetry Query Dimensionsspeakeasy-api/gram272—~2.4kAutomated safety check: PassAGPL-3.0

Similar skills

  • MUST USE when designing ClickHouse architectures, selecting between ingestion or modeling patterns, or translating best practices into workload-specific system designs.

    394 GitHub starsUsed in 2 repos~791 tokens
    DatabasesAuto-check passed
  • Clickhouse Io

    affaan-m/ECC

    ClickHouse数据库模式、查询优化、分析以及高性能分析工作负载的数据工程最佳实践. An agent skill from affaan-m/ECC.

    275k GitHub starsUsed in 3 repos~2.3k tokens
    DatabasesAuto-check passed
  • Clickhouse Io

    affaan-m/ECC

    고성능 분석 워크로드를 위한 ClickHouse 데이터베이스 패턴, 쿼리 최적화, 분석 및 데이터 엔지니어링 모범 사례.

    275k GitHub starsUsed in 2 repos~2.3k tokens
    DatabasesAuto-check passed
  • Clickhouse Io

    affaan-m/ECC

    ClickHouse database patterns, query optimization, analytics, and data engineering best practices for high-performance analytical workloads.

    275k GitHub starsUsed in 1 repo~2.7k tokens
    DatabasesAuto-check passed
  • How to add a new attribute value (dimension) that the generic org-scoped telemetry.query analytics endpoint can group by and filter on.

    272 GitHub stars~2.4k tokensUpdated today
    DatabasesAuto-check passed
  • Clickhouse Io

    xu-xiang/everything-claude-code-zh

    ClickHouse 数据库模式、查询优化、分析以及高性能分析工作负载的数据工程最佳实践. An agent skill from xu-xiang/everything-claude-code-zh.

    2k GitHub stars~2.1k tokensUpdated 7 mo ago
    DatabasesAuto-check passed

More from ClickHouse/ClickHouse

All 24 skills in this repo
  • Keeper Stress Analysis

    ClickHouse/ClickHouse

    Analyze ClickHouse Keeper stress-test results from play.clickhouse.com / keeperstresstests data warehouse.

    50k GitHub stars~4.7k tokensUpdated today
    Auto-check passed
  • Perf Comparison

    ClickHouse/ClickHouse

    Evaluate ClickHouse performance test results from existing CI/dashboard data or local perf.py runs.

    50k GitHub stars~3.9k tokensUpdated today
    Auto-check: notes
  • Patch Release Check

    ClickHouse/ClickHouse

    Check whether ClickHouse's supported versions (last 3 majors + latest LTS) have recent stable patch releases, diagnose why the scheduled AutoReleases pipeline failed, and identify which releases…

    50k GitHub stars~4k tokensUpdated today
    Auto-check: notes
  • Alloc Profile

    ClickHouse/ClickHouse

    Analyze a jemalloc (or other) allocation profile in collapsed stack format.

    50k GitHub stars~4.3k tokensUpdated today
    Auto-check passed
  • Bisect

    ClickHouse/ClickHouse

    Bisect a ClickHouse regression using pre-built master binaries from CI.

    50k GitHub stars~1.4k tokensUpdated today
    Auto-check passed
  • Clickhouse PR Description

    ClickHouse/ClickHouse

    Generate PR descriptions for ClickHouse/ClickHouse that match maintainer expectations.

    50k GitHub stars~1.9k tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Decompress Binary

What does Decompress Binary do?

Extract the inner ELF from a ClickHouse self-extracting clickhouse binary, including when its architecture differs from the host (e.g. Decompress Binary is an agent skill from ClickHouse/ClickHouse.g.

When should I use Decompress Binary?

Decompress Binary fits situations like: gdb/lldb needs real symbols from a downloaded CI/release binary; self-extraction by running the binary is not possible because of an architecture mismatch.

How do I install Decompress Binary in Claude Code?

Run `npx skills add ClickHouse/ClickHouse --skill decompress-binary -a claude-code`. Or copy the skill folder (.claude/skills/decompress-binary in ClickHouse/ClickHouse) into .claude/skills/decompress-binary in your project. Claude Code loads it when a task matches its description.

How do I install Decompress Binary in Codex?

Run `npx skills add ClickHouse/ClickHouse --skill decompress-binary -a codex`. Or copy the skill folder (.claude/skills/decompress-binary in ClickHouse/ClickHouse) into .agents/skills/decompress-binary in your project. Codex loads it when a task matches its description.

Can I use Decompress Binary 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 ClickHouse/ClickHouse --skill decompress-binary -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/decompress-binary, .gemini/skills/decompress-binary, .github/skills/decompress-binary and .opencode/skills/decompress-binary in your project.

What does Decompress Binary need to run?

Going by SKILL.md and its folder, Decompress Binary needs Python for the scripts in its folder and the command-line tools its instructions call (curl and python3). Our summary lists: Python 3. Its frontmatter pre-approves these tools: Bash(python3:*), Bash(zstd:*), Bash(llvm-objdump:*), Bash(llvm-nm:*), Bash(file:*), Bash(curl:*), Bash(ls:*), Bash(stat:*), Read, Write.

Does Decompress Binary access the network?

SKILL.md names 1 domain. In commands or code: clickhouse-builds.s3.amazonaws.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Decompress Binary 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 Decompress Binary use?

Decompress Binary is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Decompress Binary use?

About 1.1k tokens (SKILL.md is roughly 4.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 Decompress Binary?

Skills that share tags, products or a category with Decompress Binary: Clickhouse Architecture Advisor (vemetric/vemetric, 394 stars), Clickhouse Io (affaan-m/ECC, 275k stars), Clickhouse Io (affaan-m/ECC, 275k stars) and Clickhouse Io (affaan-m/ECC, 275k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Decompress Binary?

ClickHouse (a GitHub organization) maintains it in ClickHouse/ClickHouse, which has 50,288 GitHub stars. The repository holds 24 skills in this directory. The repository was last updated on October 8, 2026.

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