lathe CLAUDE.md

A repository instruction file for Lathe, a tool that turns API descriptions into command-line programs for humans and AI agents. API descriptions are formal documents that define available operations, inputs, authentication, and outputs.

In plain words
What is it for?
It is for developing Lathe's API-to-CLI generation, repository setup, authentication checks, command discovery, and agent guidance.
Why use it?
It tells the agent which files and specifications are authoritative and explains how generated commands should expose discoverable, machine-readable details.

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/lathe-cli/lathe/claude-md
Clone the repo
git clone --depth 1 https://github.com/lathe-cli/lathe
Per session 1,909 This file is loaded in full into every session.
When invoked 1,909 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.01909 $0.01909
Opus 5 $0.00955 $0.00955
Sonnet 5 $0.00382 $0.00382
Haiku 4.5 $0.00191 $0.00191

Measured 2d ago against content hash 97818165b065, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

lathe 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 2d 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 · 99 lines

How it starts

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

CLAUDE.md

Project intent

Lathe generates agent-friendly Cobra CLIs from Swagger 2.0, OpenAPI 3, google.api.http protobuf APIs, and policy-curated GraphQL schemas. Declared API specs and project configuration are the source of truth. Pinned Git sources are reproducible; local_path sources intentionally follow the referenced working tree.

Product positioning

Lathe is a spec-to-agent-toolchain generator. It turns declared API specs, from pinned Git sources or explicit local working trees, plus repo-local configuration into one inspectable Cobra CLI that both humans and AI agents can run safely.

The core product promise is: agents should not guess command names, flags, auth state, request body shape, HTTP path, or output format. Generated CLIs must expose machine-readable contracts (search, commands --json, commands show, commands schema) and generated Skill guidance so agents can discover, inspect, verify auth, and then execute.

Lathe also owns lathe init for CLI-first application repositories and lathe skill install for its bundled Agent Skill. These distribution surfaces must serve the spec-to-agent workflow; Lathe is not a generic scaffolder, CLI framework, plugin loader, GUI/TUI, API gateway, or hand-written SDK replacement. Product work should strengthen spec fidelity, reproducibility, generated command correctness, runtime catalog inspectability, auth/body/output behavior, application initialization, and generated Skill quality. Challenge features that move product weight into manually authored commands, runtime plugins, or unrelated scaffolding.

Source of truth

  • Follow this file for repository structure, commands, style, tests, commits, PR rules, and release workflow entry points.
  • Follow CONTRIBUTING.md for contributor workflow and public contribution scope.
  • Trust code and current Makefile targets over stale documentation when they disagree.
  • In this repository, do not commit generated output under internal/generated/, upstream clones under .cache/, example build artifacts, or ad-hoc generated skills/<cli-name>/ directories. Downstream repositories created by lathe init have their own generated-output policy.

Read the full file on GitHub · 99 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. 2d ago First seen · 99 lines · 1,909 tokens per session scan A 97818165b065

Subscribe to this mod's changes

lathe CLAUDE.md is an instructions file published in the GitHub repository lathe-cli/lathe (46 stars, last pushed 2d ago), licensed Apache-2.0. It adds 1,909 tokens to every session, about $0.0095 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.