Agent skill

Git Command Class Implementation

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

Scaffolds and reviews `Git::Commands::*` classes in the ruby-git library, with unit tests, integration tests and YARD docs, using the Base command architecture.

MITAuto-check passedDevelopment

Install Git Command Class Implementation

skills CLI
$ npx skills add ruby-git/ruby-git --skill command-implementation -a claude-code

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

GitHub CLI
$ gh skill install ruby-git/ruby-git command-implementation --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/command-implementation .claude/skills/command-implementation && 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
command-implementation
GitHub stars
1.8k
Token cost
~3k tokens
SKILL.md length
1,240 words
Files
2
Skills in repo
30
Repo updated
First seen
Licence
MIT

At a glance

Scaffolds and reviews `Git::Commands::*` classes in the ruby-git library, with unit tests, integration tests and YARD docs, using the Base command architecture.

  • Works in 5 steps: Gather input — collect the target class… → Determine class structure (scaffold mode… → For each command / sub-command class,… → …
  • Adding a new Git::Commands class for a git subcommand
  • SKILL.md covers Contents, Related skills, Input and Reference, plus 2 more sections
  • Calls bundle and git; reaches git-scm.com

What it does

This skill is specific to the ruby-git library. Given a target `Git::Commands::*` class name and the git subcommand it wraps, the agent reads or scaffolds the command class under `lib/git/commands/`, the matching unit specs under `spec/unit/git/commands/`, and the git documentation for the command, then checks the result against the policy authorities. It applies to creating a class from scratch, updating one, or reviewing one for correctness.

It hands parts of the job to related skills for reviewing the arguments DSL, YARD documentation, RSpec unit testing standards, command test conventions, cross-command consistency and the facade layer, and new facade wiring goes into a `Git::Repository::*` module rather than the command class. A `REFERENCE.md` file holds supporting detail. The excerpt is truncated after the input section, so the workflow and output sections are not described.

When your agent uses it

  • Adding a new Git::Commands class for a git subcommand
  • Reviewing an existing command class for correctness
  • Writing unit and integration tests and YARD docs for a command class

Example prompts

  • “Scaffold a Git::Commands class for git stash push with unit tests and YARD docs.”
  • “Review Git::Commands::Branch::Delete against the Base architecture.”
  • “Update the command class for git switch and its specs to cover the new option.”

Requirements

  • A checkout of the ruby-git repository
  • The git binary that the command classes wrap

Workflow steps

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

  1. Gather input — collect the target class name and git subcommand from
  2. Determine class structure (scaffold mode only) — decide between a single
  3. For each command / sub-command class, repeat steps 3a–3f
  4. Review class shape and declarations — load
  5. Run quality gates — discover the prerequisite tasks for

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:

    • bundle
    • git

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

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • git-scm.com

    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

Git Command Class Implementation loads about 3k tokens when it runs. Until then it costs about 74 tokens; SKILL.md has 1,240 words of instructions outside code blocks.

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

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). 1,240 words, ~3,040 tokens.

Download SKILL.mdSave it as .claude/skills/command-implementation/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
command-implementation
description
Scaffolds new and reviews existing Git::Commands::* classes with unit tests, integration tests, and YARD docs using the Base architecture. Use when creating a new command class from scratch, updating an existing command class, or reviewing a command class for correctness.

Command Implementation

Scaffold new and review existing Git::Commands::Base command classes, unit tests, integration tests, and YARD docs.

Contents

Additional related skills:

Input

The user provides the target Git::Commands::* class name and the git subcommand (or subcommand + sub-action) it wraps. The agent gathers the following.

Command source code

Read the command class from lib/git/commands/{command}.rb or, for subcommands, lib/git/commands/{command}/{subcommand}.rb. For subcommands, also read the namespace module at lib/git/commands/{command}.rb which lists all sibling subcommands and provides the module-level documentation.

Skip this step when scaffolding a new command (the file does not exist yet).

Command test code

Read unit tests matching spec/unit/git/commands/{command}/**/*_spec.rb. Use these as supplemental evidence when tracing the verification chain (Ruby call → bound argument → expected git CLI). Coverage completeness is assessed by the Command Test Conventions skill.

Skip this step when scaffolding a new command (the file does not exist yet).

Git documentation for the git command
  • Latest-version online command documentation

    Read the entire official git documentation online man page for the command for the latest version of git. This version will be used as the primary authority for DSL completeness, including the options to include in the DSL, argument names, aliases, ordering, etc. Fetch this version from the URL https://git-scm.com/docs/git-{command} (this URL always serves the latest release).

  • Minimum-version online command documentation

    Read the entire official git documentation online man page for the command for the Git::MINIMUM_GIT_VERSION version of git. This serves two purposes: command-introduction and requires_git_version decisions, and option-surface reconciliation. Diff these docs against the latest-version docs; an option they describe that the latest-version docs no longer describe stays in the DSL with a version-split comment, and before writing that comment, establish its when-and-how claims from the versioned docs at intermediate releases, the git release notes, or the upstream source. What the endpoint diff can and cannot establish is defined in Options completeness. Fetch this version from URL https://git-scm.com/docs/git-{command}/{version}.

