Agent skill

Integrate Worker

by rue-language in rue-language/rue

Integrate a worker agent's diff onto fresh trunk — apply, verify repros by hand, cross-check interacting mechanisms, full suite, ship + queue.

Apache-2.0Auto-check passedDevelopment

Install Integrate Worker

skills CLI
$ npx skills add rue-language/rue --skill integrate-worker -a claude-code

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

GitHub CLI
$ gh skill install rue-language/rue integrate-worker --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/rue-language/rue.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/integrate-worker .claude/skills/integrate-worker && 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
integrate-worker
GitHub stars
1.2k
Token cost
~1.9k tokens
SKILL.md length
1,091 words
Files
1
Skills in repo
1
Repo updated
First seen
Licence
Apache-2.0

At a glance

Integrate a worker agent's diff onto fresh trunk — apply, verify repros by hand, cross-check interacting mechanisms, full suite, ship + queue.

  • Works in 8 steps: Fresh trunk, always. jj git fetch && jj… → Apply with 3-way fallback. git apply… → Re-verify the repros yourself. Build… → …
  • Tasks that involve Git worktrees
  • SKILL.md covers Steps, Lane discipline (when…, Keeping the tree tidy and Worker-prompt invariants this…
  • Calls git, bash and gh

What it does

Integrate Worker is an agent skill from rue-language/rue. Integrate a worker agent's diff onto fresh trunk — apply, verify repros by hand, cross-check interacting mechanisms, full suite, ship + queue. Use after any worktree worker (fix cycle, hunt follow-up) returns a diff file.

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

It sits in Development, covering Git worktrees. It works with Git. The repository describes itself as: A programming language that is higher level than Rust but lower level than Go. Someday, anyways. The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Git worktrees

Example prompts

  • “/integrate-worker”

Workflow steps

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

  1. Fresh trunk, always. jj git fetch && jj new 'trunk()' then
  2. Apply with 3-way fallback. git apply --3way /tmp/.diff.
  3. Re-verify the repros yourself. Build (bash scripts/rue build) and run
  4. Write the cross-mechanism test. If this worker and another (landed or
  5. A tightening change compiles the example corpus BEFORE the suite.
  6. Commit, then full suite + format. ./test.sh must exit 0; `bash
  7. Ship + queue. jj describe (subject + why + what was verified),
  8. Queue bounces (DIRTY after a sibling merges): `jj rebase -s

What it can do on your machine

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

    • git
    • bash
    • 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

Integrate Worker loads about 1.9k tokens when it runs. Until then it costs about 60 tokens; SKILL.md has 1,091 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~60
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); files beside SKILL.md are not scanned.

SKILL.md

The full file from rue-language/rue at commit 5200b11, republished under its Apache-2.0 licence (© rue-language). 1,091 words, ~1,898 tokens.

Download SKILL.mdSave it as .claude/skills/integrate-worker/SKILL.md (or your agent's skills folder).
name
integrate-worker
description
Integrate a worker agent's diff onto fresh trunk — apply, verify repros by hand, cross-check interacting mechanisms, full suite, ship + queue. Use after any worktree worker (fix cycle, hunt follow-up) returns a diff file.

Integrating a worker diff

Battle-tested protocol from the 2026-06 autonomous runs (~30 PRs integrated). Each step exists because skipping it once caused a real failure.

Steps

  1. Fresh trunk, always. jj git fetch && jj new 'trunk()' then git reset --quiet — the colocated git index goes stale after jj working-copy switches and makes git apply --3way fail with "does not match index".

  2. Apply with 3-way fallback. git apply --3way /tmp/<worker>.diff. Conflicts mean the worker's base predates trunk changes — resolve by intent, not by side: a worker editing code that trunk deleted usually means the worker's edit is subsumed (keep the deletion); append-append conflicts in test TOML files keep both case sets.

  3. Re-verify the repros yourself. Build (bash scripts/rue build) and run every repro the worker claims to fix, on this checkout, by execution. A worker's "full suite green" was true in its worktree against its base — not here. Workers have shipped fixes verified against stale drafts of trunk; only integration-time re-verification catches that.

  4. Write the cross-mechanism test. If this worker and another (landed or in-flight) built interacting mechanisms — e.g. one added per-field drop flags while another added drop-on-overwrite — write a test that exercises the combination NOW. The workers' own suites cannot see the seam; twice in one night, individually-green workers were jointly wrong (double-drops).

  5. A tightening change compiles the example corpus BEFORE the suite. ./buck2 build //examples:cli-staged-programs builds all ten multi-file example programs. Any change that makes the compiler reject, trap, or error where it previously accepted needs this, and canaries are not enough: a RUE-1786 over-rejection passed examples/harbor and its own mutation check, and was caught only by examples/gazette — an outer borrow self receiver holding a loan while an inner call takes the same root inout, which is sound because a receiver is address-passed. Minutes against ~20 for the full suite, and it is exactly where over-rejection surfaces. A mutation check proves the fix DOES something; it says nothing about what the fix breaks.

  6. Commit, then full suite + format. ./test.sh must exit 0; bash scripts/rue fmt. Commit before starting the suite and do not touch the checkout while it runs — switching branches mid-run once produced a fabricated E0583: file not found for module comptime citing a line that existed only on trunk, and cost an hour of chasing a bug that was not there. Read the banner: === TEST SUITE: PASSED === is now asserted rather than inferred, and a killed run says INTERRUPTED (SIG..) instead (RUE-1782). Do NOT judge by the tally alone — Buck can return cached results, so a run stopped partway can print a complete-looking Tests finished: ... Fail 0 and still not have finished. The banner is what distinguishes them.

  7. Ship + queue. jj describe (subject + why + what was verified), jj git push -c @, gh pr create --repo rue-language/rue --base trunk --head steveklabnik:<bookmark> with one Fixes RUE-NN per line (a comma list only closes the first), gh pr merge <n> --auto. Use Part of RUE-NN when items remain — and remember "Part of" strands the issue In Progress (sweep afterwards per CLAUDE.md).

  8. Queue bounces (DIRTY after a sibling merges): jj rebase -s <change> -d 'trunk()', resolve keeping BOTH PRs' semantics, re-run step 3's repros plus the sibling's, full suite, push the bookmark, re-arm --auto. Never force-push a branch that is actively queued without re-arming.

    On MERGE_CONFLICT, check trunk for the issue ID first: git log origin/trunk --format='%h %s' | grep -E '^[0-9a-f]+ [^:]*RUE-NN'. Anchor on the SUBJECT — plain --grep=RUE-NN searches the whole message and happily matches commits that merely cite the issue in their body, which is a false "it already landed" on exactly the question you are asking.

    A dequeue is not always a real conflict — RUE-1766 landed on trunk independently while a PR carrying it sat in the queue, and every conflicting file was that now-redundant half. There the resolution is to DROP the redundant half and keep only what is still unique to your branch, not to reconcile two spellings of one fix; then confirm the remaining half is still unlanded before assuming the PR has anything left to say. The same collision shows up in other disguises — mergeable_state: dirty on a PR you have not queued yet, or 3-way conflicts at apply time — so make the trunk check reflexive whenever a diff fights you in a file it should own.

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

Lane discipline (when dispatching parallel workers)

Check open PRs for each target issue ID before dispatching, not just Linear status. Linear tells you what is Done; it does not tell you what is in flight. In one night four issues were fixed in parallel by other agents while workers were already on them — RUE-1711 (across four separate PRs), RUE-1745, RUE-1646 and RUE-1766 — costing two branch rebuilds, one merge-queue dequeue, one duplicate issue filed, and most of a worker's output twice over. A search_pull_requests for the issue ID, or a scan of list_pull_requests --state open, costs one call per cluster and catches all of it. Re-check at integration time too: a fix can land while your worker is running.

Parallelize across disjoint crates, never across the same hot file. The conflict magnets — rue-air/src/sema/analysis.rs, the rue-error E-code/preview registry, and both codegen/*/cfg_lower.rs — should be serialized (land one, then dispatch the next in that lane). Most integration pain this project has hit (stale-base 3-way conflicts, the stabilization --preview miss) was two workers in the same hot file. A worker's cluster should name its crate-set; two clusters in the same hot lane go in consecutive cycles, not the same one.

Keeping the tree tidy

  • Prefer Fixes RUE-NN over Part of whenever the PR actually closes the issue — Part of strands it In Progress and you must sweep it later.
  • After a batch of merges, run scripts/jj-tidy — it deletes orphaned worktree-wf_*/cycle* branches, merged push-* bookmarks, and abandons dangling changes (safe: git protects checked-out branches; only unbookmarked non-@ heads are abandoned). Without it, jj log fills with dozens of dead heads within a session.
  • For disk pressure, remove worktrees whose work is finished (git worktree remove <path>) or run scripts/rue storage clean (Buck's own stale cleanup in every registered worktree; it never deletes worktrees or source files) — never blanket rm -rf .claude/worktrees, which races running workers. The ./buck2 wrapper refuses to start a build below 4 GiB free and cleans nothing itself.

Worker-prompt invariants this protocol assumes

Workers were told: reproduce first, refutations are as valuable as fixes, file ownership is by region, output is git diff <base> HEAD to an OUTFILE plus a .meta summary. If integrating a diff produced under weaker rules, treat every claim as unverified.

© rue-language, 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

Just SKILL.md in .claude/skills/integrate-worker of rue-language/rue.

Open the folder on GitHubat commit 5200b11

Compare with similar skills

Integrate Worker 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.

Integrate Worker compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Integrate Worker this skillrue-language/rue1.2k—~1.9kAutomated safety check: PassApache-2.0
Finishing a Development Branchobra/superpowers296k5 repos~1.9kAutomated safety check: PassMIT
Finishing A Development Branchfarm-fe/farm5.6k34 repos~1.8kAutomated safety check: PassMIT
Git Worktree Cleanuplobehub/lobehub83k—~2.8kAutomated safety check: PassCustom licence
Pre-Release PR Triagejamiepine/voicebox57k—~3.1kAutomated safety check: PassMIT
Ccmanager Configkbwo/ccmanager1.3k—~1.5kAutomated safety check: PassMIT

Similar skills

  • Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.

    296k GitHub starsUsed in 5 repos~1.9k tokens
    DevelopmentAuto-check passed
  • A skill your agent uses when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for…

    5.6k GitHub starsUsed in 34 repos~1.8k tokens
    DevelopmentAuto-check passed
  • Git Worktree Cleanup

    lobehub/lobehub

    Audits stale Git worktrees and branches with a bundled script, classifies each one, and deletes only after you approve the exact candidates.

    83k GitHub stars~2.8k tokensUpdated today
    DevelopmentAuto-check passed
  • Pre-Release PR Triage

    jamiepine/voicebox

    Sorts a backlog of open pull requests into must-merge, candidate, superseded and deferred, writes a triage doc and works the merge loop before a release.

    57k GitHub stars~3.1k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Ccmanager Config

    kbwo/ccmanager

    Set up, review, or repair a CCManager config — .ccmanager.json at a git repository root, or the global ~/.config/ccmanager/config.json.

    1.3k GitHub stars~1.5k tokensUpdated today
    DevelopmentAuto-check passed
  • Builds a Cap feature in an isolated Git worktree with disposable dev resources, verification, a recorded demo and a neutral pull request, started with /building.

    23k GitHub stars~2.5k tokensUpdated today
    DevelopmentAuto-check: warnings

Works with

Categories

Questions about Integrate Worker

What does Integrate Worker do?

Integrate a worker agent's diff onto fresh trunk — apply, verify repros by hand, cross-check interacting mechanisms, full suite, ship + queue. Integrate Worker is an agent skill from rue-language/rue. Integrate a worker agent's diff onto fresh trunk — apply, verify repros by hand, cross-check interacting mechanisms, full suite, ship + queue.

When should I use Integrate Worker?

Integrate Worker fits situations like: tasks that involve Git worktrees.

How do I install Integrate Worker in Claude Code?

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

How do I install Integrate Worker in Codex?

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

Can I use Integrate Worker 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 rue-language/rue --skill integrate-worker -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/integrate-worker, .gemini/skills/integrate-worker, .github/skills/integrate-worker and .opencode/skills/integrate-worker in your project.

What does Integrate Worker need to run?

Going by SKILL.md and its folder, Integrate Worker needs the command-line tools its instructions call (git, bash and gh).

Does Integrate Worker 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 Integrate Worker 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 Integrate Worker use?

Integrate Worker 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 Integrate Worker use?

About 1.9k tokens (SKILL.md is roughly 7.6k 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 Integrate Worker?

Skills that share tags, products or a category with Integrate Worker: Finishing a Development Branch (obra/superpowers, 296k stars), Finishing A Development Branch (farm-fe/farm, 5.6k stars), Git Worktree Cleanup (lobehub/lobehub, 83k stars) and Pre-Release PR Triage (jamiepine/voicebox, 57k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Integrate Worker?

rue-language (a GitHub organization) maintains it in rue-language/rue, which has 1,209 GitHub stars. The repository was last updated on October 8, 2026.

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