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 instructions/halfmoon-labs/halfmoon/claude-mdgit clone --depth 1 https://github.com/halfmoon-labs/halfmoonWrote 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/instructions/halfmoon-labs/halfmoon/claude-md)<a href="https://agentmods.dev/instructions/halfmoon-labs/halfmoon/claude-md"><img src="https://agentmods.dev/badge/instructions/halfmoon-labs/halfmoon/claude-md.svg" alt="Measured on agentmods" 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 | $0.01715 | $0.01715 |
| Opus 5 | $0.00857 | $0.00857 |
| Sonnet 5 | $0.00343 | $0.00343 |
| Haiku 4.5 | $0.00171 | $0.00171 |
Grade C, and why
halfmoon CLAUDE.md scanned grade C with 2 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 4d 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.
Downloads and executes remote codehighSupply chain
curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.
If `make lint` fails with `"Can't read config"`, your local golangci-lint is v1.x — update to v2: `curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s -- -b /usr/local/bin v2.10.1` Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
If `make lint` fails with `"Can't read config"`, your local golangci-lint is v1.x — update to v2: `curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s -- -b /usr/local/bin v2.10.1` How it starts
The opening of the file, as written. The whole thing — 154 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLAUDE.md — Halfmoon
Ultra-lightweight personal AI assistant in Go. Runs on $10 hardware, <10MB RAM. Pure Go (CGO_ENABLED=0).
Commands
# Build
make build # Build halfmoon binary
make build-launcher # Build web launcher (TUI)
# Test
make test # Run Go tests (excludes web/) + web tests
go test ./pkg/agent/... # Test single package
go test -run TestName ./pkg/ # Run specific test
# Lint & Format (requires golangci-lint v2 — config uses version: "2")
make lint # golangci-lint run (all linters)
make fmt # golangci-lint fmt (auto-format: gci, gofmt, gofumpt, golines)
make fix # Auto-fix lint issues
make vet # go vet
# Full check before PR
make check # deps + fmt + vet + test
Validation Before Committing
Run these in order before considering work complete:
- Build:
go build ./...— must compile with zero errors - Test:
go test ./pkg/... -count=1— all tests must pass - Lint:
make lint— zero issues. CI runs golangci-lint v2.10.1 with gci (import ordering), golines (max 120 chars), and spancheck (span leak detection) among others. Fix issues withmake fmtfirst, then address remaining lint errors manually. - Vet:
make vet— zero issues
If make lint fails with "Can't read config", your local golangci-lint is v1.x — update to v2: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s -- -b /usr/local/bin v2.10.1
Architecture
cmd/halfmoon/ → CLI entry (Cobra). 10 subcommands.
pkg/agent/ → Core agent loop. THE most important package.
loop.go → Main reasoning loop (runTurn, turnLoop at line 1690)
instance.go → AgentInstance struct — model, tools, sessions, config
context.go → System prompt builder (AGENT.md + SOUL.md + skills + memory)
hooks.go → BeforeLLM/AfterLLM/BeforeTool/AfterTool interceptors
eventbus.go → 19 event types, multi-subscriber broadcaster
subturn.go → Sub-agent spawning (async/sync)
turn.go → Turn state management, parent-child hierarchy
pkg/providers/ → LLM provider adapters. Factory pattern + fallback chains.
pkg/channels/ → Chat platforms. 15+ channels, all funnel through BaseChannel.
base.go → HandleMessage() — shared entry for all channels
manager.go → Message routing, outbound delivery
pkg/tools/ → Tool registry. Interface: Name/Description/Parameters/Execute.
base.go → Tool interface + ToolResult (ForLLM, ForUser, IsError)
registry.go → Map-based lookup, clone support for sub-agents
http_request.go → HTTP request tool. Domain allowlist, auth profiles, SSRF protection.
pkg/bus/ → Message bus. Decouples channels from agent.
pkg/config/ → Config loading. JSON config + .security.yml + env vars + file:// refs
pkg/cron/ → In-process cron scheduler. Single goroutine + timer.
pkg/heartbeat/ → Periodic agent nudge from HEARTBEAT.md
pkg/routing/ → 7-level priority cascade for agent selection
web/backend/ → Go web server (REST API + WebSocket)
web/frontend/ → React 19 + Vite + TypeScript + Jotai + TanStack Router
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.
- 4d ago First seen · 154 lines · 1,715 tokens per session scan C 1f1ffc7f9b1e
halfmoon CLAUDE.md is an instructions file published in the GitHub repository halfmoon-labs/halfmoon (11 stars, last pushed 4mo ago), licensed MIT. It adds 1,715 tokens to every session, about $0.0086 per session on Opus 5. A static security scan graded it C with 2 findings (downloads and executes remote code, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other instructions, from other repositories
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
spec-kit AGENTS.md
AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).
next.js AGENTS.md
Instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.