structpages: Instructions file for Claude Code

CLAUDE.md

structpages CLAUDE.md is an instructions file for Claude Code from jackielii/structpages. It costs 2,285 tokens per session, scanned A, original, BSD-3-Clause.

Repository instructions for Structpages, a Go web-framework library that defines routes with Go structs and supports the Templ tool for generating web templates. They document the project, development commands, examples, and testing practices.

In plain words
What is it for?
Use them when changing Structpages routes, templates, examples, or framework code, or when installing dependencies, generating Templ files, and running focused or complete tests.
Why use it?
They give a coding assistant the project context and the commands needed to build generated files and run the Go test suite correctly.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: reads .claude/ paths; mentions .claude-plugin; mentions CLAUDE.md.

This is jackielii/structpages's own configuration. It tells Claude Code how to work on structpages itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything structpages configures →

Reuse

Borrowing it

Nothing to install: this file belongs to jackielii/structpages. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/jackielii/structpages/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/jackielii/structpages

Made for: Claude Code.

Wrote 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.

agentmods badge for structpages CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/jackielii/structpages/claude-md/github.svg)](https://agentmods.dev/instructions/jackielii/structpages/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/jackielii/structpages/claude-md"><img src="https://agentmods.dev/badge/instructions/jackielii/structpages/claude-md/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.

agentmods 80×15 button for structpages CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/jackielii/structpages/claude-md"><img src="https://agentmods.dev/badge/instructions/jackielii/structpages/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,285 This file is loaded in full into every session.
When invoked 2,285 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.02285 $0.02285
Opus 5.5 $0.00914 $0.00914
Sonnet 5.5 $0.00457 $0.00457
Haiku 4.5 $0.00229 $0.00229

Measured 7d ago against content hash ee862c710712, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

structpages CLAUDE.md 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 7d 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.

CLAUDE.md · 122 lines

How it starts

The opening of the file, as written. The whole thing — 122 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project Overview

Structpages is a Go web framework library that provides struct-based routing. It integrates with Go's standard http.ServeMux and provides a declarative way to define routes using struct tags. The framework is designed to reduce boilerplate code when building web pages and components. It renders any value with Render(context.Context, io.Writer) error; the examples use gsx, and templ and html/template also work.

Status: Beta (API settled; battle-tested in production by medium-to-large applications)

Development Commands

Testing

# Run all tests
go test ./...

# Run tests with coverage
go test -cover ./...

# Run a specific test
go test -run TestName ./...

# Run tests with verbose output
go test -v ./...

Working with Examples

# Navigate to an example directory
cd examples/simple  # or examples/htmx, examples/todo, examples/blog, ...

# Generated .x.go files are committed, so this runs as is (typically on :8080)
go run .

# After editing .gsx sources: regenerate and format. Each example pins the gsx
# CLI as a `tool` dependency; the repo-root gsx.toml registers the
# structpages url/id/target filters for every example.
go tool gsx generate .
go tool gsx fmt -w .

Required Tools

  • Go 1.26 or later for the examples (the library itself needs Go 1.24)

Architecture Overview

Core Components

  1. Router System: Built on top of http.ServeMux, the router parses struct tags to create routes

    • struct_pages.go: Mount, StructPages, options, and request dispatch
    • parse.go: Parses struct tags like route:"/path Title", builds the page tree, handles DI matching
    • page_node.go: PageNode struct and tree traversal (All, FullRoute)
  2. Struct-Based Routing Pattern: Routes are defined as struct fields with route tags

    type pages struct {
        product `route:"/product Product"`
        team    `route:"POST /team Team"`
    }
    

    Each leaf page handles requests via one of: a Page() component method (most common), a Props method (Props-only pages), or a ServeHTTP method (form actions, redirects). Promoted (embedded) methods are skipped.

Read the full file on GitHub · 122 lines

Changes

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.

  1. 7d ago Changed · +1 lines · +117 tokens per session ee862c710712
  2. 21d ago Changed · +6 lines · +634 tokens per session 49adf150a9d1
  3. 28d ago Changed · -5 lines · +62 tokens per session 929b47e49f9e
  4. 2mo ago First seen · 120 lines · 1,472 tokens per session scan A f7bd2a0bccd4

Subscribe to this mod's changes

structpages CLAUDE.md is an instructions file published in the GitHub repository jackielii/structpages (24 stars, last pushed yesterday), licensed BSD-3-Clause. It adds 2,285 tokens to every session, about $0.0091 per session on Opus 5.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.

Related

structpages CLAUDE.md compared with instructions from other repositories

structpages CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
structpages CLAUDE.mdjackielii/structpagesInstructions file24yesterdayBSD-3-ClauseA2,285Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode