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.
curl -O https://raw.githubusercontent.com/deephaven/deephaven-mcp/main/.agents/skills/review-python-file/SKILL.mdgit clone --depth 1 https://github.com/deephaven/deephaven-mcpWrote 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.
[](https://agentmods.dev/skills/deephaven/deephaven-mcp/review-python-file)<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.
<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>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.
| Model | Per session | Once 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 |
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.
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.
- Design: Is the code well-structured and consistent with the project? Apply the
ref-python-coding-practicesandref-mcp-module-organizationskills as relevant. - Correctness: Does the code do what it claims? Look for logic errors, incorrect assumptions, and edge cases.
- Simplification and DRY: Can the code be simplified? Flag duplicated logic that should be shared, unnecessary abstraction, and over-engineering.
- 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
LiteralorEnumbelongs, long parameter lists), strange call syntax, dead or commented-out code, mixed abstraction levels within one function, mutable default arguments, broadexceptclauses, 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 inref-python-coding-practices. - 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. - Type safety: Flag any
Anytype hints,hasattr, orgetattrusage without justification (perref-python-coding-practices). - Closed-set dispatch exhaustiveness: For every dispatch on a
Literal,Enum, or tuple of accepted values, verify amatch+typing.assert_never(value)exhaustive form is used (or per-member metadata via__new__for enums). Flag any silentif/elif/eliffall-through default branch on a closed set. Seeref-python-coding-practicesrule #18. - 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 withcast, rewrite the API). Flag any suppression without an inline justification comment. Bare# type: ignore(no bracketed error code) is always a bug. Seeref-python-coding-practicesrule #19. - Docstrings: Apply the
pydocs-improveskill to all functions and classes in the file. For any Pydantic schemas (StrictSchema/RedactableSchemasubclasses), verify every field carries a PEP 257 trailing docstring — the project enforces this withtests/test_field_docs_contract.py; flag any reliance onAttributes:blocks as a documentation bug.- CLI help surface. For files under
cli/_commands/orcli/_help.py, the surfaced strings — commandhelp=(viabuild_help), everyclick.option(help=...), and group docstrings used as help — are governed byref-cli-help-standards, not pydocs. Applycli-help-improveto that surface: verify the section contract, single-sourcedOutputSpec, and plain-text (no-RST) rule. Internal docstrings on the same file still go throughpydocs-improve.
- CLI help surface. For files under
- Imports: Flag any unused imports. (
run-precommitremoves them via ruff; the reviewer flags them for awareness, does not edit.) - Logging: Apply the
ref-logging-standardsskill to review logging coverage and consistency. - Test coverage: Verify the file is covered by its corresponding test file at the project's 100% per-source-file target (see
AGENTS.mdandtests-improve). Flag any uncovered branch.__init__.pyfiles count. Every__init__.py— including ones that only define__all__(even an empty__all__) or re-export from a sibling module — has its own dedicatedtest_init.py. The package surface is part of the project's API contract; an untested__init__.pyis a silent-refactor hazard.- What the
test_init.pymust 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.
- The exact set of names in
- Canonical implementations:
tests/config/schema/test_init.py,tests/config/test_init.py,tests/auth/middleware/test_init.py.
- Output serialization: For any user-facing payload built in this file (MCP tool return dict or CLI
OutputSpecfield), applyref-output-serialization-conventionsto every string field — value vocabulary, casing, and known carve-outs. - Spelling: apply
ref-python-coding-practicesrule 8 to the whole file (identifiers and string literals included, not just docstrings); runuv run codespell <file>and flag what it reports.
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.
- 1mo ago First seen · 34 lines · 57 tokens per session scan A d1035137e6ca
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.
Other skills, from other repositories
mcore-linting-and-formatting
Linting and formatting for Megatron-LM. Covers running autoformat.sh, tools (ruff, black, isort, pylint, mypy), and code style rules.
splitting-oversized-modules
Split an oversized Python module (a thousand-plus-line logic.py, models.py, api.py, or its test file) into a package of one module per concern, mechanically and provably without changing behavior. Use on a request to split / break up / decompose a god module or move functions out of one, once a human has agreed to…
python-review-checklist
Deterministic Python review checklist shipped with the CAO skills-lifecycle example.
splitting-oversized-modules
Split an oversized Python module (a thousand-plus-line logic.py, models.py, api.py, or its test file) into a package of one module per concern, mechanically and provably without changing behavior. Use on a request to split / break up / decompose a god module or move functions out of one, once a human has agreed to…
plankton-code-quality
Write-time code quality enforcement using Plankton — auto-formatting, linting, and Claude-powered fixes on every file edit via hooks.
coding.make_function_private
Identify private or public functions in a file and rename with underscore.