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.
npx agentmods add commands/rohitbind123/claude-setup/python-reviewgit clone --depth 1 https://github.com/RohitBind123/claude-setupWhat 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 | $0.00031 | $0.01676 |
| Opus 5 | $0.00015 | $0.00838 |
| Sonnet 5 | $0.00006 | $0.00335 |
| Haiku 4.5 | $0.00003 | $0.00168 |
Grade A, and why
python-review 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 yesterday.
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.
This is a copy
100% identical to python-review — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 298 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Python Code Review
This command invokes the python-reviewer agent for comprehensive Python-specific code review.
What This Command Does
- Identify Python Changes: Find modified
.pyfiles viagit diff - Run Static Analysis: Execute
ruff,mypy,pylint,black --check - Security Scan: Check for SQL injection, command injection, unsafe deserialization
- Type Safety Review: Analyze type hints and mypy errors
- Pythonic Code Check: Verify code follows PEP 8 and Python best practices
- Generate Report: Categorize issues by severity
When to Use
Use /python-review when:
- After writing or modifying Python code
- Before committing Python changes
- Reviewing pull requests with Python code
- Onboarding to a new Python codebase
- Learning Pythonic patterns and idioms
Review Categories
CRITICAL (Must Fix)
- SQL/Command injection vulnerabilities
- Unsafe eval/exec usage
- Pickle unsafe deserialization
- Hardcoded credentials
- YAML unsafe load
- Bare except clauses hiding errors
HIGH (Should Fix)
- Missing type hints on public functions
- Mutable default arguments
- Swallowing exceptions silently
- Not using context managers for resources
- C-style looping instead of comprehensions
- Using type() instead of isinstance()
- Race conditions without locks
MEDIUM (Consider)
- PEP 8 formatting violations
- Missing docstrings on public functions
- Print statements instead of logging
- Inefficient string operations
- Magic numbers without named constants
- Not using f-strings for formatting
- Unnecessary list creation
Automated Checks Run
# Type checking
mypy .
# Linting and formatting
ruff check .
black --check .
isort --check-only .
# Security scanning
bandit -r .
# Dependency audit
pip-audit
safety check
# Testing
pytest --cov=app --cov-report=term-missing
Example Usage
User: /python-review
Agent:
# Python Code Review Report
## Files Reviewed
- app/routes/user.py (modified)
- app/services/auth.py (modified)
## Static Analysis Results
✓ ruff: No issues
✓ mypy: No errors
⚠️ black: 2 files need reformatting
✓ bandit: No security issues
## Issues Found
[CRITICAL] SQL Injection vulnerability
File: app/routes/user.py:42
Issue: User input directly interpolated into SQL query
```python
query = f"SELECT * FROM users WHERE id = {user_id}" # Bad
Fix: Use parameterized query
query = "SELECT * FROM users WHERE id = %s" # Good
cursor.execute(query, (user_id,))
[HIGH] Mutable default argument File: app/services/auth.py:18 Issue: Mutable default argument causes shared state
def process_items(items=[]): # Bad
items.append("new")
return items
Fix: Use None as default
def process_items(items=None): # Good
if items is None:
items = []
items.append("new")
return items
[MEDIUM] Missing type hints File: app/services/auth.py:25 Issue: Public function without type annotations
def get_user(user_id): # Bad
return db.find(user_id)
Fix: Add type hints
def get_user(user_id: str) -> Optional[User]: # Good
return db.find(user_id)
[MEDIUM] Not using context manager File: app/routes/user.py:55 Issue: File not closed on exception
f = open("config.json") # Bad
data = f.read()
f.close()
Fix: Use context manager
with open("config.json") as f: # Good
data = f.read()
Summary
- CRITICAL: 1
- HIGH: 1
- MEDIUM: 2
Recommendation: ❌ Block merge until CRITICAL issue is fixed
Formatting Required
Run: black app/routes/user.py app/services/auth.py
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.
- yesterday First seen · 298 lines · 31 tokens per session scan A 3f1791ba569f
python-review is a command published in the GitHub repository RohitBind123/claude-setup (2 stars, last pushed 4mo ago), licensed MIT. It adds 31 tokens to every session and 1,676 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to python-review, differing in 0 lines, and is treated as a copy.
Other commands, from other repositories
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.
analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
converge
Assess the current codebase against the feature's spec, plan, and tasks, then append any remaining unbuilt work as new tasks to tasks.md so implement can complete it.
implement
Execute the implementation plan by processing and executing all tasks defined in tasks.md.