push

A command that checks a project's code quality and build before sending commits to a shared Git repository. Git is a system for tracking code changes and sharing them with others.

In plain words
What is it for?
Checking branch status, running lint, typecheck and build commands, reviewing unpushed commits, and pushing them when all checks pass.
Why use it?
It prevents commits from being pushed when linting, type checks or the production build fail.

Command for Claude Code

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 commands/dork-labs/dorkos/push
Clone the repo
git clone --depth 1 https://github.com/dork-labs/dorkos

Made for: Claude Code.

Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 619 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.00012 $0.00619
Opus 5 $0.00006 $0.00309
Sonnet 5 $0.00002 $0.00124
Haiku 4.5 $0.00001 $0.00062

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

Security

Grade A, and why

push 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/commands/git/push.md · 118 lines

How it starts

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

Git Push

Push commits to remote after validating that there are no lint, type, or build errors.

Task

Step 1: Check Current State

Verify there are commits to push:

# Check if branch has upstream
git status

# Show unpushed commits
git log @{u}..HEAD --oneline 2>/dev/null || git log --oneline -5

If there are no commits to push, report this and stop.

Step 2: Run Validation Checks

Run all validation checks. All must pass before pushing.

pnpm lint
pnpm typecheck
pnpm build

If any check fails: Stop and report the errors. Do not push.

Step 2.5: Verification Gate

After all checks pass, verify with fresh evidence:

  1. Re-read the output of lint, typecheck, and build
  2. Confirm zero errors in each
  3. Do not push based on a previous run — the checks in Step 2 ARE the fresh evidence

Refer to the verification-before-completion skill.

Step 3: Review What Will Be Pushed

Show the commits that will be pushed:

# Show commits ahead of remote
git log @{u}..HEAD --oneline 2>/dev/null || echo "No upstream branch set"

# Show current branch
git branch --show-current

Step 4: Push to Remote

Push the current branch:

git push

If no upstream is set, push with -u flag:

git push -u origin $(git branch --show-current)

Step 5: Verify

Confirm the push was successful:

git status

Output Format

Git Push

Validation:
  [x] Lint passed
  [x] Typecheck passed
  [x] Build passed

Pushed:
  Branch: [branch-name]
  Commits: X commit(s)
  - [hash] [message]
  - [hash] [message]

Status: Successfully pushed to origin

Edge Cases

  • Lint fails: Report errors, suggest fixes, do not push
  • Typecheck fails: Report errors with file locations, do not push
  • Build fails: Report build errors, do not push
  • No upstream: Set upstream with -u origin <branch>
  • Remote rejected: Report rejection reason (likely needs pull/rebase)
  • No commits to push: Report "Already up to date with remote"
  • Uncommitted changes: Warn user about uncommitted changes (but still push existing commits)

Read the full file on GitHub · 118 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 · 118 lines · 12 tokens per session scan A 16267c31b65f

Subscribe to this mod's changes

push is a command published in the GitHub repository dork-labs/dorkos (9 stars, last pushed 2d ago), licensed MIT. It adds 12 tokens to every session and 619 once invoked, about $0.0001 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-31.