leanspec-pre-push

leanspec-pre-push is a skill for Claude Code, Codex from codervisor/leanspec. It costs 129 tokens per session (2,532 once invoked), scanned A, original, MIT.

A pre-push checklist for the LeanSpec repository, a project that contains TypeScript packages and Rust crates in one monorepo. A monorepo is a single repository that holds multiple related packages or applications.

In plain words
What is it for?
Use it before pushing LeanSpec changes to merge the latest main branch, resolve conflicts locally, run pnpm and Rust checks, and verify the required specification link.
Why use it?
It reproduces the merge conditions used by continuous integration, the automated checks run for pull requests, and verifies that a branch links to a valid specification issue before code is pushed.

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

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 leanspec-pre-push

README.md
[![agentmods](https://agentmods.dev/badge/skills/codervisor/leanspec/leanspec-pre-push.svg)](https://agentmods.dev/skills/codervisor/leanspec/leanspec-pre-push)
Your own site
<a href="https://agentmods.dev/skills/codervisor/leanspec/leanspec-pre-push"><img src="https://agentmods.dev/badge/skills/codervisor/leanspec/leanspec-pre-push.svg" alt="Measured on agentmods" height="20"></a>
Per session 129 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,532 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.00129 $0.02532
Opus 5 $0.00064 $0.01266
Sonnet 5 $0.00026 $0.00506
Haiku 4.5 $0.00013 $0.00253

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

Security

Grade A, and why

leanspec-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 4d 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.

.agents/skills/leanspec-pre-push/SKILL.md · 174 lines

How it starts

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

leanspec-pre-push

Mechanical checklist that catches the reviewer / CI failures this repo has actually had, plus a spec-link check that enforces the SDD loop locally.

This is lean-spec's analogue of onsager-pre-push / duhem-pre-push. The discipline is the same; the toolchain checks are lean-spec's (pnpm + cargo). The repo-specific patterns below come from this monorepo's structure (TypeScript packages, Rust crates, i18n locale files, schemas).

Why

CI on pull_request checks out a merge of origin/main + the PR branch, not the branch alone. Local pnpm typecheck without that merge is insufficient.

The spec-link step enforces "no PR without a spec or a trivial label" at push time, before the PR is open — so the author sees the problem locally instead of hearing about it from a reviewer.

Steps

Run all of these from the repo root.

1. Sync main into the branch

git fetch origin main
git merge origin/main --no-edit

Resolve conflicts locally, before push — never on the PR "Resolve conflicts" web editor (it bypasses any local validation). If the merge aborts cleanly, skip to step 2.

Resolving conflicts
  1. Inventory what conflicted:

    git status --short                   # U* lines = unresolved paths
    git diff --name-only --diff-filter=U
    
  2. Work by pattern, not by file. A single logical conflict often spans several files. Match what you see against the patterns below before touching conflict markers — the right fix is often "take main's version and re-apply your change on top", not a line-by-line merge.

  3. Resolve, then stage each resolved path with git add <path>. Re-run git status until no U* entries remain.

  4. Verify before committing the merge. Run pnpm typecheck && pnpm pre-push. Run pnpm test for the affected packages. If the merge touched Rust, also run pnpm build:rust and pnpm test:rust.

  5. Only then:

    git commit --no-edit                 # default "Merge branch 'main' ..." message
    

Read the full file on GitHub · 174 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. 4d ago First seen · 174 lines · 129 tokens per session scan A 6562fec49ed5

Subscribe to this mod's changes

leanspec-pre-push is a skill published in the GitHub repository codervisor/leanspec (287 stars, last pushed 3mo ago), licensed MIT. It adds 129 tokens to every session and 2,532 once invoked, about $0.0006 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.