Agent skill

Check Linters Before Commit

by dimetron in dimetron/pi-go

Before any commit, run linters, vet, tests, and build verification; do not commit until checks pass

MITAuto-check passedDevelopment

Install Check Linters Before Commit

skills CLI
$ npx skills add dimetron/pi-go --skill check-linters-before-commit -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install dimetron/pi-go check-linters-before-commit --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/dimetron/pi-go.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.pi-go/skills/check-linters-before-commit .claude/skills/check-linters-before-commit && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
check-linters-before-commit
GitHub stars
207
Token cost
~768 tokens
SKILL.md length
333 words
Files
1
Skills in repo
21
Repo updated
First seen
Licence
MIT

At a glance

Before any commit, run linters, vet, tests, and build verification; do not commit until checks pass

  • Works in 4 steps: Check What Changed → Run Linters → Run Tests → …
  • Tasks that involve Linting and formatting
  • SKILL.md covers When to Use, Workflow, Success Criteria and Output Format, plus 2 more sections
  • Calls go and git

What it does

Check Linters Before Commit is an agent skill from dimetron/pi-go. Before any commit, run linters, vet, tests, and build verification; do not commit until checks pass

Its SKILL.md is about 770 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Linting and formatting. The repository describes itself as: Go implementation of AI coding agent. The licence is MIT.

When your agent uses it

  • Tasks that involve Linting and formatting

Example prompts

  • “/check-linters-before-commit”

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Check What Changed
  2. Run Linters
  3. Run Tests
  4. Build Verification

What it can do on your machine

Read from SKILL.md and the folder at commit 24d1f2b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • go
    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Check Linters Before Commit loads about 768 tokens when it runs. Until then it costs about 32 tokens; SKILL.md has 333 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~32
When it runs · the whole SKILL.md, loaded when a task matches
~768

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from dimetron/pi-go at commit 24d1f2b, republished under its MIT licence (© dimetron). 333 words, ~768 tokens.

