Agent skill

Review Backward Compatibility

by ruby-git in ruby-git/ruby-git

Audits Git::Lib methods for backward compatibility after commands are moved to Git::Commands:: classes.

MITAuto-check passedDevelopment

Install Review Backward Compatibility

skills CLI
$ npx skills add ruby-git/ruby-git --skill review-backward-compatibility -a claude-code

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

GitHub CLI
$ gh skill install ruby-git/ruby-git review-backward-compatibility --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/ruby-git/ruby-git.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/skills-deprecated/review-backward-compatibility .claude/skills/review-backward-compatibility && 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
review-backward-compatibility
GitHub stars
1.8k
Token cost
~2.4k tokens
SKILL.md length
929 words
Files
1
Skills in repo
30
Repo updated
First seen
Licence
MIT

At a glance

Audits Git::Lib methods for backward compatibility after commands are moved to Git::Commands:: classes.

  • Works in 5 steps: Identify Methods Added Since v4.3.0 → Remove New Methods → Restore Backward-Compatible… → …
  • Verify that migrated commands maintain their existing public API
  • SKILL.md covers Contents, How to use this skill, Related skills and Objective, plus 6 more sections
  • Calls git

What it does

Review Backward Compatibility is an agent skill from ruby-git/ruby-git. Audits Git::Lib methods for backward compatibility after commands are moved to Git::Commands:: classes. Use to verify that migrated commands maintain their existing public API.

Its SKILL.md is about 2.4k 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 workflow. It works with Git. The repository describes itself as: Ruby/Git is a Ruby library that can be used to create, read and manipulate Git repositories by wrapping system calls to the git binary. The licence is MIT.

When your agent uses it

  • Verify that migrated commands maintain their existing public API
  • Tasks that involve Git workflow

Example prompts

  • “Use the review-backward-compatibility skill to audit Git::Lib methods for backward compatibility after commands are moved to Git::Commands:: classes”
  • “/review-backward-compatibility”

Workflow steps

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

  1. Identify Methods Added Since v4.3.0
  2. Remove New Methods
  3. Restore Backward-Compatible Implementations
  4. Add Required Dependencies
  5. Verify the Changes

What it can do on your machine

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

    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 no API keys, tokens, secrets or passwords.

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

Context cost

Review Backward Compatibility loads about 2.4k tokens when it runs. Until then it costs about 52 tokens; SKILL.md has 929 words of instructions outside code blocks.

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

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 ruby-git/ruby-git at commit f3bf20f, republished under its MIT licence (© ruby-git). 929 words, ~2,422 tokens.

