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/project-structuregit 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.00000 | $0.02688 |
| Opus 5 | $0.00000 | $0.01344 |
| Sonnet 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 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 — 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.
- 2d 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 (24 stars, last pushed 1mo 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.
Other cursor rules, from other repositories
internationalization
Cursor rule "internationalization" from dtyq/magic, covering internationalization (i18n) rules, 国际化基本规范, 1. 文件结构, 2. 命名空间规范 and 3. 组件中使用国际化.
test-plan
Plan Katalon True Platform/TestOps testing for a release, sprint, or feature. Use when you need to translate quality goals into scope, prioritize testing by requirement coverage and risk, decide what to test first, or build the executable plan structure (folders, suites, and sprint/release association) that stands in…
wings
Authoring apps with the WINGS framework (Go compiled to WASM web components).
cmd-moodle-mustache-lint
Lint Mustache templates for accessibility, security, hard-coded strings, and Moodle template conventions. (invoke by typing: @moodle-mustache-lint).
project-status
PriceGrab shipped state and product backlog (read first).
architecture
Architectural and cross-package changes — dependency direction, editor/runtime boundaries, scene schema, persistence, renderer packages. Use when changing package boundaries, serialized formats, or multiple layers. Do not apply to localized UI, styling, or test-only edits.