review-uv-script

review-uv-script is a command for Claude Code from basher83/lunar-claude. It costs 13 tokens per session (2,046 once invoked), scanned A, original, MIT.

A review command for checking a Python script run by uv, a Python tool that can manage a script’s dependencies and environment. It checks the script’s PEP 723 metadata, which is the dependency information written inside the file.

In plain words
What is it for?
Use it to review a uv Python script for required metadata, dependency declarations, invalid fields, and other specified best-practice violations.
Why use it?
A script can fail or behave inconsistently when its embedded dependency metadata is missing or incorrectly formatted. The review reports only issues judged highly likely to be real problems.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the python-tools plugin — 3 skills, 3 commands shipped together

Good fit Use it to review a uv Python script for required metadata, dependency declarations, invalid fields, and other specified best-practice violations.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/basher83/lunar-claude/review-uv-script
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.

Clone the repo
git clone --depth 1 https://github.com/basher83/lunar-claude

Made for: Claude Code.

Or install python-tools, the plugin that ships this one along with the rest of its 3 skills, 3 commands.

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 review-uv-script

README.md
[![agentmods](https://agentmods.dev/badge/commands/basher83/lunar-claude/review-uv-script.svg)](https://agentmods.dev/commands/basher83/lunar-claude/review-uv-script)
Your own site
<a href="https://agentmods.dev/commands/basher83/lunar-claude/review-uv-script"><img src="https://agentmods.dev/badge/commands/basher83/lunar-claude/review-uv-script.svg" alt="Measured on agentmods" height="20"></a>
Per session 13 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,046 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00013 $0.02046
Opus 5 $0.00006 $0.01023
Sonnet 5 $0.00003 $0.00409
Haiku 4.5 $0.00001 $0.00205

Measured 8d ago against content hash 1569cced9bca, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

review-uv-script scanned grade A with 1 finding 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 8d 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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

- Flag `subprocess.run(..., shell=True)` with user input
plugins/devops/python-tools/commands/review-uv-script.md · 295 lines

How it starts

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

UV Python Script Review

Review the uv Python script at $ARGUMENTS against best practices.

Script to Review

@$ARGUMENTS

Confidence Scoring

Rate each potential issue from 0-100:

Score Meaning
0-25 Likely false positive or stylistic preference
26-50 Minor nitpick, not explicitly in best practices
51-75 Valid but low-impact issue
76-90 Important issue requiring attention
91-100 Critical bug or explicit best practice violation

Only report issues with confidence ≥ 80. Quality over quantity.

Review Categories

1. PEP 723 Metadata Block (Critical)

Required elements:

  • Has # /// script opening marker (exactly /// script, not /// scripts or //)
  • Has # /// closing marker
  • requires-python is specified (e.g., >=3.11)
  • dependencies array is present (even if empty)
  • Each TOML line starts with #

Forbidden patterns:

  • [tool.uv.metadata] - Invalid field, causes runtime error
  • Custom top-level fields (author, version, description) - Only requires-python and dependencies allowed
  • Missing # prefix on TOML lines

Valid [tool.uv] usage (without .metadata):

# /// script
# requires-python = ">=3.11"
# dependencies = []
# [tool.uv]
# exclude-newer = "2025-01-01T00:00:00Z"  # Valid
# ///

2. Shebang Line (Important)

  • Has proper shebang: #!/usr/bin/env -S uv run --script
  • Consider --quiet flag for production scripts
  • Shebang must be first line (before metadata block)

3. Dependency Management (Important)

Version pinning:

  • Use >=X.Y.Z for utilities (allows updates)
  • Use ==X.Y.Z only for deployment scripts requiring reproducibility
  • No bare package names ("httpx""httpx>=0.27.0")

Heavy dependencies flag:

  • Flag tensorflow, torch, transformers - Too heavy for single-file scripts
  • Suggest using proper uv project instead

4. Documentation (Medium)

  • Module docstring present after metadata block
  • Docstring includes: purpose, usage, examples
  • Metadata (team, author, version) in docstring, NOT in TOML

Read the full file on GitHub · 295 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. 8d ago First seen · 295 lines · 13 tokens per session scan A 1569cced9bca

Subscribe to this mod's changes

review-uv-script is a command published in the GitHub repository basher83/lunar-claude (22 stars, last pushed today), licensed MIT. It adds 13 tokens to every session and 2,046 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.