Agent skill

SimpleITK Binary Data Upload

by SimpleITK in SimpleITK/SimpleITK

Uploads a binary test file to the SimpleITK ExternalData repository by hashing it with SHA-512, staging it in the object store, writing a content-link file and opening a draft PR.

Apache-2.0Auto-check passedTesting & QA

Install SimpleITK Binary Data Upload

skills CLI
$ npx skills add SimpleITK/SimpleITK --skill sitk-upload-binary-data -a claude-code

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

GitHub CLI
$ gh skill install SimpleITK/SimpleITK sitk-upload-binary-data --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/SimpleITK/SimpleITK.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/skills/sitk-upload-binary-data .claude/skills/sitk-upload-binary-data && 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
sitk-upload-binary-data
GitHub stars
1.1k
Token cost
~1.9k tokens
SKILL.md length
799 words
Files
3 (incl. scripts)
Skills in repo
1
Repo updated
First seen
Licence
Apache-2.0

At a glance

Uploads a binary test file to the SimpleITK ExternalData repository by hashing it with SHA-512, staging it in the object store, writing a content-link file and opening a draft PR.

  • Works in 6 steps: Verify the file exists → Verify the .ExternalData clone and… → Hash, copy, create content links, remove… → …
  • Adding a new binary test image or baseline output to SimpleITK
  • SKILL.md covers When to Use, Required Tools, Background and Bundled Script, plus 1 more section
  • Runs Shell scripts from its folder; calls git, bash and gh

What it does

Binary test inputs and baseline images in SimpleITK are not committed directly; instead a CMake ExternalData content-link file holding only a 128-character lowercase SHA-512 hash replaces the binary in the main repository, while the actual file lives in the SimpleITKExternalData repository, cloned locally into a gitignored .ExternalData folder that also serves as the local CMake object store.

A bundled bash script, hash_and_stage.sh, run from the SimpleITK source root with one or more file paths, checks that sha512sum, git and the ExternalData clone are present, then for each file computes its hash, copies it into .ExternalData/SHA512/<hash> unless that hash already exists, writes the matching .sha512 content-link file, removes the original binary, and flags any existing .md5 content link for removal. It prints the suggested git add and git rm commands rather than running them, and the skill requires git and the gh CLI to be available for the fork and PR step.

When your agent uses it

  • Adding a new binary test image or baseline output to SimpleITK
  • Replacing a binary file in the repo with a CMake ExternalData content link
  • Uploading test data too large to commit directly to the SimpleITK Git repo

Example prompts

  • “Upload this new baseline image as ExternalData and open a draft PR.”
  • “Create a sha512 content link for Testing/Data/Input/newscan.nrrd.”
  • “Stage these three test images in the ExternalData object store.”

Requirements

  • git and the gh CLI
  • sha512sum or shasum
  • A clone of SimpleITK/SimpleITKExternalData at .ExternalData

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Verify the file exists
  2. Verify the .ExternalData clone and select a push remote
  3. Hash, copy, create content links, remove originals
  4. Create branch, commit, and PR in ExternalData repo
  5. Stage the content link in SimpleITK
  6. Report to user

What it can do on your machine

Read from SKILL.md and the folder at commit bb259aa. 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

    Ships 1 file in scripts/ (Shell), which the agent can run.

    Shell commands in SKILL.md call:

    • git
    • bash
    • gh

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

  • Network

    Links to these hosts (documentation or services it may open):

    • cmake.org

    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

SimpleITK Binary Data Upload loads about 1.9k tokens when it runs. Until then it costs about 55 tokens; SKILL.md has 799 words of instructions outside code blocks.

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

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); the scripts in this folder are not scanned.

SKILL.md

The full file from SimpleITK/SimpleITK at commit bb259aa, republished under its Apache-2.0 licence (© SimpleITK). 799 words, ~1,860 tokens.

