push-to-github

A workflow for sending already-committed code changes from the current Git branch to GitHub and opening a pull request, which is a proposed code change for review.

In plain words
What is it for?
Use it after committing changes to push the branch to GitHub and create or report a pull request through the GitHub command-line tool.
Why use it?
It avoids mixing publishing with local editing, staging, or committing files. It also stops when there is nothing new to send or when the current branch is the project's main release branch.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/afx-team/hebb-mind/push-to-github
Any agent
npx skills add afx-team/hebb-mind --skill push-to-github
Clone the repo
git clone --depth 1 https://github.com/afx-team/hebb-mind

Made for: Claude Code, Codex.

Per session 54 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,797 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00054 $0.01797
Opus 5 $0.00027 $0.00898
Sonnet 5 $0.00011 $0.00359
Haiku 4.5 $0.00005 $0.00180

Measured 2d ago against content hash 452eda80cb73, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

push-to-github scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/push-to-github/SKILL.md · 202 lines

How it starts

The opening of the file, as written. The whole thing — 202 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Push to GitHub

Pure "send my committed work upstream" skill. Pushes whatever commits are already in the local branch but not yet on the remote, then opens (or reports) a PR.

Out of scope (handled by /commit):

  • Staging files
  • Creating commits
  • Creating branches
  • Anything about uncommitted changes in the working tree

This skill does not look at the working tree at all. Uncommitted files are the user's business; this skill only cares about commits.


Hard rules (MUST)

  • MUST NOT run git add, git commit, git stash, or any staging/committing command.
  • MUST NOT inspect or report on working-tree cleanliness as a precondition.
  • MUST NOT git push --force, git push --no-verify, git reset --hard, git commit --amend, git config, or git rebase -i.
  • MUST abort if there are no unpushed commits on the current branch.
  • MUST NOT create a PR when on main / master (those are the trunk; pushing there is the release trigger — publish.yml ships to PyPI when pyproject.toml's version changes on main).

Pre-flight (run in parallel)

git rev-parse --git-dir                    # in a git repo?
git remote get-url origin                  # has remote?
gh auth status                             # gh CLI authed?
git rev-parse --abbrev-ref HEAD            # current branch

Bail out if any fail:

Failure Action
Not a git repo Exit; tell the user
No origin remote Exit; tell user to add one (gh repo create / git remote add origin …)
gh not authed Exit; tell user to run gh auth login themselves (do NOT run it — interactive)
Detached HEAD (HEAD returned) Exit; tell user to checkout a branch

Workflow

Step 1 — Find unpushed commits

BRANCH=$(git rev-parse --abbrev-ref HEAD)

# Refresh the remote ref so we have an up-to-date view
git fetch origin "$BRANCH" 2>/dev/null || true

# Three cases:
#   (a) upstream is set → diff against @{u}
#   (b) no upstream but remote branch exists → diff against origin/$BRANCH
#   (c) remote branch does not exist → every local commit on this branch is unpushed
if git rev-parse --verify --quiet '@{u}' >/dev/null 2>&1; then
    UNPUSHED=$(git log --oneline '@{u}..HEAD')
    BASE='@{u}'
elif git ls-remote --exit-code --heads origin "$BRANCH" >/dev/null 2>&1; then
    UNPUSHED=$(git log --oneline "origin/${BRANCH}..HEAD")
    BASE="origin/${BRANCH}"
else
    UNPUSHED=$(git log --oneline HEAD)
    BASE='(new branch — no remote counterpart)'
fi

Read the full file on GitHub · 202 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 202 lines · 54 tokens per session scan A 452eda80cb73

Subscribe to this mod's changes

push-to-github is a skill published in the GitHub repository afx-team/hebb-mind (50 stars, last pushed 1mo ago), licensed MIT. It adds 54 tokens to every session and 1,797 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

update-changelog

Update docs/CHANGELOG.md from git history, GitHub releases, and code diffs. Use when: writing release notes, syncing the latest changelog entry, summarizing a new tag, or keeping changelog wording concise and consistent.

alibaba/page-agent · 52 tokens

release

Prepare and publish stable Agent Lightning releases through the repository's version bump, pull-request checks, merge, tag, PyPI trusted-publishing, and versioned-documentation workflows. Use when asked to plan, cut, verify, or explain a release; treat nightly TestPyPI builds as a separate path.

microsoft/agent-lightning · 63 tokens

changelog-generation

Changelog generation skill for ZeroClaw releases. Use this skill when the user wants to generate a changelog, prepare release notes, or summarize what changed between versions. Trigger on: 'generate changelog', 'changelog for v0.7.x', 'prepare release notes', 'what changed since ', 'write the changelog'…

zeroclaw-labs/zeroclaw · 87 tokens

herdr-pre-release-audit

Audit herdr release readiness by comparing commits since the base release against next-release changelog and docs. Use when asked to run or apply the repo's pre-release audit, validate docs/next before release, inspect issue refs that release CI will close, or finalize release docs for herdr.

herdrdev/herdr · 65 tokens

release-notes

Generate user-facing release notes for Intelligent Terminal. Use when asked to write release notes, changelog, what-is-new summary, or prepare a release. Compares git commits between releases, looks up PR-linked issues and community contributors, then outputs formatted notes with "Verbed + Impact + Scenario" style…

microsoft/intelligent-terminal · 73 tokens

release

Cut an AgentOS release via the scripts/publish flow. Use when the user asks to release, publish, cut a release, or bump the AgentOS version.

rivet-dev/agentos · 35 tokens