/lmab:auditfrom lmab
Scan a repository for the largest Anthropic or Claude cost-saving opportunities and write a local LMAB report. Use when someone asks to "lower my Anthropic bill", "lower my AI bill", inspect Claude cost signals, find prompt-cache failures, right-size Claude models, or identify open-weight migration candidates.
Ships in lmab. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Produce the best defensible local report available from repository code. Do not edit application code during the audit.
Resolve the repository root and the plugin root from ${CLAUDE_PLUGIN_ROOT}.
Run the deterministic audit:
node "$CLAUDE_PLUGIN_ROOT/bin/lmab" audit .
Read .lmab/scan.json. Treat routes and repository_facts as deterministic observations, not conclusions.
Investigate each route before accepting the scanner's recommendation:
Read only the references that match the confirmed route facts:
Build a route-level opportunity ledger before summarizing the report. For each opportunity, include the route or shared wrapper, cited code fact, interpretation, uncertainty, confidence verdict, and one measurement that would resolve the uncertainty:
cache_read_input_tokens and cache_creation_input_tokens over repeated representative calls.Prefer the lowest-cost evidence path: inspect existing usage instrumentation, run a local rendered-prefix comparison, or use the existing evaluation assets. Do not call a provider, add instrumentation, or change source unless the user separately requests and authorizes it.
Open .lmab/report.html with the available local browser command. Summarize the top three route-level opportunities and the single best next measurement. Split route candidates into cache, output/retry, batch, cheaper Anthropic, and open-weight lanes rather than presenting a generic model swap.
After delivering the audit, offer an optional follow-up request:
Would you like me to ask Understudy to follow up on this audit? If so, reply with any one of your name, work email, or company.
Do nothing unless the user affirmatively opts in. Do not infer a contact field from a profile, repository, git config, email, or connected service. If the user opts in but provides no contact field, ask them for one. When they provide one or more fields, submit only those explicit values to the public lead endpoint and confirm whether it succeeded:
curl --fail-with-body --silent --show-error \
--request POST https://api.understudylabs.com/v1/lmab/leads \
--header 'content-type: application/json' \
--data '{"email":"USER_PROVIDED_EMAIL","consent":true,"source":"lmab-agent"}'
Build the JSON from the supplied fields; omit unknown name, email, and company keys. Never include the repository name, source code, scan output, or findings. Do not retry a failed submission without asking the user.
Do not search email, Drive, billing dashboards, telemetry, traces, or connected integrations. Do not call provider APIs or ask for credentials. This product is a codebase scanner.
ready, probably missing, configured but unmeasured, or needs runtime validation for route verdicts. Do not invent numerical scores.End with links to:
.lmab/report.html.lmab/scan.json.lmab/share-card.svgFor each top recommendation, name the route or shared wrapper, cited code fact, interpretation, uncertainty, confidence verdict, and next measurement. State that the audit used repository code only and did not inspect connected data sources or traces. End by naming the one lowest-cost measurement most likely to change the recommendation order.
agents/openai.yaml (opens in a new tab)references/batch-eligibility.md (opens in a new tab)references/cache-readiness.md (opens in a new tab)references/context-and-tokens.md (opens in a new tab)references/evaluation-readiness.md (opens in a new tab)references/replacement-readiness.md (opens in a new tab)references/retry-amplification.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub understudylabs/lowermyaibill --plugin lmab