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.
git clone --depth 1 https://github.com/kaptinlin/gozodWrote 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.
[](https://agentmods.dev/rules/kaptinlin/gozod/project-structure)<a href="https://agentmods.dev/rules/kaptinlin/gozod/project-structure"><img src="https://agentmods.dev/badge/rules/kaptinlin/gozod/project-structure/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.
<a href="https://agentmods.dev/rules/kaptinlin/gozod/project-structure"><img src="https://agentmods.dev/badge/rules/kaptinlin/gozod/project-structure.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.02688 |
| Opus 5.5 | $0.00000 | $0.01075 |
| Sonnet 5.5 | $0.00000 | $0.00538 |
| Haiku 4.5 | $0.00000 | $0.00269 |
Grade A, and why
project-structure 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 3mo 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 — 257 lines — stays where its author put it; the contents beside it link to each section on GitHub.
GoZod Project Structure & File Organization Guide
1. Design Goals & Philosophy
GoZod follows a type-safe, layered architecture that mirrors the API surface of Zod v4 while embracing Go idioms:
- Input-Output Symmetry – every schema returns the same type it accepts after validation/coercion.
- Unified Wrapper Pattern – optional / nilable / default / prefault wrappers share the same internal contract.
- Strict Separation of Concerns – parsing, checking, issue creation, error formatting and i18n each live in their own packages.
- Composable Validation Pipeline – checks are first-class citizens that can be merged, cloned and reused.
- Compatibility First – public API names and ergonomics track Zod whenever practical.
2. Layered Architecture
go module gozod
├── bin/ # Build outputs and tools
├── coerce/ # Root-level coercion utilities
├── core/ # Foundation contracts (no concrete logic)
├── docs/ # Documentation and guides
├── examples/ # Example implementations and usage
├── internal/ # Private runtime (engine, checks, issues, utils)
├── jsonschema/ # JSON Schema conversion (to/from)
├── locales/ # Built-in i18n bundles
├── pkg/ # Re-usable, reflection-free helpers (zero deps)
└── types/ # Public schema implementations (String, Array, …)
2.1 One-Way Dependency Rule
graph TD;
core --> internal;
core --> pkg;
pkg --> internal;
internal --> types;
core --> types;
internal --> locales;
types --> locales;
coerce --> types;
coerce --> internal;
types never import each other; all cross-type logic lives in internal, pkg, or coerce.
3. Directory Reference
3.1 Root Level Files
| File | Purpose |
|---|---|
gozod.go |
Main entry point re-exporting all types, constructors, and JSON Schema conversion from subpackages |
gozod_test.go |
Integration tests for the main API |
gozod_tags_test.go |
Tests for struct tag validation |
gozod_circular_test.go |
Tests for circular reference handling |
metadata_test.go |
Tests for metadata/registry functionality |
CLAUDE.md |
Project instructions for Claude Code AI assistant |
Makefile |
Build automation and common tasks |
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.
- 3mo ago First seen · 257 lines · 0 tokens per session scan A 939617de472b
project-structure is a cursor rule published in the GitHub repository kaptinlin/gozod (25 stars, last pushed 4mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,688 tokens. 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.
project-structure compared with cursor rules from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| project-structurekaptinlin/gozod | Cursor rule | 25 | 4mo ago | MIT | A | 0 | Cursor |
| gonavi-goSyngnat/GoNavi | Cursor rule | 2.1k | yesterday | Apache-2.0 | A | 0 | Cursor |
| backend0xJacky/nginx-ui | Cursor rule | 12k | today | AGPL-3.0 | A | 441 | Cursor |
| code-stylecoddy-project/coddy-agent | Cursor rule | 215 | today | MIT | A | 366 | Cursor |
| gosupertokens/create-supertokens-app | Cursor rule | 24 | 6d ago | Apache-2.0 | A | 0 | Cursor |
| go-stdlib-firsttacoda/keystone | Cursor rule | 44 | 4d ago | MIT | A | 0 | Cursor |
| gozapstore/zsp | Cursor rule | 20 | 5d ago | MIT | A | 0 | Cursor |