Download SKILL.mdSave it as .claude/skills/sitk-upload-binary-data/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
sitk-upload-binary-data
description
Upload binary testing data to SimpleITK ExternalData repository. Use when: adding test data, uploading binary file, creating content link, new test input, ExternalData upload, sha512 content link.
argument-hint
Relative path to binary file, e.g. Testing/Data/Baseline/MyFilter_output.nrrd

Upload Binary Data to SimpleITK ExternalData

Upload binary files (test inputs, baseline images, etc.) to the SimpleITK/SimpleITKExternalData GitHub repository by computing their SHA-512 hash, placing them in the .ExternalData object store, creating content link files, and opening a draft PR.

When to Use

  • Adding new test input images or baseline outputs
  • Uploading any binary file that should not be committed to the SimpleITK Git repo
  • Replaces input file with a .sha512 CMake ExternalData content link

Required Tools

Verify these are available before proceeding:

ToolPurposeCheck command
gitRepository operationsgit --version
ghGitHub CLI for forking/PRsgh auth status
sha512sum or shasumCompute file hashessha512sum --version (Linux) or shasum --version (macOS)

Background

Binary test data in SimpleITK uses CMake ExternalData. Content link files (e.g. Testing/Data/Input/image.nrrd.sha512) contain only a 128-character lowercase hex SHA-512 hash followed by a newline. The .ExternalData directory at the SimpleITK source root is a clone of SimpleITK/SimpleITKExternalData and also a local CMake ExternalData object store (listed in .gitignore), so builds work immediately once a file is placed there.

Always create .sha512 content links and SHA512/<hash> objects. See resources/external-data-background.md for full history, legacy considerations, and object store/URL resolution details.

Bundled Script

scripts/hash_and_stage.sh

A bash script that handles hashing, copying, content-link creation, and cleanup for one or more binary files. Run from the SimpleITK source root.

Usage:

bash .github/skills/sitk-upload-binary-data/scripts/hash_and_stage.sh <file1> [<file2> ...]

What it does:

  1. Validates prerequisites (sha512sum, git repo, .ExternalData clone).
  2. For each file:
    • Computes the SHA-512 hash via sha512sum.
    • Copies the binary to .ExternalData/SHA512/<hash> (skips if the hash already exists).
    • Writes <file>.sha512 containing the 128-char hex hash + newline.
    • Removes the original binary file.
    • Notes any existing .md5 content link for removal.
  3. Prints suggested git add / git rm commands.

Output labels:

  • COPY — binary copied to object store
  • SKIP — hash already present, no copy needed
  • LINK — .sha512 content link created
  • DEL — original binary removed

Does NOT: create branches, commit, push, or open PRs — those steps are performed separately (see Step 4 below).

Exit codes: non-zero on any error (missing file, bad .ExternalData directory, missing sha512sum). The error message explains the problem.

Procedure

Given one or more binary file paths relative to the SimpleITK source root. Example: Testing/Data/Baseline/BasicFilters_NormalizedCorrelationImageFilter_NoMask.nrrd

Step 1 — Verify the file exists

Confirm each binary file is present at the given path. If not, stop and tell the user.

Show full SKILL.md (423 more words)Show less
Step 2 — Verify the .ExternalData clone and select a push remote

All commands run from the SimpleITK source root. First confirm .ExternalData is a real git clone:

bash
test -d .ExternalData/.git

If this fails, stop and tell the user:

The .ExternalData directory must be a clone of SimpleITK/SimpleITKExternalData. To set it up (including a configured push remote), run:

Utilities/GitSetup/setup-externaldata

Otherwise, list its remotes to identify both the upstream and the remote to push to:

