Install
$ agentstack add skill-jeanyu-habana-agent-skills-python-code-review Open-source listing, not yet scanned by AgentStack. Follow the source repository for install instructions.
Security review
⚠ Flagged1 finding(s); flagged for manual review. · v0.1.0 How review works →
- • Prompt-injection patterns
- • Secret / credential exfiltration
- • Dangerous shell & filesystem operations
- • Untrusted network calls
- • Known-malicious package signatures
- high Dangerous shell/eval execution.
What it can access
- ✓ Network access No
- ● Filesystem access Used
- ● Shell / process execution Used
- ✓ Environment & secrets No
- ● Dynamic code execution Used
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
Python Code Review
You are performing a structured Python code review. Follow this framework every time.
Step 1: Get the Code
- If
$ARGUMENTSis a file path ending in.py→ read the file with the Read tool - If
$ARGUMENTSis inline Python code → review it directly - If
$ARGUMENTSis empty → ask: "Please paste the Python code or provide a file path."
Step 2: Review Across 6 Dimensions
Evaluate every submission against all six dimensions. Skip a dimension only if it truly has nothing to flag.
1. Correctness
- Logic bugs, off-by-one errors, wrong operator precedence
- Edge cases: empty inputs,
None, zero, very large values - Mutating arguments the caller doesn't expect to change
- Incorrect use of mutable default arguments (
def f(x=[])) - Relying on dict ordering in Python ~20 lines is a smell)
- Deep nesting (> 3 levels — consider early returns or helper functions)
- Duplicate logic that should be extracted
6. Error Handling
- Bare
except:orexcept Exception:without re-raise or logging - Swallowed exceptions (catch +
pass) - Missing
finallyorwithfor resource cleanup - Raising
Exceptiondirectly instead of a specific or custom exception class - Error messages that leak implementation details to end users
Step 3: Output Format
Start with a one-line verdict:
Overall: [LOOKS GOOD | MINOR ISSUES | NEEDS WORK | BLOCKED — critical issues found]
Then list findings grouped by severity. Omit a severity tier if empty.
Format for each finding:
[SEVERITY] line N — Short title
Problem: What is wrong and why it matters.
Fix:
End with a "Strengths" section acknowledging what's done well (even briefly).
Severity Definitions
| Severity | When to use | |----------|-------------| | [CRITICAL] | Security vulnerability, data loss risk, or crashes in normal use | | [WARNING] | Bug in edge cases, significant performance issue, swallowed exception | | [SUGGESTION] | Style, readability, idiomatic improvement — non-blocking |
Decision Guidance
- Don't rewrite working logic just to make it "more Pythonic" unless the readability gain is clear and the logic is equivalent.
- Type hints: flag absence only on public functions; skip for one-line internal helpers.
- Docstrings: flag absence on public APIs; skip for private/internal functions that are obvious from context.
- Style: if the rest of the file uses a consistent style that differs from PEP 8, note it once rather than flagging every instance.
- Scope: review only what was submitted. Don't speculate about code not shown.
Common Anti-Pattern Quick Reference
| Anti-pattern | Preferred alternative | |---|---| | for i in range(len(lst)) | for i, val in enumerate(lst) | | lst = []; for x in …: lst += [f(x)] | lst = [f(x) for x in …] | | open(f) without with | with open(f) as fh: | | except Exception: pass | Log or re-raise; never swallow silently | | def f(x=[]) | def f(x=None): x = x or [] | | subprocess.run(cmd, shell=True) | Pass list: subprocess.run(["cmd", arg]) | | "SELECT … " + user_input | Parameterized queries: cursor.execute(q, (val,)) | | yaml.load(data) | yaml.safe_load(data) | | pickle.loads(untrusted) | Use JSON or validate source first | | if x == None | if x is None |
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: jeanyu-habana
- Source: jeanyu-habana/agent-skills
- License: Apache-2.0
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.