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.
npx agentmods add rules/kaptinlin/gozod/checks_implementation_guidegit clone --depth 1 https://github.com/kaptinlin/gozodWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.02843 | $0.02843 |
| Opus 5 | $0.01422 | $0.01422 |
| Sonnet 5 | $0.00569 | $0.00569 |
| Haiku 4.5 | $0.00284 | $0.00284 |
Grade A, and why
checks_implementation_guide 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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 396 lines — stays where its author put it; the contents beside it link to each section on GitHub.
GoZod Checks Implementation Guide
📋 Overview
This document provides implementation guidelines for GoZod validation checks based on the current architecture. All checks follow a unified factory function pattern that directly creates core.ZodCheckInternals instances with optional JSON Schema support.
🎯 Core Design Principles
1. Factory Function Pattern
- All check functions return
core.ZodCheckinterface - Direct creation of
core.ZodCheckInternalsinstances - No wrapper types or unnecessary abstractions
2. JSON Schema Integration
- OnAttach callbacks for metadata generation
- Automatic constraint merging for compatible properties
- Type-appropriate attribute mapping
3. Validation Reuse
- Leverage
pkg/validatepackage for actual validation logic - Avoid duplicating validation implementations
- Focus on error handling and schema generation
🏗️ Current Architecture
Core Types (from core package)
// ZodCheck interface - implemented by ZodCheckInternals
type ZodCheck interface {
GetZod() *ZodCheckInternals
}
// ZodCheckInternals - the main check implementation
type ZodCheckInternals struct {
Def *ZodCheckDef // Check definition
Check func(payload *ParsePayload) // Validation function
OnAttach []func(any) // JSON Schema callbacks
When func(payload *ParsePayload) bool // Conditional execution
}
// ZodCheckDef - check metadata
type ZodCheckDef struct {
Check string // Check type identifier
Params map[string]any // Check parameters
Error *ZodErrorMap // Custom error mapping
}
Helper Functions (from internal/checks/checks.go)
// normalizeParams - standardize string parameters to error maps
func normalizeParams(def *ZodCheckDef, params []string)
// setBagProperty - set JSON Schema property
func setBagProperty(schema any, key string, value any)
// mergeConstraint - merge constraints with conflict resolution
func mergeConstraint(schema any, key string, value any, merge func(old, new any) any)
// mergeMinimumConstraint/mergeMaximumConstraint - boundary constraint merging
func mergeMinimumConstraint(schema any, value any, inclusive bool)
func mergeMaximumConstraint(schema any, value any, inclusive bool)
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.
- 2d ago First seen · 396 lines · 2,843 tokens per session scan A 08231e883283
checks_implementation_guide is a cursor rule published in the GitHub repository kaptinlin/gozod (24 stars, last pushed 1mo ago), licensed MIT. It adds 2,843 tokens to every session, about $0.0142 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.
Other cursor rules, from other repositories
go-backend-scalability-cursorrules-prompt-file
Cursor rules for Go development with backend scalability.
atmos-rules
This is a Golang CLI project using Cobra for command structure and Viper for configuration management. The project maintains high code quality standards through golangci-lint and aims for maximum test coverage. The repository also includes the website source code for https://atmos.tools.
cursor-go-skills
Load the Go skills orchestrator before any Go task.
backend
You are an expert in Go, Gin, Gorm, Gen, Cosy (https://cosy.uozi.org/) with a deep understanding of best practices and performance optimization techniques in these technologies.
grab
Version: v2.0.0 Last Updated: 2025-12-10 Purpose: Developer guidelines for building APIs with GRAB (Go REST API Boilerplate).
15-100-go-mistakes
Curated ROSA adaptation of 100 Go Mistakes for Go changes.