Download SKILL.mdSave it as .claude/skills/check-linters-before-commit/SKILL.md (or your agent's skills folder).
name
check-linters-before-commit
description
Before any commit, run linters, vet, tests, and build verification; do not commit until checks pass
tools
bash, read, grep, find

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:

bash
git diff --name-only
git diff --cached --name-only
2. Run Linters

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

bash
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:

bash
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:

bash
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:

## Issues Found

### Lint Failures

1. **internal/tools/reader.go:42** — `whitespace` rule: unnecessary trailing whitespace
   - Fix: Remove trailing whitespace

2. **internal/agent/runner.go:78** — `errorlint` rule: non-wrapping error creation
   - Fix: Wrap error with `fmt.Errorf("context: %w", err)`

Rules

  • Always run these checks before making or suggesting a commit
  • Always run golangci-lint run ./... first (most comprehensive, uses .golangci.yml)
  • Fall back to go vet ./... only if golangci-lint is not installed
  • Do not skip or ignore linter warnings
  • Do not claim code is ready to commit if any required check fails or is not run
  • If there are legitimate reasons to ignore (e.g., intentional type assertions), suggest adding //nolint: directives with justification
  • Check both staged (git diff --cached) and unstaged (git diff) changes

© dimetron, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .pi-go/skills/check-linters-before-commit of dimetron/pi-go.

Open the folder on GitHubat commit 24d1f2b

Compare with similar skills

Check Linters Before Commit next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Check Linters Before Commit compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Check Linters Before Commit this skilldimetron/pi-go207—~768Automated safety check: PassMIT
Install Anti-Slop Oxlint Rulesdmmulroy/anti-slop5.3k1 repos~2.2kAutomated safety check: PassMIT
Summarise Ecosystem Resultsastral-sh/ruff50k1 repos~2.2kAutomated safety check: PassMIT
Minimizing Ty Ecosystem Changesastral-sh/ruff50k—~4.6kAutomated safety check: PassMIT
Babysit PR To Pass CIsgl-project/sglang37k2 repos~3kAutomated safety check: PassApache-2.0
Rust Best Practicesfarm-fe/farm5.6k3 repos~1.1kAutomated safety check: PassMIT

Similar skills

  • Installs, updates or migrates the vendored anti-slop Oxlint plugin in a repository, keeping local rule changes and the plugin's license and provenance files.

    5.3k GitHub starsUsed in 1 repo~2.2k tokens
    DevelopmentAuto-check passed
  • Official

    A skill your agent uses when a user says "summarise ecosystem results", "summarize this ty ecosystem report", "what changed in this ecosystem run?", or asks to summarise or summarize ty ecosystem…

    50k GitHub starsUsed in 1 repo~2.2k tokens
    DevelopmentAuto-check passed
  • Official

    A skill your agent uses when a user says "minimize this ty ecosystem change", "reproduce this ecosystem result", "investigate a primer difference", "investigate a mypyprimer difference"…

    50k GitHub stars~4.6k tokensUpdated today
    DevelopmentAuto-check passed
  • Babysit PR To Pass CI

    sgl-project/sglang

    Start and persistently pursue a goal to babysit an SGLang pull request until selected GitHub Actions workflows pass on the latest PR head.

    37k GitHub starsUsed in 2 repos~3k tokens
    DevelopmentAuto-check passed
  • Guide for writing idiomatic Rust code based on Apollo GraphQL's best practices handbook.

    5.6k GitHub starsUsed in 3 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Go Pedantry

    chromedp/chromedp

    This skill should be used when the user is writing Go code and needs guidance on Go-specific pedantry: error wrapping with fmt.Errorf and %w, interface design (accept interfaces return structs)…

    13k GitHub stars~3.7k tokensUpdated 2 days ago
    DevelopmentAuto-check passed

More from dimetron/pi-go

All 21 skills in this repo
  • Vhs E2E Gif

    dimetron/pi-go

    Record a test run, a TUI session, or any terminal command as a GIF with VHS and attach it to a GitHub PR as a release-hosted asset, never a repo commit.

    207 GitHub stars~1.7k tokensUpdated 7 days ago
    Auto-check passed
  • Agents Md

    dimetron/pi-go

    Generate AGENTS.md files for Go, Rust, TypeScript, and Java projects.

    207 GitHub stars~1.7k tokensUpdated 7 days ago
    Auto-check passed
  • Bubbletea Testing

    dimetron/pi-go

    A skill your agent uses whenever writing tests for Bubble Tea (charmbracelet/bubbletea) TUI applications in Go.

    207 GitHub stars~3.6k tokensUpdated 7 days ago
    Auto-check passed
  • Memory Index

    dimetron/pi-go

    Index a folder's contents into the MemPalace semantic memory for search and retrieval.

    207 GitHub stars~1.5k tokensUpdated 7 days ago
    Auto-check passed
  • Nightly Session Watch

    dimetron/pi-go

    Nightly sweep of the last 24h of pi-go sessions — anomalous runs, loop aborts, tool error rates, token waste, real prompt-token spend, and whether the observation and palace pipelines are still…

    207 GitHub stars~1.5k tokensUpdated 7 days ago
    Auto-check passed
  • Osx Tuning

    dimetron/pi-go

    Tune macOS resource limits and sysctls for best performance with Go development, Docker/OrbStack, and Linux VMs.

    207 GitHub stars~1.6k tokensUpdated 7 days ago
    Auto-check: notes

Categories

Questions about Check Linters Before Commit

What does Check Linters Before Commit do?

Before any commit, run linters, vet, tests, and build verification; do not commit until checks pass. Check Linters Before Commit is an agent skill from dimetron/pi-go.

When should I use Check Linters Before Commit?

Check Linters Before Commit fits situations like: tasks that involve Linting and formatting.

How do I install Check Linters Before Commit in Claude Code?

Run `npx skills add dimetron/pi-go --skill check-linters-before-commit -a claude-code`. Or copy the skill folder (.pi-go/skills/check-linters-before-commit in dimetron/pi-go) into .claude/skills/check-linters-before-commit in your project. Claude Code loads it when a task matches its description.

How do I install Check Linters Before Commit in Codex?

Run `npx skills add dimetron/pi-go --skill check-linters-before-commit -a codex`. Or copy the skill folder (.pi-go/skills/check-linters-before-commit in dimetron/pi-go) into .agents/skills/check-linters-before-commit in your project. Codex loads it when a task matches its description.

Can I use Check Linters Before Commit in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add dimetron/pi-go --skill check-linters-before-commit -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/check-linters-before-commit, .gemini/skills/check-linters-before-commit, .github/skills/check-linters-before-commit and .opencode/skills/check-linters-before-commit in your project.

What does Check Linters Before Commit need to run?

Going by SKILL.md and its folder, Check Linters Before Commit needs the command-line tools its instructions call (go and git).

Does Check Linters Before Commit access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Check Linters Before Commit safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Check Linters Before Commit use?

Check Linters Before Commit is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Check Linters Before Commit use?

About 768 tokens (SKILL.md is roughly 3.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Check Linters Before Commit?

Skills that share tags, products or a category with Check Linters Before Commit: Install Anti-Slop Oxlint Rules (dmmulroy/anti-slop, 5.3k stars), Summarise Ecosystem Results (astral-sh/ruff, 50k stars), Minimizing Ty Ecosystem Changes (astral-sh/ruff, 50k stars) and Babysit PR To Pass CI (sgl-project/sglang, 37k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Check Linters Before Commit?

dimetron (a GitHub user) maintains it in dimetron/pi-go, which has 207 GitHub stars. The repository holds 21 skills in this directory. The repository was last updated on October 1, 2026.

Source: dimetron/pi-go on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.