pre-push

pre-push is a skill for Claude Code, Codex from strands-agents/harness-sdk. It costs 85 tokens per session (1,335 once invoked), scanned A, original, Apache-2.0.

A manually run check that prepares a code branch for pushing by finding which parts of the project changed and running their matching checks.

In plain words
What is it for?
Use it before pushing changes to run relevant Python, TypeScript, or documentation checks and apply automatic fixes where available.
Why use it?
It reduces the chance of discovering locally avoidable failures only after pushing or opening a pull request, a request for code review.

Skill for Claude CodeCodex

About the project

Strands Agents is an open-source SDK for building and running AI agents in Python and TypeScript. Developers use it to create agents with model providers, tools, lifecycle controls, memory, sessions, streaming, tracing, and evaluations, and the catalogue includes add-ons for its agent-building workflow.

strands-agents/harness-sdk · 7,155 stars · on GitHub

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/strands-agents/harness-sdk/pre-push
Any agent
npx skills add strands-agents/harness-sdk --skill pre-push
Clone the repo
git clone --depth 1 https://github.com/strands-agents/harness-sdk

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for pre-push

README.md
[![agentmods](https://agentmods.dev/badge/skills/strands-agents/harness-sdk/pre-push.svg)](https://agentmods.dev/skills/strands-agents/harness-sdk/pre-push)
Your own site
<a href="https://agentmods.dev/skills/strands-agents/harness-sdk/pre-push"><img src="https://agentmods.dev/badge/skills/strands-agents/harness-sdk/pre-push.svg" alt="Measured on agentmods" height="20"></a>
Per session 85 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,335 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.00085 $0.01335
Opus 5 $0.00043 $0.00668
Sonnet 5 $0.00017 $0.00267
Haiku 4.5 $0.00009 $0.00134

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

Security

Grade A, and why

pre-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 5d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (run-checks.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

.agents/skills/pre-push/SKILL.md · 74 lines

How it starts

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

Pre-push Checks Skill

Get your branch push-ready: detect which areas your changes touch, auto-fix what's mechanically fixable, then run the same checks CI's merge gate runs for those areas — and triage whatever's left with the user.

This is a manually-invoked check, not a git hook — it runs only when you ask for it, so it never gets in the way of committing incrementally. Reach for it when you're about to push or open a PR. (When opening a PR, run this first, then use the pr-create / pr-writer skills to draft and open it.)

The repo's CI (.github/workflows/ci.yml) detects which of three areas changed and runs only those: python (strands-py/), typescript (strands-ts/), and docs (site/). This skill mirrors that routing locally.

Process

1. Run the bundled script

bash .agents/skills/pre-push/run-checks.sh 2>&1

Non-zero exit means something failed. On failure, the script prints a summary at the end with every failed step and the last 20 lines of its error output — everything you need to start fixing is in the tail of the output. Ignore noise earlier in the output.

The script runs from anywhere in the repo (it locates the root via git rev-parse --show-toplevel). From a subdirectory:

bash "$(git rev-parse --show-toplevel)/.agents/skills/pre-push/run-checks.sh"

It detects the changed areas — comparing against the closest main/master base it can find (local or any remote, so upstream/main on a fork works too — fork-aware), plus staged, unstaged, and untracked changes — using the same path filters CI uses, then for each detected area runs two phases:

  • Phase 1 — auto-fix: formatting, lint --fix, and lockfile sync. These are scoped to the files your change touches (so they never reformat unrelated files into your commit), write to working-tree files, and never fail the run.
  • Phase 2 — check: the gate (build, lint check, format check, type-check, tests, audit), run tree-wide for CI parity. Phase 2 runs on the now-fixed tree and decides pass/fail.

Read the full file on GitHub · 74 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 5d ago First seen · 74 lines · 85 tokens per session scan A 0da228c80df3

Subscribe to this mod's changes

pre-push is a skill published in the GitHub repository strands-agents/harness-sdk (7,155 stars, last pushed today), licensed Apache-2.0. It adds 85 tokens to every session and 1,335 once invoked, about $0.0004 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

returns-policy

Answer return, refund, and warranty questions for electronics. Use when the user mentions returns, refunds, RMAs, warranty coverage, damaged items, or opened packaging.

strands-agents/samples · 36 tokens

technical-troubleshooting

Provide setup, troubleshooting, and maintenance guidance. Use when the user reports a device that won't power on, connectivity issues, setup questions, overheating, or maintenance concerns.

strands-agents/samples · 38 tokens

docs-audit

Assess a published or in-progress documentation page for quality, accuracy, and voice compliance. Use before rewriting a page, during periodic health checks, when community signals point to confusion, or when comparing against competitor docs. Also triggers on "audit this page", "assess the docs", "what's wrong with…

strands-agents/docs · 79 tokens

docs-reviewer

Review documentation drafts for voice consistency, structure, and terminology before PR submission. Use after completing a draft, when checking if docs are ready to ship, or automatically after docs-writer produces output. Also triggers on "review this draft", "check my docs", "is this ready to ship", "review before…

strands-agents/docs · 68 tokens

docs-writer

Draft or rewrite Strands Agents documentation pages. Use when writing new doc pages, rewriting pages that failed audit, drafting sections for existing pages, or writing blog posts and release notes about Strands. Also triggers on "write a doc", "draft a page", "rewrite the quickstart", "add a tutorial for X"…

strands-agents/docs · 74 tokens

docs-planner

Identify documentation gaps and prioritize the docs backlog. Use when planning a docs improvement sprint, after signals surface repeated friction, when new SDK features ship without docs, or for periodic health assessment. Also triggers on "plan docs work", "what docs need writing", "prioritize the backlog", "docs…

strands-agents/docs · 73 tokens