Do not scaffold from local git <command> -h output — the installed Git version is unknown and may differ from the latest supported version. Local help should NOT be used even as a supplemental check.

Policy authorities

Read Project Context — Validation Boundaries, including its exception criteria for constraint declarations, and Options completeness — consult the latest-version docs first. The Input phase above and the workflow reference these policies by link; load both authorities now so option-surface reconciliation and constraint decisions are made with the criteria in context, not from memory.

Reference

See REFERENCE.md for the full reference covering:

  • Files to generate
  • Single class vs. sub-command namespace (when to split, naming, templates)
  • Architecture contract and structural requirements
  • Command template (Base pattern)
  • #call override guidance (when to override, stdin feeding, action-option patterns)
  • Base#with_stdin mechanics
  • Options completeness (version conventions, execution-model conflicts)
  • end_of_options placement rules
  • Exit status guidance
  • Facade delegation and policy options
  • Internal compatibility contract
  • Phased rollout requirements
  • Common failures

Subagents load REFERENCE.md directly during the workflow steps that need it.

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

Workflow

This skill supports three modes. Determine which mode applies before starting:

  • Scaffold — creating a new command class from scratch. Follow all steps.
  • Update — adding options to an existing command class: skip steps 2, 3a, 3b, and 3c (the class and test files already exist). Start from step 1, then proceed directly to 3d → 3e → 3f → 4 → 5.
  • Review — auditing an existing command class for correctness (no changes). Follow all steps but produce findings instead of code.
  1. Gather input — collect the target class name and git subcommand from the Input, then fetch the latest-version and minimum-version git documentation per Git documentation for the git command.

  2. Determine class structure (scaffold mode only) — decide between a single class and a sub-command namespace per Single class vs. sub-command namespace.

  3. For each command / sub-command class, repeat steps 3a–3f:

    a. Scaffold the command class (subagent) (scaffold mode only) — delegate to a subagent: load REFERENCE.md and the YARD Documentation skill, then generate lib/git/commands/{command}.rb using the Command template. Populate the arguments do block with all options from the latest-version docs per Options completeness, applying the Execution-model conflicts, end_of_options placement, and Exit status guidance rules. Pass the fetched git documentation to the subagent.

    Steps 3b and 3c may run in parallel (they produce independent files).

    b. Scaffold unit tests (subagent) (scaffold mode only) — delegate to a subagent: load Command Test Conventions (which loads RSpec Unit Testing Standards), then generate spec/unit/git/commands/{command}_spec.rb following the unit test conventions. Fix all findings, then repeat the review until clean.

    c. Scaffold integration tests (subagent) (scaffold mode only) — delegate to a subagent: load Command Test Conventions, then generate spec/integration/git/commands/{command}_spec.rb following the integration test conventions. Fix all findings, then repeat the review until clean.

    d. Review Arguments DSL (subagent) — delegate to a subagent: load and apply Review Arguments DSL (and its CHECKLIST.md) against the arguments do block. Fix all findings, then repeat the review until clean. Complete this step before starting steps 3e–3f — DSL corrections change the CLI arguments that tests and YARD docs must reflect.

    Steps 3e and 3f may run in parallel (they review independent file sets).

    e. Review Command Tests (subagent) — delegate to a subagent: load and apply Command Test Conventions against the unit and integration spec files. Fix all findings, then repeat the review until clean.

    f. Review YARD Documentation (subagent) — delegate to a subagent: load and apply Command YARD Documentation against the command class. Fix all findings, then repeat the review until clean.

  4. Review class shape and declarations — load REFERENCE.md and verify against the Architecture contract, #call override guidance, Exit status guidance, requires_git_version convention, Internal compatibility contract, and Common failures. Additionally:

  5. Run quality gates — discover the prerequisite tasks for default and run them sequentially, fixing failures before advancing:

    bash
    bundle exec ruby -e "require 'rake'; load 'Rakefile'; puts Rake::Task['default'].prerequisites"

    Run each listed task individually in order via bundle exec rake <task> (one task per invocation — never combine multiple tasks in a single command). On failure, fix the issue and re-run that same task. Once it passes, continue to the next task. After all tasks pass, if any task required a fix during this cycle, start a new cycle from the first task using the same one-at-a-time approach. Keep cycling until every task passes on its first attempt with no fixes needed.

Output

For scaffold and update modes, produce:

  1. Command class — lib/git/commands/{command}.rb (and optionally the namespace module file for the first command in a namespace)
  2. Unit tests — spec/unit/git/commands/{command}_spec.rb
  3. Integration tests — spec/integration/git/commands/{command}_spec.rb
  4. Facade delegation — updated Git::Repository::* facade method in lib/git/repository/<topic>.rb
  5. All quality gates pass — RSpec, RuboCop, YARD, and build all green

