battle-tested-patterns: Skill for Claude Code

.claude/skills/verify-source/SKILL.md

verify-source is a skill for Claude Code from Totoro-jam/battle-tested-patterns. It costs 31 tokens per session (890 once invoked), scanned A, original, MIT.

A verification workflow for checking source links in pattern documents, especially links to production code on GitHub. GitHub is a service for hosting and reviewing code.

In plain words
What is it for?
Use it to run link checks, validate HTTP status and line ranges, identify weak source references, and convert branch links into fixed commit links.
Why use it?
It catches broken links, missing line references, temporary branch links, and links whose cited code does not match the document.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is Totoro-jam/battle-tested-patterns's own configuration. It tells Claude Code how to work on battle-tested-patterns 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 battle-tested-patterns configures →

Reuse

Borrowing it

Nothing to install: this file belongs to Totoro-jam/battle-tested-patterns. 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/Totoro-jam/battle-tested-patterns/main/.claude/skills/verify-source/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/Totoro-jam/battle-tested-patterns

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 verify-source

README.md
[![agentmods](https://agentmods.dev/badge/skills/totoro-jam/battle-tested-patterns/verify-source/github.svg)](https://agentmods.dev/skills/totoro-jam/battle-tested-patterns/verify-source)
Your own site
<a href="https://agentmods.dev/skills/totoro-jam/battle-tested-patterns/verify-source"><img src="https://agentmods.dev/badge/skills/totoro-jam/battle-tested-patterns/verify-source/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 verify-source

Your own site · 80×15
<a href="https://agentmods.dev/skills/totoro-jam/battle-tested-patterns/verify-source"><img src="https://agentmods.dev/badge/skills/totoro-jam/battle-tested-patterns/verify-source.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 31 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 890 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00031 $0.00890
Opus 5.5 $0.00012 $0.00356
Sonnet 5.5 $0.00006 $0.00178
Haiku 4.5 $0.00003 $0.00089

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

Security

Grade A, and why

verify-source 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 1mo 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/skills/verify-source/SKILL.md · 96 lines

How it starts

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

You are verifying production proof links in this repository. This is the most critical quality check — every pattern's credibility depends on accurate, live source links.

Steps

1. Run automated link check

pnpm verify-links

This scans all docs/**/*.md and root README.md/README.zh-CN.md files, extracts GitHub URLs, and checks:

  • HTTP status (with automatic retry on 5xx)
  • Whether Production Proof links include line numbers (#L18-L22)
  • Whether links use SHA permalinks vs branch names
  • Whether any #L1 file-level links exist in Production Proof

Output categories:

  • ✅ [proof] — valid Production Proof link with line numbers
  • ✅ [other] — valid non-Production-Proof link
  • ⚠️ [proof] — Production Proof link missing line numbers
  • ℹ️ — branch-based link (not SHA permalink)
  • ❌ — broken link (HTTP error)

For CI mode (exit 1 on broken links): pnpm verify-links -- --ci

2. Convert branch links to SHA permalinks

If the report shows branch-based links, convert them:

tsx scripts/convert-to-sha-links.ts --dry-run    # preview changes
tsx scripts/convert-to-sha-links.ts               # execute conversion

Authentication: prefers gh auth token (system keyring), falls back to GITHUB_TOKEN env var.

3. Verify line-range content

For links that pass HTTP checks, verify that the referenced code lines actually match the pattern:

pnpm verify-lines                    # Check all Production Proof links
pnpm verify-lines --pattern <name>   # Check a single pattern
pnpm verify-lines --verbose          # Show all results including passes
pnpm verify-lines --section all      # Also check "More Production Uses" section
pnpm verify-lines --no-cache         # Re-fetch everything (ignore cache)

This script performs two layers of verification:

  • L1: Range validity — checks that line numbers are within file bounds
  • L2: Keyword presence — checks that pattern-related keywords appear in the referenced code

Read the full file on GitHub · 96 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. 1mo ago First seen · 96 lines · 31 tokens per session scan A e85a511582ee

Subscribe to this mod's changes

verify-source is a skill published in the GitHub repository Totoro-jam/battle-tested-patterns (343 stars, last pushed 1mo ago), licensed MIT. It adds 31 tokens to every session and 890 once invoked, about $0.0001 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

Other skills, from other repositories

golang

Idiomatic Golang design patterns — functional options, constructors, error flow and cascading, resource management and lifecycle, graceful shutdown, resilience, architecture, dependency injection, data handling, streaming, and more. Apply when explicitly choosing between architectural patterns, implementing functional…

FilippoDeSilva/skills · 80 tokens

Effective Memory

The essential habits for an AI agent with memory — session bookends, learning triggers, verification, safety, and the operational discipline that turns raw recall into compounding intelligence. Keyword-matched after installation.

plur-ai/plur · 43 tokens

go-idioms

Go idioms and patterns: stdlib conventions, explicit error wrapping (%w), small interfaces, goroutines/channels concurrency, table-driven tests, and gofumpt formatting. Use when writing, refactoring, or reviewing Go services and packages.

irahardianto/awesome-agv · 54 tokens

evm-rpc

Query EVM JSON-RPC methods for transaction debugging and endpoint triage, including ethgetTransactionReceipt and debugtraceTransaction. Use when the user asks to inspect tx status, retrieve receipts, run tracers, compare EVM vs Cosmos outcomes, or choose between EVM RPC and Comet RPC endpoints.

Unique-Divine/jiyuu · 66 tokens

gh-pr-review

Review GitHub pull requests for correctness, design quality, test coverage, security, performance, and backward compatibility. Use when reviewing PRs, when asked to review code changes, or when the user mentions "review PR", "code review", or "check this PR".

Unique-Divine/jiyuu · 58 tokens

tailscale-serve

Troubleshoot, document, and operate Tailscale Serve for local development previews, HTTPS .ts.net URLs, MagicDNS, admin-console HTTPS certificate setup, WSL or localhost proxy targets, phone testing over a tailnet, and curl/OpenSSL diagnosis of Serve TLS failures. Use when a user says Tailscale Serve, tailscale serve…

Unique-Divine/jiyuu · 124 tokens