bash
git -C .ExternalData remote -v
  • The remote pointing at SimpleITK/SimpleITKExternalData itself (typically origin) is <upstream-remote> — used in Step 4 to fetch and base the branch on main. Do not assume it is named origin, read the actual name from the remote -v output.

  • Utilities/GitSetup/setup-externaldata configures a fork push remote in .ExternalData automatically, using the same remote name as github.fork.remote in the main SimpleITK repo (mirroring the fork account already set up for SimpleITK's own GitHub remote via setup-github). Prefer this convention over guessing:

    bash
    fork_remote=$(git config --get github.fork.remote)

    If <fork_remote> is non-empty and also exists as a remote in .ExternalData (per the remote -v output above), use it directly as <push-remote> — no need to ask the user.

  • Otherwise, fall back to inspecting the other remotes (not <upstream-remote>):

    • If exactly one remains, use its name as <push-remote>.
    • Otherwise (zero or multiple candidates), ask the user to rerun the SetupForDevelopment scripts.

Use <upstream-remote> and <push-remote> in Step 4.

Run the bundled script from the SimpleITK source root:

bash
bash .github/skills/sitk-upload-binary-data/scripts/hash_and_stage.sh \
  path/to/file1 [path/to/file2 ...]

Capture the hash from the script output (the COPY or SKIP line) or read it from the generated .sha512 file:

bash
HASH=$(cat path/to/file.sha512)

If the script fails, read its error output and report to the user.

Step 4 — Create branch, commit, and PR in ExternalData repo

All commands use git -C .ExternalData to stay in the source root. Run from the SimpleITK source root:

bash
git -C .ExternalData fetch <upstream-remote>
git -C .ExternalData checkout -B <branch-name> <upstream-remote>/main
git -C .ExternalData add SHA512/<hash>
git -C .ExternalData commit -m "Add <original-filename>"
git -C .ExternalData push --force-with-lease <push-remote> HEAD:<branch-name>

The gh CLI does not support -C, so use a subshell for PR creation. The subshell does not change the parent shell's working directory:

bash
(cd .ExternalData && gh pr create --repo SimpleITK/SimpleITKExternalData \
  --title "Add <original-filename>" \
  --body "Binary testing data for SimpleITK." \
  --draft)

Branch naming: Use the sanitized original filename (replace dots and special chars with hyphens, no prefix). For multiple files use upload-N-files.

Commit message: Add filename1, filename2, ... — include original filenames so reviewers know what the data is.

Back in the SimpleITK source root:

bash
git add -- path/to/file.sha512
Step 6 — Report to user

Summarize:

  • Content link created at <path>.sha512
  • Data placed in .ExternalData/SHA512/<hash> (builds work locally now)
  • Draft PR opened on SimpleITK/SimpleITKExternalData (include URL)
  • Remind: data won't be available via S3/CMake download until the ExternalData PR is merged

Troubleshooting Resources

© SimpleITK, 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 2 other files (scripts) in .github/skills/sitk-upload-binary-data of SimpleITK/SimpleITK.

  • SKILL.md
  • resources/external-data-background.md
  • scripts/hash_and_stage.sh

Open the folder on GitHubat commit bb259aa

Compare with similar skills

SimpleITK Binary Data Upload 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.

SimpleITK Binary Data Upload compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
SimpleITK Binary Data Upload this skillSimpleITK/SimpleITK1.1k—~1.9kAutomated safety check: PassApache-2.0
Update Megatron Golden ValuesNVIDIA/Megatron-LM18k—~2.8kAutomated safety check: PassCustom licence
Audit AI Codejxnl/personal-monorepo-template562—~1.7kAutomated safety check: PassNone
Adf MasterKilo-Org/kilo-marketplace189—~3.2kAutomated safety check: PassMIT
OpenHarness End-to-End EvalsHKUDS/OpenHarness16k1 repos~2.1kAutomated safety check: NotesMIT
Jest Testing PatternsChrisWiles/claude-code-showcase6.1k7 repos~1.5kAutomated safety check: PassNone

Similar skills

  • Official

    Refreshes stored golden values from a GitHub Actions run, reports signed percentage changes per model, and writes a summary ready for a pull request description.

    18k GitHub stars~2.8k tokensUpdated today
    Testing & QAAuto-check passed
  • Audit AI Code

    jxnl/personal-monorepo-template

    Audit, de-slop, parameterize, modularize, or safely clean up AI-generated or AI-shaped backend/general code.

    562 GitHub stars~1.7k tokensUpdated 3 mo ago
    DevelopmentAuto-check passed
  • Adf Master

    Kilo-Org/kilo-marketplace

    Azure Data Factory (ADF) CI/CD, deployment, and pipeline development.

    189 GitHub stars~3.2k tokensUpdated 8 days ago
    DevOps & CloudAuto-check passed
  • Validates OpenHarness features by running real multi-turn agent loops with live LLM calls against an unfamiliar codebase, checking actual tool execution.

    16k GitHub starsUsed in 1 repo~2.1k tokens
    Testing & QAAuto-check: notes
  • Jest Testing Patterns

    ChrisWiles/claude-code-showcase

    Jest patterns for React Native style tests: TDD discipline, mock factory functions, module and GraphQL hook mocking, custom render helpers and anti-patterns to avoid.

    6.1k GitHub starsUsed in 7 repos~1.5k tokens
    Testing & QAAuto-check passed
  • Official

    Creates a Java SDK end-to-end test for the Copilot SDK that runs against a recorded YAML snapshot through a replay proxy, so CI needs no real authentication.

    11k GitHub stars~1.8k tokensUpdated today
    Testing & QAAuto-check passed

Works with

Categories

Questions about SimpleITK Binary Data Upload

What does SimpleITK Binary Data Upload do?

Uploads a binary test file to the SimpleITK ExternalData repository by hashing it with SHA-512, staging it in the object store, writing a content-link file and opening a draft PR. ExternalData folder that also serves as the local CMake object store.

When should I use SimpleITK Binary Data Upload?

SimpleITK Binary Data Upload fits situations like: adding a new binary test image or baseline output to SimpleITK; replacing a binary file in the repo with a CMake ExternalData content link; uploading test data too large to commit directly to the SimpleITK Git repo.

How do I install SimpleITK Binary Data Upload in Claude Code?

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

How do I install SimpleITK Binary Data Upload in Codex?

Run `npx skills add SimpleITK/SimpleITK --skill sitk-upload-binary-data -a codex`. Or copy the skill folder (.github/skills/sitk-upload-binary-data in SimpleITK/SimpleITK) into .agents/skills/sitk-upload-binary-data in your project. Codex loads it when a task matches its description.

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

What does SimpleITK Binary Data Upload need to run?

Going by SKILL.md and its folder, SimpleITK Binary Data Upload needs a shell for the scripts in its folder and the command-line tools its instructions call (git, bash and gh). Our summary lists: git and the gh CLI; sha512sum or shasum; A clone of SimpleITK/SimpleITKExternalData at .ExternalData.

Does SimpleITK Binary Data Upload access the network?

SKILL.md names 1 domain. As links in the text: cmake.org. This is read from the text; nothing was executed.

Is SimpleITK Binary Data Upload 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. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does SimpleITK Binary Data Upload use?

SimpleITK Binary Data Upload 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 SimpleITK Binary Data Upload use?

About 1.9k tokens (SKILL.md is roughly 7.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 SimpleITK Binary Data Upload?

Skills that share tags, products or a category with SimpleITK Binary Data Upload: Update Megatron Golden Values (NVIDIA/Megatron-LM, 18k stars), Audit AI Code (jxnl/personal-monorepo-template, 562 stars), Adf Master (Kilo-Org/kilo-marketplace, 189 stars) and OpenHarness End-to-End Evals (HKUDS/OpenHarness, 16k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains SimpleITK Binary Data Upload?

SimpleITK (a GitHub organization) maintains it in SimpleITK/SimpleITK, which has 1,092 GitHub stars. The repository was last updated on October 5, 2026.

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