Agent skill

Guarded Git Commit and Push

by jerrywu001 in jerrywu001/cc-sessions-viewer

Commits and pushes only on an explicit request, pulling first, running the project's CI checks locally, and stopping cold on any conflict or failure.

MITAuto-check: notesDevelopment

Install Guarded Git Commit and Push

skills CLI
$ npx skills add jerrywu001/cc-sessions-viewer --skill git-push -a claude-code

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

GitHub CLI
$ gh skill install jerrywu001/cc-sessions-viewer git-push --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/jerrywu001/cc-sessions-viewer.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/git-push .claude/skills/git-push && 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
git-push
GitHub stars
394
Token cost
~603 tokens
SKILL.md length
272 words
Files
2
Skills in repo
3
Repo updated
First seen
Licence
MIT

At a glance

Commits and pushes only on an explicit request, pulling first, running the project's CI checks locally, and stopping cold on any conflict or failure.

  • Works in 9 steps: Run git pull first to fetch the latest… → If the pull output contains conflict… → Analyze the changes in parallel → …
  • Committing and pushing the current repository changes on explicit request
  • SKILL.md covers Workflow and Rules
  • Calls git, cargo and npx

What it does

Only activates when the user explicitly asks for a commit and push, pulling the latest remote changes first and stopping immediately, without committing or pushing anything, if that pull surfaces conflict markers. It then inspects the actual changes with a short status and a full diff before writing a commit message, choosing a lowercase conventional-commit type such as `feat`, `fix` or `refactor` because the repository's commit linter enforces lowercase types, and formatting the message as a one-line summary followed by a bulleted list of details with no AI-generated sign-off.

Before anything is staged, it runs the project's own CI checks locally — a Vue type check, the test suite, and Rust's clippy and test commands against the Tauri backend — and stops without committing or pushing if any of them fail. When everything passes, it stages everything, deliberately unstages the local `.env.development` file without touching `.gitignore`, commits with the multi-line message, and pushes, then reports back the commit hash, message, branch and push result.

Interactive git commands are avoided throughout, and a failing commit hook or lint check is always fixed and retried rather than bypassed. If there is nothing to commit, the skill says so and stops instead of inventing a change, and a push to the remote only happens when the user has explicitly asked for one, not merely for a local commit.

When your agent uses it

  • Committing and pushing the current repository changes on explicit request
  • Generating a conventional-commit message that matches the repo's lint rules
  • Running CI checks locally before a commit goes out
  • Stopping a push when a git pull surfaces merge conflicts

Example prompts

  • “Commit and push these changes with a proper conventional commit message.”
  • “Run the CI checks and push only if everything passes.”
  • “Pull first, then commit and push — stop if there's a conflict.”

Requirements

  • Git
  • npm and cargo, for the project's CI checks

Workflow steps

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

  1. Run git pull first to fetch the latest remote changes.
  2. If the pull output contains conflict markers such as CONFLICT or Merge conflict, stop immediately — do not commit or push — and clearly…
  3. Analyze the changes in parallel
  4. Generate an English commit message. The commit type must be chosen from
  5. The commit message format must be
  6. Do not add any AI-generated sign-off.
  7. Before staging or committing, run the CI checks locally
  8. In the main repository, run
  9. After completion, report the commit hash, commit message, current branch, and push result.

What it can do on your machine

Read from SKILL.md and the folder at commit 69e0b4f. 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
    • cargo
    • npx
    • npm

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

  • Network

    No URLs in SKILL.md. Its commands use git, npx and npm, 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

