deephaven-mcp: Skill for Claude Code

.agents/skills/review-python-file/SKILL.md

review-python-file is a skill for Claude Code, Codex from deephaven/deephaven-mcp. It costs 57 tokens per session (1,374 once invoked), scanned A, original, Apache-2.0.

A checklist for reviewing one Python file in depth, covering its design, correctness, security, types, documentation, imports, logging, and tests.

In plain words
What is it for?
Use it when reviewing a single Python file; use a multi-file change review process instead for a broader set of changes.
Why use it?
It helps find defects and maintainability problems that a quick code check may miss.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents); mentions AGENTS.md.

This is deephaven/deephaven-mcp's own configuration. It tells Claude Code and Codex how to work on deephaven-mcp 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 deephaven-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to deephaven/deephaven-mcp. 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/deephaven/deephaven-mcp/main/.agents/skills/review-python-file/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/deephaven/deephaven-mcp

Made for: Claude Code, Codex.

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-python-file

README.md
[![agentmods](https://agentmods.dev/badge/skills/deephaven/deephaven-mcp/review-python-file/github.svg)](https://agentmods.dev/skills/deephaven/deephaven-mcp/review-python-file)
Your own site
<a href="https://agentmods.dev/skills/deephaven/deephaven-mcp/review-python-file"><img src="https://agentmods.dev/badge/skills/deephaven/deephaven-mcp/review-python-file/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 review-python-file

Your own site · 80×15
<a href="https://agentmods.dev/skills/deephaven/deephaven-mcp/review-python-file"><img src="https://agentmods.dev/badge/skills/deephaven/deephaven-mcp/review-python-file.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,374 The whole file, excluding the scripts and references it only reads on demand.
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.00057 $0.01374
Opus 5.5 $0.00023 $0.00550
Sonnet 5.5 $0.00011 $0.00275
Haiku 4.5 $0.00006 $0.00137

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

Security

Grade A, and why

review-python-file 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 1mo 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.

.agents/skills/review-python-file/SKILL.md · 34 lines

How it starts

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

Review like a senior engineer. Every finding must answer three questions in concrete terms: what is wrong, what is better, why the change is worth its cost. All topics are fair game — correctness, security, design, duplication, clarity, naming, structure, tests. Be conscious of suggestions that do not serve a purpose.

Perform a comprehensive review of the specified Python file as it currently exists.

  1. Design: Is the code well-structured and consistent with the project? Apply the ref-python-coding-practices and ref-mcp-module-organization skills as relevant.
  2. Correctness: Does the code do what it claims? Look for logic errors, incorrect assumptions, and edge cases.
  3. Simplification and DRY: Can the code be simplified? Flag duplicated logic that should be shared, unnecessary abstraction, and over-engineering.
  4. Code smells: Flag anything that makes a senior engineer pause and ask "why is it like that?" — long functions, deep nesting, magic numbers, complex conditions, oddly-shaped APIs (boolean-mode flags, stringly-typed parameters where a Literal or Enum belongs, long parameter lists), strange call syntax, dead or commented-out code, mixed abstraction levels within one function, mutable default arguments, broad except clauses, side effects in property getters or __init__, argument mutation, speculative generality, primitive obsession, feature envy, re-implementations of stdlib or library functionality, misleading names, inconsistent return types, sentinel returns where an exception belongs — or anything else that just looks off. This list is illustrative, not exhaustive; trust your judgment. Apply the general style rules in ref-python-coding-practices.
  5. Security: Check for credential mishandling, session isolation issues, injection risks, and information disclosure — or anything else security-relevant. This list is illustrative, not exhaustive; trust your judgment. Flag any default or fallback ids — fully qualified ids arrive as explicit tool parameters and are validated by QualifiedSessionId.from_str, which raises rather than substituting a default.
  6. Type safety: Flag any Any type hints, hasattr, or getattr usage without justification (per ref-python-coding-practices).
  7. Closed-set dispatch exhaustiveness: For every dispatch on a Literal, Enum, or tuple of accepted values, verify a match + typing.assert_never(value) exhaustive form is used (or per-member metadata via __new__ for enums). Flag any silent if/elif/elif fall-through default branch on a closed set. See ref-python-coding-practices rule #18.
  8. Suppression audit: Search the file for # pragma: no cover, # type: ignore, # noqa, # mypy: ignore-errors. For each occurrence, determine whether a design move would eliminate the need (factor a helper, narrow with cast, rewrite the API). Flag any suppression without an inline justification comment. Bare # type: ignore (no bracketed error code) is always a bug. See ref-python-coding-practices rule #19.
  9. Docstrings: Apply the pydocs-improve skill to all functions and classes in the file. For any Pydantic schemas (StrictSchema / RedactableSchema subclasses), verify every field carries a PEP 257 trailing docstring — the project enforces this with tests/test_field_docs_contract.py; flag any reliance on Attributes: blocks as a documentation bug.
    • CLI help surface. For files under cli/_commands/ or cli/_help.py, the surfaced strings — command help= (via build_help), every click.option(help=...), and group docstrings used as help — are governed by ref-cli-help-standards, not pydocs. Apply cli-help-improve to that surface: verify the section contract, single-sourced OutputSpec, and plain-text (no-RST) rule. Internal docstrings on the same file still go through pydocs-improve.
  10. Imports: Flag any unused imports. (run-precommit removes them via ruff; the reviewer flags them for awareness, does not edit.)
  11. Logging: Apply the ref-logging-standards skill to review logging coverage and consistency.
  12. Test coverage: Verify the file is covered by its corresponding test file at the project's 100% per-source-file target (see AGENTS.md and tests-improve). Flag any uncovered branch.
    • __init__.py files count. Every __init__.py — including ones that only define __all__ (even an empty __all__) or re-export from a sibling module — has its own dedicated test_init.py. The package surface is part of the project's API contract; an untested __init__.py is a silent-refactor hazard.
    • What the test_init.py must pin:
      • The exact set of names in __all__.
      • That every name in __all__ resolves on the package (hasattr(pkg, name)).
      • That each re-export is the same object as the internal definition (pkg.X is _module.X).
      • That no _-prefixed names leak into the public surface.
    • Canonical implementations: tests/config/schema/test_init.py, tests/config/test_init.py, tests/auth/middleware/test_init.py.
  13. Output serialization: For any user-facing payload built in this file (MCP tool return dict or CLI OutputSpec field), apply ref-output-serialization-conventions to every string field — value vocabulary, casing, and known carve-outs.
  14. Spelling: apply ref-python-coding-practices rule 8 to the whole file (identifiers and string literals included, not just docstrings); run uv run codespell <file> and flag what it reports.

Read the full file on GitHub · 34 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. 1mo ago First seen · 34 lines · 57 tokens per session scan A d1035137e6ca

Subscribe to this mod's changes

review-python-file is a skill published in the GitHub repository deephaven/deephaven-mcp (5 stars, last pushed 2d ago), licensed Apache-2.0. It adds 57 tokens to every session and 1,374 once invoked, about $0.0002 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-31.