uspto-cli CLAUDE.md

uspto-cli CLAUDE.md is an instructions file for coding agents 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

Install

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.

agentmods
npx agentmods add instructions/smcronin/uspto-cli/claude-md
Clone the repo
git clone --depth 1 https://github.com/smcronin/uspto-cli

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.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.svg" alt="Measured on agentmods" 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. Scan, not verified.
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 $0.00831 $0.00831
Opus 5 $0.00415 $0.00415
Sonnet 5 $0.00166 $0.00166
Haiku 4.5 $0.00083 $0.00083

Measured 4d ago against content hash 1d55992458ab, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 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.

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. 4d 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 (39 stars, last pushed 28d ago), licensed MIT. It adds 831 tokens to every session, about $0.0042 per session on Opus 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.