Guarded Git Commit and Push loads about 603 tokens when it runs. Until then it costs about 98 tokens; SKILL.md has 272 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
~603

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: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:46
    - `git restore --staged .env.development 2>/dev/null || true` (only skip committing `.env.development`; keep the loca
  • NoteMentions a .env fileSKILL.md:57
    - `.env.development` changes must be removed from the staging area before commit; do not implement the exclusion by modi

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 jerrywu001/cc-sessions-viewer at commit 69e0b4f, republished under its MIT licence (© jerrywu001). 272 words, ~603 tokens.

Download SKILL.mdSave it as .claude/skills/git-push/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
git-push
description
Use when the user explicitly asks to commit and push the current repository changes. Suitable for analyzing current changes, generating an English commit message that follows the repo's conventions, and completing the push. Not suitable for status-only checks, local-only commits, push-disallowed contexts, or any case where the user has not explicitly asked to write to the remote.

Git Push

Only use this skill when the user explicitly asks to commit and push.

Workflow

  1. Run git pull first to fetch the latest remote changes.
  2. If the pull output contains conflict markers such as CONFLICT or Merge conflict, stop immediately — do not commit or push — and clearly list the conflicting files.
  3. Analyze the changes in parallel:
    • git status --short
    • git diff HEAD
  4. Generate an English commit message. The commit type must be chosen from:
    • feat
    • fix
    • doc
    • style
    • update
    • refactor
    • test
    • framework
    • revert Use lowercase for the type because this repository's commitlint enforces lowercase conventional-commit types.
  5. The commit message format must be:
text
type: brief summary of the change

- Change detail 1
- Change detail 2
  1. Do not add any AI-generated sign-off.
  2. Before staging or committing, run the CI checks locally:
    • npx vue-tsc --noEmit
    • npm run test:run
    • cargo clippy --manifest-path src-tauri/Cargo.toml --all-targets -- -D warnings
    • cargo test --manifest-path src-tauri/Cargo.toml Stop immediately if any check fails; do not commit or push a failing change.
  3. In the main repository, run:
    • git add .
    • git restore --staged .env.development 2>/dev/null || true (only skip committing .env.development; keep the local edits)
    • Commit with the multi-line message
    • git push
  4. After completion, report the commit hash, commit message, current branch, and push result.

Rules

  • If there are no changes, stop and explain that no commit is needed.
  • If commitlint or a git hook fails, fix the message or the underlying issue and retry; do not bypass validation.
  • Do not use interactive git commands.
  • Only push to the remote when the user has explicitly asked for a push.
  • .env.development changes must be removed from the staging area before commit; do not implement the exclusion by modifying .gitignore.

© jerrywu001, 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 .agents/skills/git-push of jerrywu001/cc-sessions-viewer.

  • SKILL.md
  • agents/openai.yaml

Open the folder on GitHubat commit 69e0b4f

Compare with similar skills

Guarded Git Commit and Push 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.

Guarded Git Commit and Push compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Guarded Git Commit and Push this skilljerrywu001/cc-sessions-viewer394—~603Automated safety check: NotesMIT
Add Tauri Commanddevlint/GitWand180—~1.5kAutomated safety check: PassMIT
Git Workflowbkywksj/knowledge-base330—~1.1kAutomated safety check: PassCustom licence
ToolJet Multi-Repo CommitToolJet/ToolJet41k—~1.3kAutomated safety check: PassAGPL-3.0
Git Workflow and Versioningaddyosmani/agent-skills102k2 repos~3.5kAutomated safety check: NotesMIT
React Router Pull Request Creatorremix-run/react-router57k—~2.5kAutomated safety check: PassMIT

Similar skills

  • Add Tauri Command

    devlint/GitWand

    A skill your agent uses when the user wants to expose a Rust feature to the Vue frontend, add a Tauri IPC command, invoke something from a Vue component, or wire up any backend/frontend…

    180 GitHub stars~1.5k tokensUpdated today
    DevelopmentAuto-check passed
  • Git Workflow

    bkywksj/knowledge-base

    Git 工作流与版本管理技能,规范分支策略、提交信息和发布流程. An agent skill from bkywksj/knowledge-base.

    330 GitHub stars~1.1k tokensUpdated 5 days ago
    DevelopmentAuto-check passed
  • Commits changes across ToolJet's root repo and its server/ee and frontend/ee submodules, writing messages from the diffs and updating submodule pointers in order.

    41k GitHub stars~1.3k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Git Workflow and Versioning

    addyosmani/agent-skills

    Sets git habits for every change: short-lived branches, atomic commits with descriptive messages, clean pull requests, plus versioning, tagging and changelogs for releases.

    102k GitHub starsUsed in 2 repos~3.5k tokens
    DevelopmentAuto-check: notes
  • React Router Pull Request Creator

    remix-run/react-router

    Packages finished React Router work into a draft pull request: branch, commit, push, a written PR body and the right GitHub labels.

    57k GitHub stars~2.5k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Commits changes in the Saleor codebase and works through pre-commit hook failures from ruff, mypy, the GraphQL schema check and the migrations check.

    23k GitHub stars~575 tokensUpdated yesterday
    DevelopmentAuto-check passed

More from jerrywu001/cc-sessions-viewer

  • Agent Skill Designer

    jerrywu001/cc-sessions-viewer

    Teaches how to design a good SKILL.md around five patterns: Tool Wrapper, Generator, Reviewer, Inversion and Pipeline.

    394 GitHub stars~1k tokensUpdated yesterday
    Auto-check passed
  • Tauri Dev MCP Bridge

    jerrywu001/cc-sessions-viewer

    Launches a Tauri app's dev build with the MCP bridge compiled in, so an agent can take screenshots, read the live DOM, click real buttons and call real backend commands.

    394 GitHub stars~1.4k tokensUpdated yesterday
    Auto-check: warnings

Categories

Questions about Guarded Git Commit and Push

What does Guarded Git Commit and Push do?

Commits and pushes only on an explicit request, pulling first, running the project's CI checks locally, and stopping cold on any conflict or failure. Only activates when the user explicitly asks for a commit and push, pulling the latest remote changes first and stopping immediately, without committing or pushing anything, if that pull surfaces conflict markers. It then inspects the actual changes with a short status and a full diff before writing a commit message, choosing a lowercase conventional-commit type such as `feat`, `fix` or `refactor` because the repository's commit linter enforces lowercase types, and formatting the message as a one-line summary followed by a bulleted list of details with no AI-generated sign-off.

When should I use Guarded Git Commit and Push?

Guarded Git Commit and Push fits situations like: committing and pushing the current repository changes on explicit request; generating a conventional-commit message that matches the repo's lint rules; running CI checks locally before a commit goes out; stopping a push when a git pull surfaces merge conflicts.

How do I install Guarded Git Commit and Push in Claude Code?

Run `npx skills add jerrywu001/cc-sessions-viewer --skill git-push -a claude-code`. Or copy the skill folder (.agents/skills/git-push in jerrywu001/cc-sessions-viewer) into .claude/skills/git-push in your project. Claude Code loads it when a task matches its description.

How do I install Guarded Git Commit and Push in Codex?

Run `npx skills add jerrywu001/cc-sessions-viewer --skill git-push -a codex`. Or copy the skill folder (.agents/skills/git-push in jerrywu001/cc-sessions-viewer) into .agents/skills/git-push in your project. Codex loads it when a task matches its description.

Can I use Guarded Git Commit and Push 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 jerrywu001/cc-sessions-viewer --skill git-push -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/git-push, .gemini/skills/git-push, .github/skills/git-push and .opencode/skills/git-push in your project.

What does Guarded Git Commit and Push need to run?

Going by SKILL.md and its folder, Guarded Git Commit and Push needs the command-line tools its instructions call (git, cargo, npx and npm). Our summary lists: Git; npm and cargo, for the project's CI checks.

Does Guarded Git Commit and Push access the network?

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

Is Guarded Git Commit and Push safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Guarded Git Commit and Push use?

Guarded Git Commit and Push 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 Guarded Git Commit and Push use?

About 603 tokens (SKILL.md is roughly 2.4k 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 Guarded Git Commit and Push?

Skills that share tags, products or a category with Guarded Git Commit and Push: Add Tauri Command (devlint/GitWand, 180 stars), Git Workflow (bkywksj/knowledge-base, 330 stars), ToolJet Multi-Repo Commit (ToolJet/ToolJet, 41k stars) and Git Workflow and Versioning (addyosmani/agent-skills, 102k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Guarded Git Commit and Push?

jerrywu001 (a GitHub user) maintains it in jerrywu001/cc-sessions-viewer, which has 394 GitHub stars. The repository holds 3 skills in this directory. The repository was last updated on October 7, 2026.

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