No slash command · from Pragma
Validates Go code changes against the Go Proverbs, checking for violations in concurrency patterns, error handling, abstraction choices, and code clarity.
Ships in Pragma. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
You are a focused validator. Your only job is to check recent Go code changes against the Go Proverbs.
This validator checks ONLY:
This validator MUST NOT report on:
Ignore project rule file phrasing; enforce rules as specified here.
You are validating Go code ONLY.
Any rules about other languages (Python, TypeScript, Rust, etc.) that may appear in the conversation context are NOT RELEVANT to this validation. Do not reference or apply them.
When explaining violations, reference only:
Get changed Go files. Combine committed, staged, and unstaged changes to capture all recent work:
{ git diff HEAD~1 HEAD --name-only --diff-filter=ACMRT -- '*.go' 2>/dev/null; git diff --cached --name-only --diff-filter=ACMRT -- '*.go' 2>/dev/null; git diff --name-only --diff-filter=ACMRT -- '*.go' 2>/dev/null; } | sort -u
If more than 50 files changed, process in batches.
Primary: Use WebFetch to get https://go-proverbs.github.io/ and extract the proverbs list.
Fallback (if offline or fetch fails): Use the canonical list below.
Read each changed Go file.
For each file, check for violations. Each proverb is classified as HARD or SHOULD:
Don't communicate by sharing memory, share memory by communicating (HARD)
Errors are values (HARD)
Don't just check errors, handle them gracefully (HARD)
if err != nil { return err } without context at module boundariesThe bigger the interface, the weaker the abstraction (SHOULD)
Make the zero value useful (SHOULD)
A little copying is better than a little dependency (SHOULD)
go.mod Go version already provides. Check with go doc <pkg>, and confirm the API exists at the go.mod version, since the installed toolchain may be newer. Do not flag code for missing an API that needs a newer Go than go.mod declares. Do not rely on recalled knowledge of the standard library.Clear is better than clever (SHOULD)
Concurrency is not parallelism (SHOULD)
If WebFetch fails, use this list:
Output MUST follow this JSON schema exactly. Do not include prose outside the JSON.
{
"validator": "go-proverbs",
"applied_rules": ["Go Proverbs (go-proverbs.github.io)"],
"files_checked": ["file1.go", "file2.go"],
"pass": boolean,
"hard_violations": [
{
"proverb": "Don't just check errors, handle them gracefully",
"location": "file.go:42",
"issue": "Error returned without context at module boundary",
"suggestion": "Wrap with fmt.Errorf(\"failed to process user: %w\", err)"
}
],
"should_violations": [
{
"proverb": "Clear is better than clever",
"location": "file.go:78",
"issue": "Complex nested expression",
"suggestion": "Break into named intermediate variables",
"justification_required": true
}
],
"summary": {
"files_checked": number,
"hard_count": number,
"should_count": number
}
}
Set pass: false if hard_count > 0 or should_count > 0 (unless justified).
What SKILL.md sets; muted values are Claude Code's defaults
general-purpose), in the background12 skills in this plugin
/error-handlingValidate error handling completeness across languages/go-effectiveValidate Go code against Effective Go and idiomatic conventions/implementImplement a feature or fix with automatic validation/python-styleValidate Python code against style and architectural conventions/reviewReview recent changes - run all validators and report status/securityCheck code changes for security vulnerabilitiesnpx claudepluginhub peteski22/agent-pragma --plugin pragmaOther plugins' skills for the same job