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/sifxprime/kodelyth-ecc/python-reviewgit clone --depth 1 https://github.com/sifxprime/kodelyth-eccWrote 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/commands/sifxprime/kodelyth-ecc/python-review)<a href="https://agentmods.dev/commands/sifxprime/kodelyth-ecc/python-review"><img src="https://agentmods.dev/badge/commands/sifxprime/kodelyth-ecc/python-review.svg" alt="Measured on agentmods" 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 | $0.00031 | $0.01675 |
| 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
92% identical to python-review — 17 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
WARNING: 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: FAIL: 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 c5308cdc9a57
python-review is a command published in the GitHub repository sifxprime/kodelyth-ecc (11 stars, last pushed 2d ago), licensed MIT. It adds 31 tokens to every session and 1,675 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 92% identical to python-review, differing in 17 lines, and is treated as a copy.
Other commands, from other repositories
toh-help
Display all Toh Framework commands and quick usage guide.
research
Delegate a thorough research investigation to the agy:runner subagent.
kimi-setup
Run node "$HOME/.kimi-plugin/kimi-companion.mjs" setup, then report installation and authentication status.
Obad
Search for given words or phrases in the book of Obadiah in one or multiple bibles.
strategy-cfo
商业战略与财商融合决策专家 — 商业模式 / 资本结构 / 投资决策 / 资源配置 / 估值视角.
learn
Analyze the current session and extract any patterns worth saving as skills.