Skip to content
Skills Library
Programming · Automation

managing-git-workflow

/managing-git-workflow

Safely inspects repository state and executes explicitly authorized commits, pushes, and pull-request creation through a constrained runner. Use when the user asks to commit selected work, push existing commits, create or inspect a pull request, save changes in Git, or publish a branch to GitHub.

Repository
skill-set ↗
Licence
MIT
Last repository change
19.10.2026

Assessment and security

90/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content25 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
5
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 19.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Safely inspects repository state and executes explicitly authorized commits, pushes, and pull-request creation through a constrained runner. Use when the user asks to commit selected work, push existing commits, create or inspect a pull request, save changes in Git, or publish a branch to GitHub.

Original author description

Safely inspects repository state and executes explicitly authorized commits, pushes, and pull-request creation through a constrained runner. Use when the user asks to commit selected work, push existing commits, create or inspect a pull request, save changes in Git, or publish a branch to GitHub.

How it works

  1. Overview
  2. Authorization Boundary
  3. Workflow Selection
  4. Common Contract
  5. Commit Scope Rules
  6. Language Detection
  7. Safety Invariants
  8. References
Original SKILL.md headings · 66 lines, 602 words
SKILL.md preview
---
name: managing-git-workflow
description: Safely inspects repository state and executes explicitly authorized commits, pushes, and pull-request creation through a constrained runner. Use when the user asks to commit selected work, push existing commits, create or inspect a pull request, save changes in Git, or publish a branch to GitHub.
allowed-tools: "Edit(//**/.git/skill-set/inputs/commit-message.*/content) Edit(//**/.git/worktrees/*/skill-set/inputs/commit-message.*/content) Edit(//**/.git/skill-set/inputs/pr-body.*/content) Edit(//**/.git/worktrees/*/skill-set/inputs/pr-body.*/content)"
---

# Managing Git Workflow

## Overview

Turn an explicit Git or pull-request request into one bounded operation. Resolve `scripts/skill-set-git` relative to the directory containing this `SKILL.md`, then invoke that absolute path directly for all Git and GitHub activity. Do not depend on a host-specific plugin-root environment variable or a shell variable persisting across tool calls. References use `<git-runner>` as a non-executable placeholder; replace it with the resolved absolute path in every invocation. The runner returns JSON, preserves shell metacharacters through file arguments, and applies index and remote compare-and-swap checks before mutation.

## Authorization Boundary

Inspection is read-only. Run `inspect` whenever repository state may have changed.

Treat each mutation as a separate capability:

- `commit`: authorized only by a request to create a commit; never pushes.
- `push`: authorized only by a request to push; publishes existing commits only.
- `pr-create`: authorized only by a request to create a PR; may push existing commits when the PR branch is not current remotely.

Do not infer one capability from another. A commit request does not authorize push, and a push request does not authorize creating a commit. Never execute direct Git or GitHub commands from this skill.

## Workflow Selection

| Request | Reference | Runner operation |
|---|---|---|
| Inspect or commit | `reference/commit.md` | `inspect`, `commit` |
| Push existing commits | `reference/push.md` | `inspect`, `push` |
| Create or find a PR | `reference/pr.md` | `inspect`, `pr-create` |

## Common Contract

1. Parse successful stdout as one JSON object.
2. Parse a nonzero command's stderr as a recoverable JSON error.
3. Stop on stale `index_fingerprint`, changed remote SHA, behind/diverged history, or ambiguous scope.
4. Use `--dry-run` before a mutation when the requested scope is not already fully confirmed.
5. Ask `input-prepare` for a managed path, replace its exact `SKILL_SET_INPUT_REPLACE_ME` sentinel through the scoped Edit capability, then pass it as `--message-file` or `--body-file`.
6. Preserve staged, unstaged, and untracked distinctions in every user-facing summary.

## Commit Scope Rules

- With no paths, commit the current index only.
- With user-named paths, pass one `--path` per path. The runner rejects staged paths outside that scope.
- Pass `--all` only when the user explicitly requested every current change.
- If the index is empty and no scope was named, ask for paths. Do not infer them from nearby files.
- Generate the message from `commit_context.staged_diff` or the `staged_preview` returned by commit dry-run, not from a general working-tree summary.

## Language Detection

Use the user's language for conversation. For commit messages and PR titles/bodies, follow an explicit artifact-language instruction or the repository's language policy first; otherwise use the user's language, then recent repository convention, then English. Match recent commit style without overriding the applicable language policy. Keep commands, paths, and technical identifiers exact.

## Safety Invariants

- Never publish from `commit`.
- Never create a commit from `push` or `pr-create`.
- Never include dirty files in a PR implicitly.
- Require explicit confirmation before proceeding with dirty files excluded from a new PR.
- Return an existing PR URL instead of creating a duplicate.
- Use the committed PR range `origin/<base>...HEAD` reported by the runner.
- Do not resolve divergence or remote races automatically; report the recovery decision to the user.
- If the user cancels after preparing text, remove its managed allocation with `input-discard`.
- Never pass an unchanged sentinel; the runner rejects it before any commit, push, or PR creation.

## References

- `reference/commit.md` — index/path scope, message generation, and index CAS
- `reference/push.md` — expected remote SHA and existing-commit publication
- `reference/pr.md` — committed PR scope, dirty exclusion, and existing PR detection
Files in this package (5)
  • SKILL.md 5 KB
  • reference/commit.md 4 KB
  • reference/pr.md 3 KB
  • reference/push.md 2 KB
  • scripts/skill-set-git 39 KB

Versions

RepositoryScoreLicence
This page · ether-moon/skill-set90MIT
hashintel/hash100MIT

Database snapshot: 13.11.2026 · package version ed0cac0a192c (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100git-workflow
    Conventional commits, PR creation, and quality gate verification. Use when: commit, PR, branch, push, conventional commit, create pull request, git.
  • 95SourceControl
    Git workflow automation including commits, branch management, and PR creation with conventional commits and clean commit rules. USE WHEN commit, git commit, create branch, pull request, PR, push, git workflow, conventional commit, stage changes, commit message.
  • 100create-pr
    Create Git branches, commits, pushes, and GitHub pull requests for Next.js. Use when the user asks to create a branch, commit current changes, open a PR or draft PR, publish a pull request, or recover from gh pr create / PR template issues. Covers…
  • 90git-workflow
    Inspect status and history, create scoped commits, perform authorized history operations, or prepare a draft PR safely. Use for explicit Git or PR requests; do not commit, rewrite, push, or open a PR during ordinary implementation.
  • 100git-commit-and-workflow
    Git commit, branch and pull request best practices using Conventional Commits. Use whenever creating commits, naming branches, preparing pull requests, writing commit messages, or when asked to commit, push, merge or release code.
  • 100branch-commit-pr
    Create a professionally named local git branch, commit the current changes in clean Conventional Commits (no Claude/AI signature), push it, and open a GitHub pull request. Use when the user asks to "make a branch and PR", "commit and open a PR", "ship these changes", or invokes /branch-commit-pr.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.