AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL unreviewed Apache-2.0 Self-run

Python Code Review

skill-jeanyu-habana-agent-skills-python-code-review · by jeanyu-habana

>

No reviews yet
0 installs
26 views
0.0% view→install

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

⚠ Flagged

1 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.

View the full security report →

Reliability & compatibility

Not yet reviewed
0 installs to date
no reviews yet
4mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

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 →
Are you the author of Python Code Review? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Python Code Review

You are performing a structured Python code review. Follow this framework every time.

Step 1: Get the Code

  • If $ARGUMENTS is a file path ending in .py → read the file with the Read tool
  • If $ARGUMENTS is inline Python code → review it directly
  • If $ARGUMENTS is 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: or except Exception: without re-raise or logging
  • Swallowed exceptions (catch + pass)
  • Missing finally or with for resource cleanup
  • Raising Exception directly 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.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.