check-linters-before-commit

check-linters-before-commit is a skill for Claude Code, Codex from dimetron/pi-go. It costs 30 tokens per session (809 once invoked), scanned A, original, MIT.

A checklist for verifying Go code before creating a Git commit. It covers changed files, linting, tests, and building the pi command-line program.

In plain words
What is it for?
Use it when preparing or checking a commit: run the configured linter, Go tests, and the build command, and fix failures before committing.
Why use it?
It prevents commits from being made while static checks, tests, or compilation are failing.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is go build ./cmd/pi.

Good fit Use it when preparing or checking a commit: run the configured linter, Go tests, and the build command, and fix failures before committing.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/dimetron/pi-go
agentmods
npx agentmods add skills/dimetron/pi-go/check-linters-before-commit

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 check-linters-before-commit

README.md
[![agentmods](https://agentmods.dev/badge/skills/dimetron/pi-go/check-linters-before-commit/github.svg)](https://agentmods.dev/skills/dimetron/pi-go/check-linters-before-commit)
Your own site
<a href="https://agentmods.dev/skills/dimetron/pi-go/check-linters-before-commit"><img src="https://agentmods.dev/badge/skills/dimetron/pi-go/check-linters-before-commit/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for check-linters-before-commit

Your own site · 80×15
<a href="https://agentmods.dev/skills/dimetron/pi-go/check-linters-before-commit"><img src="https://agentmods.dev/badge/skills/dimetron/pi-go/check-linters-before-commit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 30 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 809 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.1 $0.00030 $0.00809
Opus 5.5 $0.00012 $0.00324
Sonnet 5.5 $0.00006 $0.00162
Haiku 4.5 $0.00003 $0.00081

Measured 1mo ago against content hash 8cae2e0c4bf3, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

check-linters-before-commit 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 1mo 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.

.pi-go/skills/check-linters-before-commit/SKILL.md · 112 lines

How it starts

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

Check Linters Before Commit

You are an expert at ensuring code quality by running linters and static analysis before committing changes.

When to Use

Use this skill whenever the user asks to commit, prepare a commit, or check whether code is ready to commit. Run the checks before committing anything, and do not proceed with a commit until the required checks pass.

Workflow

1. Check What Changed

First, identify what files have changed:

git diff --name-only
git diff --cached --name-only

2. Run Linters

Run the full linting suite (uses .golangci.yml v2 config):

golangci-lint run ./...

This covers go vet, staticcheck, errcheck, errorlint, misspell, revive, and more. Falls back to go vet ./... only if golangci-lint is not installed.

3. Run Tests

Verify tests pass:

go test ./...

Since Go 1.27, go test also runs the stdversion vet check by default, which fails on use of stdlib symbols newer than the go directive in go.mod. If a test fails that way, bump go.mod in the same change — do not //nolint around it. See the go-127 skill.

4. Build Verification

Ensure the code builds:

go build ./cmd/pi

Success Criteria

All of the following must pass before reporting readiness or creating a commit:

  • golangci-lint run ./... exits with code 0 (no issues)
  • go test ./... exits with code 0 (all tests pass)
  • go build ./cmd/pi exits with code 0 (builds successfully)

Output Format

Report the status of each check:

## Pre-Commit Checks

| Check | Status | Notes |
|-------|--------|-------|
| Lint (golangci-lint) | ✅ PASS / ❌ FAIL | |
| Tests | ✅ PASS / ❌ FAIL | |
| Build | ✅ PASS / ❌ FAIL | |

**Result:** Ready to commit / Fix issues before committing

If Checks Fail

For each failing check:

  1. Note the specific file:line where the issue occurs
  2. Provide the linter rule/message
  3. Suggest a fix or create a TODO for manual fixing

Example:

Read the full file on GitHub · 112 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. 1mo ago First seen · 112 lines · 30 tokens per session scan A 8cae2e0c4bf3

Subscribe to this mod's changes

check-linters-before-commit is a skill published in the GitHub repository dimetron/pi-go (212 stars, last pushed today), licensed MIT. It adds 30 tokens to every session and 809 once invoked, about $0.0001 per session on Opus 5.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

pyo3-bindings

PyO3 conventions for exposing a Rust core to Python: pyclass/pymethods, PyErr/PyResult error mapping, GIL release, properties, maturin builds, and pytest. Load when generating or reviewing PyO3 Python bindings for a Rust library.

Goldziher/ai-rulez · 61 tokens

golang-testing

Production-ready Golang tests — table-driven tests, testify suites and mocks, parallel tests, fuzzing, fixtures, goroutine leak detection with goleak, snapshot testing, code coverage, integration tests, idiomatic test naming. Use when writing or reviewing Go tests, choosing a testing approach, setting up Go test CI…

alexastrum/skl · 115 tokens

golang-stretchr-testify

Comprehensive guide to stretchr/testify for Golang testing. Covers assert, require, mock, and suite packages in depth. Use when writing tests with testify, creating mocks, setting up test suites, or choosing between assert and require. Covers testify assertions, mock expectations, argument matchers, call verification…

alexastrum/skl · 97 tokens

update-v8-version

Update Codex's pinned v8 / rustyv8 versions, validate the release-candidate path, and investigate failed V8 canary or artifact builds. Use when asked to bump V8, update rustyv8 artifacts, prepare or validate a V8 release candidate, check v8-canary, or diagnose why a V8 version update no longer builds.

openinterpreter/openinterpreter · 86 tokens

codew-release-qa-sweep

Use before claiming Codewhale release work is done: run the full gate sweep and list the manual QA targets.

Hmbown/CodeWhale · 31 tokens

cw-gates

Use before claiming any Codewhale change is done, green, or ready to land: the focused-to-broad verification ladder, the budget checks CI enforces, and the rules for what counts as a passing test.

Hmbown/Codewhale · 48 tokens