Agent skill

Citus Backport

by citusdata in citusdata/citus

Backport one or more merged citusdata/citus main commits/PRs onto the active release branches.

AGPL-3.0Auto-check passedDatabases

Install Citus Backport

skills CLI
$ npx skills add citusdata/citus --skill citus-backport -a claude-code

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

GitHub CLI
$ gh skill install citusdata/citus citus-backport --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/citusdata/citus.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/skills/citus-backport .claude/skills/citus-backport && 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
citus-backport
GitHub stars
13k
Token cost
~3.2k tokens
SKILL.md length
1,568 words
Files
4 (incl. references)
Skills in repo
3
Repo updated
First seen
Licence
AGPL-3.0

At a glance

Backport one or more merged citusdata/citus main commits/PRs onto the active release branches.

  • Works in 11 steps: Use an isolated build per target major.… → Make the SHAs reachable, then git… → Resolve → …
  • Asked to backport / port / cherry-pick a change to release-13.2 / release-14.0 (or the newest two majors)
  • SKILL.md covers Reference deep-dives (load on…, Release model (internalize…, Workflow (per PR, per target… and Hard rules / traps (full…
  • Calls make, git and python

What it does

Citus Backport is an agent skill from citusdata/citus. Backport one or more merged citusdata/citus main commits/PRs onto the active release branches. Covers the release model, cherry-picking, remapping SQL schema changes to each branch's defaultversion, the SQL upgrade/downgrade ladder for Major-Version-Upgrade safety, running regression tests, one clean commit per PR per branch, and triaging release-branch CI (pre-existing baseline reds vs reds the backport introduced). USE WHEN asked to backport / port / cherry-pick a change to release-13.2 / release-14.0 (or the…

Its SKILL.md is about 3.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including reference files (for example `references/ci-triage.md`, `references/manual-upgrade-testing.md` and `references/sql-schema-backport.md`).

It sits in Databases, covering SQL, Code migrations and Pull requests. It works with SQL and PostgreSQL. The repository describes itself as: Distributed PostgreSQL as an extension. The licence is AGPL-3.0.

When your agent uses it

  • Asked to backport / port / cherry-pick a change to release-13.2 / release-14.0 (or the newest two majors)
  • A backport hits a SQL migration / udf / multiextension conflict
  • A trivial C-only backport fails to compile on an older PG the release branch still supports (e.g
  • Non-Citus repos

Example prompts

  • “trivial C-only”
  • “/citus-backport”

Requirements

  • Python 3

Workflow steps

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

  1. Use an isolated build per target major. A dedicated checkout/worktree + its own PostgreSQL
  2. Make the SHAs reachable, then git checkout -b bp-- origin/
  3. Resolve
  4. Build in the isolated env: make -sj"$(nproc 2>/dev/null || sysctl -n hw.logicalcpu)" install. For any SQL change ALSO install
  5. Test only what's relevant (CI runs the whole suite): the feature's own test + multi_extension
  6. Collapse to ONE commit per PR per branch. Keep the original message; keep a DESCRIPTION
  7. Push to your fork. bp-* branches don't match CI's push trigger (main/release-* only),
  8. Wait for CI and triage per references/ci-triage.md. Separate baseline-red noise (N-1 /
  9. Propagate the ladder UP (SQL-schema backports only). A new SQL object must also be reachable
  10. Add multi_extension.sql ladder-test coverage for every new step. The test only walks the
  11. Prove MVU safety on a real cluster (SQL-schema backports, after CI is green). The ladder

What it can do on your machine

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

    • make
    • git
    • python
    • gh

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

  • Network

    No URLs in SKILL.md. Its commands use git and gh, which can reach the network depending on how they are called.

    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

Citus Backport loads about 3.2k tokens when it runs, and up to ~14k if it reads all its reference files. Until then it costs about 259 tokens; SKILL.md has 1,568 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~259
When it runs · the whole SKILL.md, loaded when a task matches
~3.2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~14k

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 citusdata/citus at commit d41eec3, republished under its AGPL-3.0 licence (© citusdata). 1,568 words, ~3,193 tokens.

Download SKILL.mdSave it as .claude/skills/citus-backport/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
citus-backport
description
Backport one or more merged citusdata/citus `main` commits/PRs onto the active release branches. Covers the release model, cherry-picking, remapping SQL schema changes to each branch's default_version, the SQL upgrade/downgrade ladder for Major-Version-Upgrade safety, running regression tests, one clean commit per PR per branch, and triaging release-branch CI (pre-existing baseline reds vs reds the backport introduced). USE WHEN asked to backport / port / cherry-pick a change to release-13.2 / release-14.0 (or the newest two majors), when a backport hits a SQL migration / udf / multi_extension conflict, when a "trivial C-only" backport fails to compile on an older PG the release branch still supports (e.g. PG15 `rteperminfos`), when release-branch CI is red and you must prove which reds are pre-existing, or when you must prove a SQL-schema backport is Major-Version-Upgrade-safe via `ALTER EXTENSION citus UPDATE` across a real multi-node cluster. DO NOT USE for non-Citus repos, new features, or PR review.
license
See the repository LICENSE file.

Backport a Citus change to the release branches

This skill encodes how to backport merged main commit(s) to Citus release branches: the release model, the SQL-schema remap recipe, the PG-version compatibility traps, and how to triage the release branches' baseline-red CI. Follow the repository's normal build/test/style conventions (see CONTRIBUTING.md and src/test/regress/README.md) on top of the guidance here.

Reference deep-dives (load on demand)

All live next to this file under references/:

  • references/sql-schema-backport.md — the hard case: a commit that changes the SQL schema (new UDF / column / migration). Exact file-by-file remap recipe, the multi_extension.out and upgrade_list_citus_objects.out edits, the install-downgrades trap, and the cross-branch ladder-propagation step (copy the introduction paths UP to every higher major for MVU safety).
  • references/ci-triage.md — reading backport CI: the PG-version compile traps (main drops old PGs the release branch keeps), the N-1 mixed-version jobs, and the step-by-step proof that a red job is pre-existing baseline noise vs a real regression you introduced.
  • references/manual-upgrade-testing.md — the manual MVU proof: stand up a multi-node cluster at an OLD Citus major, then ALTER EXTENSION citus UPDATE across the backport branches (13.x tail → cross-major → 14.x tail), capturing citus_version() + pg_extension.extversion per node per hop. The make install-all / single-shared-PG requirement.

A C-only backport usually needs only this hub + ci-triage.md. A SQL-schema backport needs all four (add manual-upgrade-testing.md as the final proof once CI is green).

Release model (internalize this first)

  • ONE branch per MAJOR. release-13.2 serves the WHOLE 13.x line; release-14.0 serves ALL of 14.x; main is the next major. Citus no longer cuts a branch per minor (this changed ~2026-05).
  • Backport FEATURES, not just bugfixes, to the newest two majors (13 & 14 as of this writing).
  • Branch names LIE about the version. release-13.2 currently ships 13.4; release-14.0 ships 14.2. NEVER infer the target minor from the branch name — read default_version from src/backend/distributed/citus.control on each target branch. That value drives every SQL edit.
  • N-1 compatibility is required and CI-gated. A backport is N-1-safe when it is purely ADDITIVE (new UDF / GUC / column) and does not change an existing UDF signature or wire format used cross-version. If it's additive, it's safe. See references/ci-triage.md for the jobs.

Workflow (per PR, per target branch)

  1. Use an isolated build per target major. A dedicated checkout/worktree + its own PostgreSQL install per release branch keeps builds/tests from clobbering each other and your main checkout. Two worktrees of the same clone SHARE one git object store — all branches are visible/pushable from either, and a +-prefixed branch in git branch is checked out in a sibling worktree.
  2. Make the SHAs reachable, then git checkout -b bp-<pr>-<release-branch> origin/<release-branch> and git cherry-pick -x <sha> (the -x records (cherry picked from commit <sha>)).
  3. Resolve:
    • C-only: usually applies clean or with trivial context conflicts. THEN check PG-version compat (references/ci-triage.md §PG-version) — the #1 non-obvious C-backport failure.
    • SQL-schema: migration / udf / multi_extension.out conflict → remap by hand per references/sql-schema-backport.md. Do NOT just accept main's next-major (e.g. 15.0-1) files.
  4. Build in the isolated env: make -sj"$(nproc 2>/dev/null || sysctl -n hw.logicalcpu)" install. For any SQL change ALSO install downgrades (see references/sql-schema-backport.md — plain make install skips them and multi_extension will fail with cascading "no update path" errors otherwise; use make install-all).
  5. Test only what's relevant (CI runs the whole suite): the feature's own test + multi_extension for SQL changes. From src/test/regress: python citus_tests/run_test.py <test> (it manages its own cluster). Regenerate any expected/*.out with the runner — never hand-edit .out (column widths / row counts are dynamic).
  6. Collapse to ONE commit per PR per branch. Keep the original message; keep a DESCRIPTION: first line iff the change is user-facing (this feeds the changelog). git checkout -- configure if a build regenerated it (configure is never part of a backport). Multiple PRs to the SAME target → ONE branch per target, not per PR (unsquashed: one commit per PR, in main's chronological merge order; SQL-ladder commits sit right after their PR's cherry-pick). Name it bp-release-<major> (e.g. bp-release-13.2). Build cleanly from the SQL-heavy PR's branch, then cherry-pick the C-only PRs on top. Cherry-pick an already-adapted backport commit WITHOUT -x — its message already carries the single (cherry picked from <orig>) trailer; -x would double it.
  7. Push to your fork. bp-* branches don't match CI's push trigger (main/release-* only), so kick CI with gh workflow run "Build & Test" --repo <your-fork>/citus --ref <branch>. Open PRs only when the change owner asks.
  8. Wait for CI and triage per references/ci-triage.md. Separate baseline-red noise (N-1 / flaky / coverage) from genuinely-new failures you introduced. The two you WILL hit on a release branch: (a) a version-pinned .out that prints a shared helper's changed signature, and (b) a PG-version planner divergence on the OLDER PG the branch keeps but main dropped (PREFER a PG-guarded file like pg16.sql over a <test>_N.out alt file). A third you must NOT chase green by mangling the test: a new GUC/UDF whose test runs under N-1 shows a NEW red in the (non-blocking) N-1 mixed-version jobs — the old lib lacks it and falls back, which IS the N-1 contract. The clean fix is to move that test line into the multi_1_create_citus_schedule placeholder section (schedule mechanics + N-1 label rule in the hard-rules below and ci-triage.md §"NEW N-1 red"). Fix-commit rule (all fixes): pre-review → amend + git push --force-with-lease; post-review → add ONE new fix commit, never rewrite reviewed SHAs (replace a bad remote fix commit with --force-with-lease=<branch>:<badsha>). Report evidence; don't declare done on red.
  9. Propagate the ladder UP (SQL-schema backports only). A new SQL object must also be reachable on every HIGHER major's upgrade ladder, or a future 13.x→14.y Major Version Upgrade loses it. As SEPARATE commits (its own PR on main), copy the introduction step/downgrade/udf files byte-for-byte onto release-14.0 (for a 13.x path) and main (for 13.x and 14.x paths, given today's two most recent major versions); main's own top path stays untouched. Full topology + recipe in references/sql-schema-backport.md §Step 5.
  10. Add multi_extension.sql ladder-test coverage for every new step. The test only walks the main upgrade path, so a step OFF that path (a 13.x/14.x maintenance-tail detour) is never exercised unless you add a detour block matching the on-walk shape (and the file's existing comment style — no editorial parentheticals): a round-trip no-op + a snapshot at the detour, then retarget the existing next round-trip to bounce <detour> ↔ <next> rather than adding a separate "return" block. That shifts exactly one downstream snapshot; everything after stays byte-identical. A branch's own top/default_version is already covered by its snapshot block. Never hand-edit .out; prefer append-only on reviewed branches. Full pattern + the diff -w header gotcha in references/sql-schema-backport.md.
  11. Prove MVU safety on a real cluster (SQL-schema backports, after CI is green). The ladder propagation only claims a future 13→14 Major Version Upgrade keeps the object; prove it. Stand up a multi-node cluster at an OLD major, then ALTER EXTENSION citus UPDATE on EVERY node across the backport branches (13.x tail → cross-major → 14.x tail → cross-major → main tail), capturing citus_version() and pg_extension.extversion per node per hop, plus a functional check that the backported object survived. Build all Citus versions into ONE shared PG with make install-all (plain install omits the downgrade + bridge scripts the cross-major route needs → "no update path"). Full recipe and the single-PG requirement in references/manual-upgrade-testing.md.
Show full SKILL.md (388 more words)Show less

Hard rules / traps (full detail in the references)

  • Do NOT run make reindent in a build environment whose citus_indent version differs from the branch's — a version-skewed formatter reformats 100+ unrelated files and errors out. Trust cherry-picked formatting; CI check-style verifies it. If you ran it by accident: git reset --hard HEAD.
  • make install does NOT install downgrade scripts. For any SQL change run BOTH make -C src/backend/distributed install-downgrades and make -C src/backend/columnar install-downgrades (columnar is a separate extension). make install-all does both.
  • A single build environment builds ONE PG only — it cannot catch a compile break on another PG the release branch supports. Rely on CI's per-PG Build for PGNN jobs; scan cherry-picked C for struct fields / APIs newer than the branch's OLDEST PG and add #if PG_VERSION_NUM >= PG_VERSION_NN.
  • The release branches are BASELINE-RED. Several N-1 / flaky jobs fail on the pristine base branch with no backport. Subtract the baseline before blaming your change — prove it with the upstream citusdata/citus base-branch run. Details + exact commands in references/ci-triage.md.
  • A new SQL object is defined MULTIPLE times on purpose. After ladder propagation the same UDF appears in the 13.x, 14.x AND main introduction steps (triple-defined on main). That is intentional MVU/N-1 safety, NOT duplication to collapse. Never "dedupe" it. Details: references/sql-schema-backport.md §Step 5.
  • Show evidence. Present the proof (build-job outcomes, regression.diffs excerpts, the upstream-baseline comparison), not a bare "CI is green/red".
  • A backport onto an older-PG release branch surfaces failures main never saw (release-13.2 still builds PG15; the branch ships version-pinned expected/*.out). Two patterns: (1) a shared helper whose SIGNATURE you changed prints in a pinned .out (normalize.sed masks the line NUMBER, not the signature) — do NOT "fix" it by reverting the helper if the backported TEST needs it (it's required, not over-reach); (2) a PG15-vs-PG16+ EXPLAIN/planner diff → PREFER a PG-guarded file (pg16.sql \q-skips <PG16 and already lives in the N-1-excluded schedule) over a <test>_0.out alt. Full recipe: references/ci-triage.md §Genuinely-new failures.
  • A NEW GUC/UDF whose test runs under N-1 has a CLEAN fix, not "leave it". Move the test line from its schedule into the multi_1_create_citus_schedule placeholder section (N-1 make_targets omit check-multi-1-create-citus). N-1 version label = the branch's CURRENT N-1 = the previous minor (13.3-1 on release-13.2, 14.1-1 on release-14.0), read from the live citus_version: / citus_libdir: pin in build_and_test.yml — not the (possibly-stale) number in the neighbor comment. Details: references/ci-triage.md §"NEW N-1 red".

© citusdata, 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

SKILL.md and 3 other files (references) in .github/skills/citus-backport of citusdata/citus.

  • SKILL.md
  • references/ci-triage.md
  • references/manual-upgrade-testing.md
  • references/sql-schema-backport.md

Open the folder on GitHubat commit d41eec3

Compare with similar skills

Citus Backport 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.

Citus Backport compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Citus Backport this skillcitusdata/citus13k—~3.2kAutomated safety check: PassAGPL-3.0
Schema Explorationtimescale/pg-aiguide1.9k—~1.1kAutomated safety check: PassApache-2.0
Mz PR ReviewMaterializeInc/materialize6.4k—~1.6kAutomated safety check: NotesCustom licence
Diesel Guardayarotsky/diesel-guard121—~3.1kAutomated safety check: PassMIT
Database Scoutzebbern/claude-code-guide4.7k—~1.1kAutomated safety check: PassMIT
SQL Code Reviewtotvs/engpro-advpl-tlpp-skills143—~3.5kAutomated safety check: PassMIT

Similar skills

  • Schema Exploration

    timescale/pg-aiguide

    Explore an existing PostgreSQL database before answering questions about its data or writing SQL.

    1.9k GitHub stars~1.1k tokensUpdated 2 days ago
    DatabasesAuto-check passed
  • Mz PR Review

    MaterializeInc/materialize

    Local code review of current branch vs Materialize standards.

    6.4k GitHub stars~1.6k tokensUpdated today
    DevelopmentAuto-check: notes
  • Diesel Guard

    ayarotsky/diesel-guard

    Lints Diesel and SQLx Postgres migrations for unsafe schema changes that lock tables or cause downtime, and authors custom Rhai checks.

    121 GitHub stars~3.1k tokensUpdated 11 days ago
    DatabasesAuto-check passed
  • Database Scout

    zebbern/claude-code-guide

    Explore SQLite and PostgreSQL databases: list tables, inspect schemas (columns/types/constraints), preview data, generate Mermaid ER diagrams, and run safe read-only queries.

    4.7k GitHub stars~1.1k tokensUpdated today
    DatabasesAuto-check passed
  • SQL Code Review

    totvs/engpro-advpl-tlpp-skills

    Universal SQL code review assistant that performs comprehensive security, maintainability, and code quality analysis across SQL databases (PostgreSQL, SQL Server, Oracle).

    143 GitHub stars~3.5k tokensUpdated 4 days ago
    DatabasesAuto-check passed
  • SQL Code Review

    github/awesome-copilot

    Official

    Universal SQL code review assistant that performs comprehensive security, maintainability, and code quality analysis across all SQL databases (MySQL, PostgreSQL, SQL Server, Oracle).

    40k GitHub starsUsed in 1 repo~2.2k tokens
    DatabasesAuto-check passed

More from citusdata/citus

  • Fix a failing citusdata/citus check-style job by running make reindent with the exact uncrustify/citusindent versions the currently checked-out branch pins (read from its own STYLEGUIDE.md and its…

    13k GitHub stars~1.5k tokensUpdated yesterday
    Auto-check: notes
  • Citus Merge Loop

    citusdata/citus

    Take a list of citusdata/citus PR links or numbers and merge each one independently: sync it with its base branch, fix a red check-style job with make reindent, retry other red checks a bounded…

    13k GitHub stars~2.5k tokensUpdated yesterday
    Auto-check passed

Works with

Questions about Citus Backport

What does Citus Backport do?

Backport one or more merged citusdata/citus main commits/PRs onto the active release branches. Citus Backport is an agent skill from citusdata/citus. Backport one or more merged citusdata/citus main commits/PRs onto the active release branches.

When should I use Citus Backport?

Citus Backport fits situations like: asked to backport / port / cherry-pick a change to release-13.2 / release-14.0 (or the newest two majors); A backport hits a SQL migration / udf / multiextension conflict; A trivial C-only backport fails to compile on an older PG the release branch still supports (e.g; non-Citus repos.

How do I install Citus Backport in Claude Code?

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

How do I install Citus Backport in Codex?

Run `npx skills add citusdata/citus --skill citus-backport -a codex`. Or copy the skill folder (.github/skills/citus-backport in citusdata/citus) into .agents/skills/citus-backport in your project. Codex loads it when a task matches its description.

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

What does Citus Backport need to run?

Going by SKILL.md and its folder, Citus Backport needs the command-line tools its instructions call (make, git, python and gh). Our summary lists: Python 3.

Does Citus Backport access the network?

SKILL.md contains no URLs. Its commands use git and gh, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Citus Backport 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 Citus Backport use?

Citus Backport 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 Citus Backport use?

About 3.2k tokens (SKILL.md is roughly 13k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 11k tokens, read only when the agent opens those files.

What are the alternatives to Citus Backport?

Skills that share tags, products or a category with Citus Backport: Schema Exploration (timescale/pg-aiguide, 1.9k stars), Mz PR Review (MaterializeInc/materialize, 6.4k stars), Diesel Guard (ayarotsky/diesel-guard, 121 stars) and Database Scout (zebbern/claude-code-guide, 4.7k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Citus Backport?

citusdata (a GitHub organization) maintains it in citusdata/citus, which has 12,803 GitHub stars. The repository holds 3 skills in this directory. The repository was last updated on October 8, 2026.

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