Agent skill

Backpromote

by hardisgroupcom in hardisgroupcom/sfdx-hardis

Drive a backpromote (sf hardis:work:backpromote, Beta) from a coding agent, and solve the merges it asks for.

AGPL-3.0Auto-check passedDevelopment

Install Backpromote

skills CLI
$ npx skills add hardisgroupcom/sfdx-hardis --skill backpromote -a claude-code

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

GitHub CLI
$ gh skill install hardisgroupcom/sfdx-hardis backpromote --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/hardisgroupcom/sfdx-hardis.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/backpromote .claude/skills/backpromote && 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
backpromote
GitHub stars
401
Token cost
~2.2k tokens
SKILL.md length
888 words
Files
1
Skills in repo
21
Repo updated
First seen
Licence
AGPL-3.0

At a glance

Drive a backpromote (sf hardis:work:backpromote, Beta) from a coding agent, and solve the merges it asks for.

  • Works in 7 steps: Plan. sf hardis:work:backpromote --plan… → Decide. For every comparison[] entry… → Run. `sf hardis:work:backpromote --agent… → …
  • Asked to bring what was merged in a parent major branch (integration
  • SKILL.md covers Procedure, Merge rules and Where things live
  • Calls sf and git; needs GITHUB_TOKEN and CI_SFDX_HARDIS_GITLAB_TOKEN

What it does

Backpromote is an agent skill from hardisgroupcom/sfdx-hardis. Drive a backpromote (sf hardis:work:backpromote, Beta) from a coding agent, and solve the merges it asks for. Use when asked to bring what was merged in a parent major branch (integration, uat...) into a developer sandbox or a scratch org, to read or fix the "Backpromotes" Pull Request comments, or when a backpromote stopped with status waitingForMerges or conflictsRemaining.

Its SKILL.md is about 2.2k 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 Pull requests. It works with Salesforce. The repository describes itself as: French-army-knife Toolbox for Salesforce. Orchestrates base commands and assist users with interactive wizards to make much more than native Salesforce CLI + Allows you to define…. The licence is AGPL-3.0.

When your agent uses it

  • Asked to bring what was merged in a parent major branch (integration
  • Uat...) into a developer sandbox
  • Fix the Backpromotes Pull Request comments
  • A backpromote stopped with status waitingForMerges

Example prompts

  • “Backpromotes”
  • “/backpromote”

Requirements

  • A credential in GITHUB_TOKEN
  • A credential in CI_SFDX_HARDIS_GITLAB_TOKEN

Workflow steps

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

  1. Plan. sf hardis:work:backpromote --plan --json --target-org --parent-branch .
  2. Decide. For every comparison[] entry with status different or pendingInOrg, read the two
  3. Run. `sf hardis:work:backpromote --agent --json --run-id --target-org
  4. Merge when asked. status: waitingForMerges means the files marked merge were written with
  5. Deployment errors. status: deployFailed lists the refused components in
  6. Manual actions. result.actions.pending lists the manual actions (and the ones whose custom
  7. Back to the developer's branch. The checkout stays on the backpromote branch. When the user

What it can do on your machine

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

    • sf
    • git

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

  • Network

    No URLs in SKILL.md. Its commands use git, 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 these keys or tokens, usually read from environment variables:

    • GITHUB_TOKEN
    • CI_SFDX_HARDIS_GITLAB_TOKEN
    • CI_SFDX_HARDIS_BITBUCKET_TOKEN

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Backpromote loads about 2.2k tokens when it runs. Until then it costs about 98 tokens; SKILL.md has 888 words of instructions outside code blocks.

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

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 hardisgroupcom/sfdx-hardis at commit 9625b22, republished under its AGPL-3.0 licence (© hardisgroupcom). 888 words, ~2,236 tokens.

Download SKILL.mdSave it as .claude/skills/backpromote/SKILL.md (or your agent's skills folder).
name
backpromote
description
Drive a backpromote (sf hardis:work:backpromote, Beta) from a coding agent, and solve the merges it asks for. Use when asked to bring what was merged in a parent major branch (integration, uat...) into a developer sandbox or a scratch org, to read or fix the "Backpromotes" Pull Request comments, or when a backpromote stopped with status waitingForMerges or conflictsRemaining.
user-invocable
true

Backpromote from a coding agent

sf hardis:work:backpromote deploys into a developer sandbox what the team merged in a parent major branch since the last backpromote of that sandbox: the metadata (computed by sfdx-git-delta on the window of merged Pull Requests) and the deployment actions declared by those Pull Requests. The command page is docs/hardis/work/backpromote.md, and the user guide is docs/salesforce-devops-backpromote.md.

Vocabulary: parent branch (developmentBranch or one of availableTargetBranches), target sandbox (never a major org), sandbox name (from the instance URL, --sandbox-name overrides), backpromote branch backpromote/<parent branch>/<sandbox name> (holds the manual merges only), start Pull Request, window, "Backpromotes" comment (the only source of the history).

Procedure

Everything runs with --json; every decision is a flag; nothing is asked in --agent mode.

  1. Plan. sf hardis:work:backpromote --plan --json --target-org <alias> --parent-branch <branch>. Read status (ok, blocked, nothingToDo), checks (a failed gitProvider check means no token: set GITHUB_TOKEN, CI_SFDX_HARDIS_GITLAB_TOKEN, SYSTEM_ACCESSTOKEN or CI_SFDX_HARDIS_BITBUCKET_TOKEN), pullRequests[] (newest first, backpromote non null when the sandbox already received it, selected for the default start), scan.found, window, items[], deletions[], actions[] (alreadyRunOn set when it already ran in this sandbox), comparison[] and runId. When scan.found is false nothing is selected: pick the start with --from-pull-request <number> and run the plan again with --run-id <runId>.
  2. Decide. For every comparison[] entry with status different or pendingInOrg, read the two (or three) versions at versions.sandbox, versions.parentHead and versions.base (absolute paths in the cache), then choose: --on-diff "<file>=git" (overwrite with the parent branch version, the default), =org (keep the org version, the item is listed as kept and offered again next time) or =merge. --on-diff-default git|org|merge covers the rest. An item with noOverwrite: true (listed in manifest/package-no-overwrite.xml) is deployed when every comparison[] entry of it is missingInOrg; when the sandbox already has it, it is left alone unless --include-no-overwrite Type:Name names it (then it takes decisions like any item). Untick with --exclude-metadata Type:Name, --skip-destructive, --actions a,b, --skip-actions.
  3. Run. sf hardis:work:backpromote --agent --json --run-id <runId> --target-org <alias> --parent-branch <branch> --from-pull-request <n> [decisions]. The checkout is switched to the backpromote branch (uncommitted changes are stashed, the JSON says so in checkout), the pre-deployment actions run, the metadata is deployed (NoTestRun), the deletions, the post-deployment actions, then the "Backpromotes" comments are written and the branch is pushed when it holds merges. Exit code 0 with status ok, nothingToDo or waitingForMerges; exit code 1 with the plan in data for refused, conflictsRemaining, deployFailed, pushRejected.
  4. Merge when asked. status: waitingForMerges means the files marked merge were written with conflict markers in the checkout (comparison[].file is relative to gitRoot, the prompt is in promptFile, the exact command in runCommand). Edit each file, leave no <<<<<<<, |||||||, =======, >>>>>>> line, commit the solved files on the backpromote branch (the body of the message says what was kept from each side), then run runCommand. It checks the files, commits any merged file still uncommitted, deploys and pushes the branch. A file left with markers is not deployed and is listed as "conflict pending": the next plan offers it first.
  5. Deployment errors. status: deployFailed lists the refused components in result.deployErrors (file, line, the Salesforce error, the sfdx-hardis hint in tip and the AI suggestion in aiTip when there is one), and result.deployErrorsPromptFile holds a prompt with all of it. Fix the files on the backpromote branch and nowhere else (no other branch, no Pull Request), commit them there, then run the same command again. A component that cannot be fixed now is left out with --exclude-metadata Type:Name.
  6. Manual actions. result.actions.pending lists the manual actions (and the ones whose custom username could not be authenticated). Once done by hand in the sandbox: sf hardis:work:backpromote --confirm-action <id> --json --run-id <runId> --target-org <alias> --parent-branch <branch>.
  7. Back to the developer's branch. The checkout stays on the backpromote branch. When the user wants their branch back: git checkout <checkout.originalBranch>, git stash pop when checkout.stashed is true, then propose git merge origin/<parent branch> so that the next hardis:work:save does not commit the backpromoted metadata as the story's own work.
Show full SKILL.md (226 more words)Show less

Every call is idempotent: running the same command twice deploys nothing twice and runs no action twice (the comment rows are the state). --reset --auto deletes the backpromote branch and abandons the pending merges; the history in the comments is never touched.

Merge rules

  • Keep both intents when they touch different parts of the file.
  • For shared configuration (layouts, profiles, permission sets, settings, flexipages) prefer the parent branch version; never remove an org-only element the sandbox work still needs.
  • Salesforce metadata is XML: well-formed result, one entry per API name, the existing order and indentation, the XML declaration and namespace untouched. Only change the conflicting lines.
  • Write, for each file, one sentence on what was kept from each side: it is the body of the commit of the solved files on the backpromote branch (the prompt the command writes asks for it).

Where things live

WhatWhere
Commandsrc/commands/hardis/work/backpromote.ts
Pure rules (branch and sandbox names, history walk, two-way merge, flags, prompt)src/common/utils/backpromoteRules.ts
"Backpromotes" comment (parse, render, upsert, cached reads)src/common/utils/backpromoteCommentUtils.ts
Git (fetch, checkout switch, branch rebuild, merge-file, push with lease, delta cache)src/common/utils/backpromoteGitUtils.ts
Org (target org, retrieve to the cache, comparison, deployments)src/common/utils/backpromoteOrgUtils.ts
Plan JSON version 3, run state, terminal promptssrc/common/utils/backpromotePlanUtils.ts
Pull Request listing and action execution shared with promotion branchessrc/common/utils/backpromoteUtils.ts
VS Code panel../vscode-sfdx-hardis/src/commands/showBackpromote.ts, src/utils/backpromote/, src/webviews/lwc-ui/modules/s/backpromote/
End to end runbook.claude/skills/promotion-branches-e2e/reference/runbook.md, section 6bis

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

Just SKILL.md in .claude/skills/backpromote of hardisgroupcom/sfdx-hardis.

Open the folder on GitHubat commit 9625b22

Compare with similar skills

Backpromote 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.

Backpromote compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Backpromote this skillhardisgroupcom/sfdx-hardis401—~2.2kAutomated safety check: PassAGPL-3.0
Finishing a Development Branchobra/superpowers296k5 repos~1.9kAutomated safety check: PassMIT
PR Babysitteropeninterpreter/openinterpreter69k3 repos~4.2kAutomated safety check: PassApache-2.0
Check PRonyx-dot-app/onyx32k2 repos~2.3kAutomated safety check: PassMIT
Understand Diff AnalysisEgonex-AI/Understand-Anything86k1 repos~1.4kAutomated safety check: PassMIT
PR Design DocOpenHands/OpenHands90k—~2.4kAutomated 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
  • PR Babysitter

    openinterpreter/openinterpreter

    Watches an open GitHub pull request until it merges, handling review comments, diagnosing CI failures and retrying flaky checks along the way.

    69k GitHub starsUsed in 3 repos~4.2k tokens
    DevelopmentAuto-check passed
  • Check PR

    onyx-dot-app/onyx

    Checks a GitHub, GitLab, or Perforce (p4) pull request (or merge request, or shelved changelist) for unresolved review comments, failing status checks, and incomplete PR descriptions.

    32k GitHub starsUsed in 2 repos~2.3k tokens
    DevelopmentAuto-check passed
  • Understand Diff Analysis

    Egonex-AI/Understand-Anything

    Reads your git changes or a pull request against a prebuilt knowledge graph of the project to explain what changed, which components are affected and what is risky.

    86k GitHub starsUsed in 1 repo~1.4k tokens
    DevelopmentAuto-check passed
  • PR Design Doc

    OpenHands/OpenHands

    For a non-trivial pull request, write a self-contained HTML design doc under the temporary .pr/ directory and link a visibility-appropriate preview in the PR description, so maintainers grasp the…

    90k GitHub stars~2.4k tokensUpdated today
    DevelopmentAuto-check passed
  • WooCommerce Code Review

    woocommerce/woocommerce

    Reviews WooCommerce code changes against the project's standards, flagging backend PHP architecture, naming, documentation, data integrity and testing violations.

    11k GitHub starsUsed in 3 repos~1.1k tokens
    DevelopmentAuto-check passed

More from hardisgroupcom/sfdx-hardis

All 21 skills in this repo
  • sfdx-hardis Training End-to-End Test

    hardisgroupcom/sfdx-hardis

    Walks the sfdx-hardis training course end to end as a learner would, against a real Developer Edition org and fork, fixing broken steps and screenshots that no longer match.

    401 GitHub stars~2.6k tokensUpdated today
    Auto-check: notes
  • Promotion Branches E2E Test

    hardisgroupcom/sfdx-hardis

    Runs a full end-to-end test of sfdx-hardis promotion branches and backpromote against real Salesforce orgs and a throwaway repository, then writes a report.

    401 GitHub stars~5.5k tokensUpdated today
    Auto-check: notes
  • sfdx-hardis Architecture Guide

    hardisgroupcom/sfdx-hardis

    Explains how the sfdx-hardis Salesforce CLI plugin is built: its TypeScript and Oclif stack, command layout, agent-mode flag and provider classes for git, notifications and AI.

    401 GitHub stars~2.1k tokensUpdated today
    Auto-check passed
  • Changelog Style Rules

    hardisgroupcom/sfdx-hardis

    Style rules for adding CHANGELOG.md entries: short, user-facing bullets grouped by command under the beta section, each linking the command's docs page.

    401 GitHub stars~1.4k tokensUpdated today
    Auto-check passed
  • Documentation

    hardisgroupcom/sfdx-hardis

    Documentation standards for sfdx-hardis commands (description format with Command Behavior and Technical explanations sections, MkDocs site, build:doc).

    401 GitHub stars~1k tokensUpdated today
    Auto-check passed
  • Fix Jscpd

    hardisgroupcom/sfdx-hardis

    Decision framework for fixing jscpd (copy-paste detector) errors.

    401 GitHub stars~613 tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Backpromote

What does Backpromote do?

Drive a backpromote (sf hardis:work:backpromote, Beta) from a coding agent, and solve the merges it asks for. Backpromote is an agent skill from hardisgroupcom/sfdx-hardis. Drive a backpromote (sf hardis:work:backpromote, Beta) from a coding agent, and solve the merges it asks for.

When should I use Backpromote?

Backpromote fits situations like: asked to bring what was merged in a parent major branch (integration; uat...) into a developer sandbox; fix the Backpromotes Pull Request comments; A backpromote stopped with status waitingForMerges.

How do I install Backpromote in Claude Code?

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

How do I install Backpromote in Codex?

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

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

What does Backpromote need to run?

Going by SKILL.md and its folder, Backpromote needs the command-line tools its instructions call (sf and git) and credentials named GITHUB_TOKEN, CI_SFDX_HARDIS_GITLAB_TOKEN and CI_SFDX_HARDIS_BITBUCKET_TOKEN. Our summary lists: A credential in GITHUB_TOKEN; A credential in CI_SFDX_HARDIS_GITLAB_TOKEN.

Does Backpromote access the network?

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

Is Backpromote 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 Backpromote use?

Backpromote 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 Backpromote use?

About 2.2k tokens (SKILL.md is roughly 8.9k 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 Backpromote?

Skills that share tags, products or a category with Backpromote: Finishing a Development Branch (obra/superpowers, 296k stars), PR Babysitter (openinterpreter/openinterpreter, 69k stars), Check PR (onyx-dot-app/onyx, 32k stars) and Understand Diff Analysis (Egonex-AI/Understand-Anything, 86k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Backpromote?

hardisgroupcom (a GitHub organization) maintains it in hardisgroupcom/sfdx-hardis, which has 401 GitHub stars. The repository holds 21 skills in this directory. The repository was last updated on October 8, 2026.

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