uspto-cli: Instructions file for Claude Code

CLAUDE.md

uspto-cli CLAUDE.md is an instructions file for Claude Code from smcronin/uspto-cli. It costs 831 tokens per session, scanned A, original, MIT.

Project instructions for a Go command-line program that connects to the USPTO Open Data Portal, the United States Patent and Trademark Office’s public API. They describe commands for searching, downloading and examining patent applications, grants, proceedings and related records.

In plain words
What is it for?
Use them when building, debugging or extending USPTO searches, patent-family trees, grant-text extraction, bulk downloads, PTAB records, petition decisions and formatted output.
Why use it?
They give an agent the project’s architecture, command conventions and data-handling details needed to modify the CLI safely.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md.

This is smcronin/uspto-cli's own configuration. It tells Claude Code how to work on uspto-cli 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 uspto-cli configures →

Reuse

Borrowing it

Nothing to install: this file belongs to smcronin/uspto-cli. 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/smcronin/uspto-cli/master/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/smcronin/uspto-cli

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 uspto-cli CLAUDE.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/smcronin/uspto-cli/claude-md"><img src="https://agentmods.dev/badge/instructions/smcronin/uspto-cli/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 831 This file is loaded in full into every session.
When invoked 831 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.00831 $0.00831
Opus 5.5 $0.00332 $0.00332
Sonnet 5.5 $0.00166 $0.00166
Haiku 4.5 $0.00083 $0.00083

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

Security

Grade A, and why

uspto-cli 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 2mo 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 · 71 lines

How it starts

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

USPTO CLI - Project Guide

What This Is

Agent-ready CLI for the USPTO Open Data Portal (ODP) API at api.uspto.gov. Built in Go with Cobra.

Architecture

main.go                    - Entry point
cmd/
  root.go                  - Cobra root command, global flags, error handling
  output.go                - JSON envelope, NDJSON, CSV, table formatters, facets display
  search.go                - Patent search with 30+ flags, GET/POST auto-detection, --download
  app.go                   - Application data (18 subcommands including grant XML extraction)
  grant.go                 - Grant XML parsing: claims, citations, abstract, description, fulltext
  ptab.go                  - PTAB proceedings, decisions, docs, appeals, interferences (14 subcommands)
  petition.go              - Petition decision search/get
  bulk.go                  - Bulk data search/get/files/download
  status.go                - Status code lookup
  summary.go               - Compound 5-API-call application summary
  family.go                - Recursive patent family tree builder
internal/
  types/types.go           - All API response types, XML structs for grant parsing
  api/client.go            - HTTP client with rate limiter, 50+ endpoint methods
docs/                      - API documentation and analysis
tests/
  integration/             - Integration tests (shell out to binary against live API)

Key Conventions

  • All commands support -f json (envelope: {ok, command, pagination, results, facets, version})
  • Additional formats: -f csv, -f ndjson, -f table (default)
  • API key from USPTO_API_KEY env var or --api-key flag
  • Rate limiter: sequential requests (burst=1), cross-process file lock, 429 auto-retry (3x, 5s backoff)
  • --dry-run shows API request without executing (all commands)
  • --minify for compact JSON, --quiet suppresses stderr progress
  • --download json|csv for server-side bulk export (search and PTAB commands)
  • --facets for aggregated counts alongside search results
  • Typed exit codes: 0=OK, 1=general, 2=usage, 3=auth, 4=not-found, 5=rate-limited, 6=server-error
  • Application numbers are bare digits (e.g., 16123456), validated with validateAppNumber()

Read the full file on GitHub · 71 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. 2mo ago First seen · 71 lines · 831 tokens per session scan A 1d55992458ab

Subscribe to this mod's changes

uspto-cli CLAUDE.md is an instructions file published in the GitHub repository smcronin/uspto-cli (42 stars, last pushed 3mo ago), licensed MIT. It adds 831 tokens to every session, about $0.0033 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

uspto-cli CLAUDE.md compared with instructions from other repositories

uspto-cli CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
uspto-cli CLAUDE.mdsmcronin/uspto-cliInstructions file423mo agoMITA831Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,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