Download SKILL.mdSave it as .claude/skills/review-backward-compatibility/SKILL.md (or your agent's skills folder).
name
review-backward-compatibility
description
Audits Git::Lib methods for backward compatibility after commands are moved to Git::Commands::* classes. Use to verify that migrated commands maintain their existing public API.

Review Backward Compatibility

Review Git::Lib methods for backward compatibility after commands are moved to Git::Commands::* classes. This skill guides the process of restoring backward compatibility for a specific set of git commands while maintaining the benefits of the new command infrastructure.

Contents

How to use this skill

Attach this file to your Copilot Chat context, then invoke it with the git command name(s) to audit. Example:

text
Remove methods added to Git::Lib since v4.3.0 for the `branch` git command
and ensure the remaining methods are backward compatible.

Replace branch with the specific git command(s) you want to audit (e.g., worktree, tag, merge, reset).

Objective

For the specified git command(s), remove methods added to Git::Lib since v4.3.0 and ensure that remaining methods (which existed in v4.3.0) are backward compatible.

Current Command Architecture Note

When auditing modern implementations, assume command classes follow Git::Commands::Base:

  • classes use class < Git::Commands::Base with arguments do ... end
  • command entrypoint is call(*, **) (inherited from Base)
  • exit-status behavior is centralized via allow_exit_status declarations on the class

Because of this, backward-compatibility adaptation should happen in Git::Lib methods (facade/adapter layer), not by reintroducing legacy execution logic inside command classes.

Instructions

Branch setup

All work must be done on a feature branch. Never commit or push directly to main.

Before starting, create a new branch:

bash
git checkout -b <feature-branch-name>

All commits in this workflow go on the feature branch. When work is complete, open a pull request — do not merge or push directly into main.

Step 1: Identify Methods Added Since v4.3.0
  1. Check out the v4.3.0 tag to examine the historical state:

    Warning: git checkout modifies the working tree. Stash or commit any uncommitted changes first (git stash).

    bash
    git checkout v4.3.0
  2. Search lib/git/lib.rb for all methods related to the specified git command(s):

    bash
    grep -n "def <command_name>" lib/git/lib.rb
  3. Document each method found, including:

    • Method name and signature
    • Return value type (String, Array, Hash, Boolean, etc.)
    • Exact return value format (e.g., Array<[Integer, String]>, String with specific content)
  4. Return to your feature branch:

    bash
    git checkout -
  5. Search for the same command methods in the current version:

    bash
    grep -n "def <command_name>" lib/git/lib.rb
  6. Create two lists:

    • Legacy methods: Methods that existed in v4.3.0 (must be preserved and made compatible)
    • New methods: Methods that don't exist in v4.3.0 (should be removed)
Step 2: Remove New Methods
  1. Identify all new methods that were added after v4.3.0
  2. Remove these methods entirely from lib/git/lib.rb
  3. Remove any require statements that are only used by the removed methods
Step 3: Restore Backward-Compatible Implementations

For each legacy method that needs to be preserved:

  1. Use modern command infrastructure internally:

    • Call the appropriate Git::Commands::<Command>::* class
    • Ensure all necessary command classes are required at the top of the file
  2. Convert return values to match v4.3.0 exactly:

    • Compare the return type from the modern command with the v4.3.0 return type
    • If they differ, add conversion logic to transform the result
    • Modern commands typically return CommandLineResult objects with .stdout, .stderr, and .status
    • Legacy methods may have returned raw strings, arrays, or other types
  3. Create helper methods if needed:

    • For complex conversions (e.g., parsing output into specific formats), create private helper methods
    • Name helpers clearly (e.g., <command>_info_to_legacy)
    • Place helpers near the bottom of the file in the private section
Show full SKILL.md (366 more words)Show less
Step 4: Add Required Dependencies
  1. Ensure all necessary require statements are present:

    ruby
    require_relative 'git/commands/<command>/<action>'
    require_relative 'git/parsers/<command>' # if using parsers
  2. Only keep requires for:

    • Command classes used by the legacy methods
    • Parsers needed for conversion
    • Remove requires for deleted commands
Step 5: Verify the Changes
  1. Check the diff to ensure:

    bash
    git diff lib/git/lib.rb
    • All new methods are removed
    • All legacy methods are present with correct signatures
    • Return value conversions are in place
    • Correct require statements are present
  2. Verify that the implementation uses modern command classes:

    bash
    git diff lib/git/lib.rb | grep -E "^\+.*Git::Commands::<Command>"
  3. Check the net line change (should be negative if removing methods):

    bash
    git diff --stat lib/git/lib.rb

Example: Stash Commands

Here's how this process was applied to the stash commands:

Legacy Methods (v4.3.0)
  • stashes_all → returned Array<[Integer, String]> (index and message pairs)
  • stash_save(message) → returned regex match result (truthy/falsy)
  • stash_apply(id) → returned String (stdout)
  • stash_clear → returned String (stdout)
  • stash_list → returned String (stdout)
New Methods (removed)
  • stash_branch
  • stash_create
  • stash_drop
  • stash_pop
  • stash_push
  • stashes_list
  • git_stash_show_* methods
Implementation Pattern
ruby
# Requires at top of file
require_relative 'git/commands/stash/apply'
require_relative 'git/commands/stash/clear'
require_relative 'git/commands/stash/list'
require_relative 'git/commands/stash/push'
require_relative 'git/parsers/stash'

# Legacy method implementations
def stashes_all
  result = Git::Commands::Stash::List.new(self).call
  stashes = Git::Parsers::Stash.parse_list(result.stdout)
  stashes.map { |info| stash_info_to_legacy(info) }
end

def stash_save(message)
  result = Git::Commands::Stash::Push.new(self).call(message: message)
  result.stdout =~ /HEAD is now at/
end

def stash_apply(id = nil)
  result = Git::Commands::Stash::Apply.new(self).call(id)
  result.stdout
end

def stash_clear
  result = Git::Commands::Stash::Clear.new(self).call
  result.stdout
end

def stash_list
  result = Git::Commands::Stash::List.new(self).call
  result.stdout
end

# Helper method (in private section)
private

def stash_info_to_legacy(stash_info)
  [stash_info.index, stash_info.message]
end

Key Principles

  1. Maintain exact v4.3.0 return values: Don't change return types even slightly
  2. Use modern infrastructure internally: Leverage Git::Commands::* classes for actual git operations
  3. Remove all new methods: Don't try to make new methods backward compatible - just remove them
  4. Minimize changes: Only modify what's necessary for backward compatibility
  5. Document conversions: Make helper methods clear and well-named
  6. Apply policy at the facade: Git::Lib methods pass policy options explicitly (e.g. no_edit: true, verbose: true, no_progress: true) — command classes stay neutral. See "Command-layer neutrality" in CONTRIBUTING.md.

Validation Checklist

  • Working on a feature branch (not main)
  • Identified all methods for the command in v4.3.0
  • Documented v4.3.0 return values exactly
  • Removed all methods not present in v4.3.0
  • Implemented legacy methods using modern command classes
  • Added conversion logic where return types differ
  • Created helper methods for complex conversions
  • Updated require statements correctly
  • Verified changes with git diff
  • Net line count decreased (removed more than added)

Usage

To apply this process, say:

Remove methods added to Git::Lib since v4.3.0 for <command_name> git command(s) and ensure the remaining methods are backward compatible.

Replace <command_name> with the specific git command(s) you want to audit (e.g., branch, merge, tag, reset, etc.).

© ruby-git, MIT. 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 .github/skills-deprecated/review-backward-compatibility of ruby-git/ruby-git.

Open the folder on GitHubat commit f3bf20f

Compare with similar skills

Review Backward Compatibility 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.

Review Backward Compatibility compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Review Backward Compatibility this skillruby-git/ruby-git1.8k—~2.4kAutomated safety check: PassMIT
Finishing a Development Branchobra/superpowers296k5 repos~1.9kAutomated safety check: PassMIT
Code Design Rationale Investigatorcursor/plugins10k9 repos~2.6kAutomated safety check: PassNone
Contributor-First PR MergeHKUDS/OpenHarness16k1 repos~847Automated safety check: PassMIT
Migrate Internal Package into GhostTryGhost/Ghost55k—~3.8kAutomated safety check: PassMIT
Create Pull Requestcline/cline70k1 repos~1.6kAutomated safety check: PassApache-2.0

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
  • Official

    Digs into why code is shaped the way it is by checking git history, pull requests and connected tools in parallel, then reporting a cited read on the tradeoffs.

    10k GitHub starsUsed in 9 repos~2.6k tokens
    DevelopmentAuto-check passed
  • Merges external GitHub pull requests while keeping the original author credited, and fixes conflicts after the merge instead of rewriting the contribution.

    16k GitHub starsUsed in 1 repo~847 tokens
    DevelopmentAuto-check passed
  • Moves a package from another TryGhost repository into Ghost as an internal workspace package while keeping its Git history, with checkpoints for the steps that need an administrator.

    55k GitHub stars~3.8k tokensUpdated today
    DevelopmentAuto-check passed
  • Opens a GitHub pull request from your current branch with the gh CLI, after reviewing the commits and diff and gathering the details the PR needs.

    70k GitHub starsUsed in 1 repo~1.6k tokens
    DevelopmentAuto-check passed
  • Git Merge Conflict Resolver

    tailcallhq/forgecode

    Resolves Git merge conflicts with a plan-first workflow that keeps both sides' intent, regenerates lock files and backs up deleted-but-modified files.

    7.6k GitHub starsUsed in 1 repo~4.5k tokens
    DevelopmentAuto-check passed

More from ruby-git/ruby-git

All 30 skills in this repo
  • Addresses unresolved pull request review threads and suppressed (low-confidence) Copilot review comments on the current branch, folds each fix into the…

    1.8k GitHub stars~657 tokensUpdated 5 days ago
    Auto-check passed
  • Breaking Change Analysis

    ruby-git/ruby-git

    Assesses what an API change would break before it is made, finds every usage, documents the impact and plans a deprecation or migration path.

    1.8k GitHub stars~1.7k tokensUpdated 5 days ago
    Auto-check passed
  • Diagnoses and fixes failing GitHub Actions runs by identifying the failure, fetching only the relevant logs, finding the root cause and reproducing it locally.

    1.8k GitHub stars~1.9k tokensUpdated 5 days ago
    Auto-check passed
  • Scaffolds and reviews `Git::Commands::*` classes in the ruby-git library, with unit tests, integration tests and YARD docs, using the Base command architecture.

    1.8k GitHub stars~3k tokensUpdated 5 days ago
    Auto-check passed
  • Gem Dependency Management

    ruby-git/ruby-git

    Workflow for updating gem dependencies and fixing CVEs in the ruby-git project: assess with bundle outdated and audit, edit the gemspec, test, then commit with conventional messages.

    1.8k GitHub stars~806 tokensUpdated 5 days ago
    Auto-check passed
  • Migrates a direct command call in Ruby Git's Git::Lib to a Git::Commands class, as part of a Strangler Fig redesign, with a plan, legacy tests and a pull request.

    1.8k GitHub stars~4.4k tokensUpdated 5 days ago
    Auto-check passed

Works with

Categories

Questions about Review Backward Compatibility

What does Review Backward Compatibility do?

Audits Git::Lib methods for backward compatibility after commands are moved to Git::Commands:: classes. Review Backward Compatibility is an agent skill from ruby-git/ruby-git. Audits Git::Lib methods for backward compatibility after commands are moved to Git::Commands:: classes.

When should I use Review Backward Compatibility?

Review Backward Compatibility fits situations like: verify that migrated commands maintain their existing public API; tasks that involve Git workflow.

How do I install Review Backward Compatibility in Claude Code?

Run `npx skills add ruby-git/ruby-git --skill review-backward-compatibility -a claude-code`. Or copy the skill folder (.github/skills-deprecated/review-backward-compatibility in ruby-git/ruby-git) into .claude/skills/review-backward-compatibility in your project. Claude Code loads it when a task matches its description.

How do I install Review Backward Compatibility in Codex?

Run `npx skills add ruby-git/ruby-git --skill review-backward-compatibility -a codex`. Or copy the skill folder (.github/skills-deprecated/review-backward-compatibility in ruby-git/ruby-git) into .agents/skills/review-backward-compatibility in your project. Codex loads it when a task matches its description.

Can I use Review Backward Compatibility 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 ruby-git/ruby-git --skill review-backward-compatibility -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/review-backward-compatibility, .gemini/skills/review-backward-compatibility, .github/skills/review-backward-compatibility and .opencode/skills/review-backward-compatibility in your project.

What does Review Backward Compatibility need to run?

Going by SKILL.md and its folder, Review Backward Compatibility needs the command-line tools its instructions call (git).

Does Review Backward Compatibility 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 Review Backward Compatibility 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 Review Backward Compatibility use?

Review Backward Compatibility is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Review Backward Compatibility use?

About 2.4k tokens (SKILL.md is roughly 9.7k 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 Review Backward Compatibility?

Skills that share tags, products or a category with Review Backward Compatibility: Finishing a Development Branch (obra/superpowers, 296k stars), Code Design Rationale Investigator (cursor/plugins, 10k stars), Contributor-First PR Merge (HKUDS/OpenHarness, 16k stars) and Migrate Internal Package into Ghost (TryGhost/Ghost, 55k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Review Backward Compatibility?

ruby-git (a GitHub organization) maintains it in ruby-git/ruby-git, which has 1,799 GitHub stars. The repository holds 30 skills in this directory. The repository was last updated on October 2, 2026.

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