For review mode, produce:

CheckStatusIssue
Base inheritancePass/Fail...
arguments DSLPass/Fail...
call shimPass/Fail...
allow_exit_status usagePass/Fail...
requires_git_versionPass/Fail...
output parsing absentPass/Fail...
compatibility contractPass/Fail...

Then list required fixes and indicate whether the migration slice is safe to merge under phased-rollout rules.

© 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

SKILL.md and 1 other file in .github/skills/command-implementation of ruby-git/ruby-git.

  • SKILL.md
  • REFERENCE.md

Open the folder on GitHubat commit f3bf20f

Compare with similar skills

Git Command Class Implementation 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.

Git Command Class Implementation compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Git Command Class Implementation this skillruby-git/ruby-git1.8k—~3kAutomated safety check: PassMIT
Leetcode Pywislertt/leetcode-py142—~1.4kAutomated safety check: PassApache-2.0
Research Initbrycewang-stanford/Auto-Empirical-Research-Skills4.5k—~839Automated safety check: PassCustom licence
Write Test389ds/389-ds-base294—~1.8kAutomated safety check: PassCustom licence
Testing Guidefullstackhero/dotnet-starter-kit6.8k—~935Automated safety check: PassMIT
Scaffolding Oracle To Postgres Migration Test Projectgithub/awesome-copilot40k—~687Automated safety check: PassMIT

Similar skills

  • Leetcode Py

    wislertt/leetcode-py

    Generates Python LeetCode practice environments and manages a 307-problem catalog with the lcpy CLI.

    142 GitHub stars~1.4k tokensUpdated today
    Business, Finance & HRAuto-check passed
  • Research Init

    brycewang-stanford/Auto-Empirical-Research-Skills

    Scaffold a new research project with full reproducibility infrastructure in R and/or Python.

    4.5k GitHub stars~839 tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Write Test

    389ds/389-ds-base

    Add or extend a pytest integration test for 389 Directory Server under dirsrvtests/.

    294 GitHub stars~1.8k tokensUpdated today
    Testing & QAAuto-check passed
  • Testing Guide

    fullstackhero/dotnet-starter-kit

    Write tests for an FSH feature — xUnit + Shouldly + NSubstitute + AutoFixture, with naming and AAA conventions.

    6.8k GitHub stars~935 tokensUpdated 7 days ago
    Testing & QAAuto-check passed
  • Appbuilder Testing

    adobe/skills

    Generate and run tests for Adobe App Builder actions and UI components.

    195 GitHub stars~2.8k tokensUpdated today
    Testing & QAAuto-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
  • 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
  • Scaffolds and reviews facade methods on Git::Repository in ruby-git, with unit tests, integration tests and YARD documentation.

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

Works with

Questions about Git Command Class Implementation

What does Git Command Class Implementation do?

Scaffolds and reviews `Git::Commands::*` classes in the ruby-git library, with unit tests, integration tests and YARD docs, using the Base command architecture. This skill is specific to the ruby-git library. Given a target `Git::Commands::*` class name and the git subcommand it wraps, the agent reads or scaffolds the command class under `lib/git/commands/`, the matching unit specs under `spec/unit/git/commands/`, and the git documentation for the command, then checks the result against the policy authorities.

When should I use Git Command Class Implementation?

Git Command Class Implementation fits situations like: adding a new Git::Commands class for a git subcommand; reviewing an existing command class for correctness; writing unit and integration tests and YARD docs for a command class.

How do I install Git Command Class Implementation in Claude Code?

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

How do I install Git Command Class Implementation in Codex?

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

Can I use Git Command Class Implementation 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 command-implementation -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/command-implementation, .gemini/skills/command-implementation, .github/skills/command-implementation and .opencode/skills/command-implementation in your project.

What does Git Command Class Implementation need to run?

Going by SKILL.md and its folder, Git Command Class Implementation needs the command-line tools its instructions call (bundle and git). Our summary lists: A checkout of the ruby-git repository; The git binary that the command classes wrap.

Does Git Command Class Implementation access the network?

SKILL.md names 1 domain. In commands or code: git-scm.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Git Command Class Implementation 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 Git Command Class Implementation use?

Git Command Class Implementation 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 Git Command Class Implementation use?

About 3k tokens (SKILL.md is roughly 12k 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 Git Command Class Implementation?

Skills that share tags, products or a category with Git Command Class Implementation: Leetcode Py (wislertt/leetcode-py, 142 stars), Research Init (brycewang-stanford/Auto-Empirical-Research-Skills, 4.5k stars), Write Test (389ds/389-ds-base, 294 stars) and Testing Guide (fullstackhero/dotnet-starter-kit, 6.8k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Git Command Class Implementation?

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.