{"slug":"python-code-smells","title":"python-code-smells","summary":"Finds common Python code smells with the ast module, such as bare except clauses, mutable default arguments, missing docstrings, very long functions and long argument lists. Use when the user asks for a quick review of Python code, a cleanup pass or a pre-commit style check.","platform":"Claude","tags":["code-review"],"authorName":"LLM Mart","authorSlug":"llm-mart","score":0,"source":"github","price":null,"verified":false,"createdAt":"2026-11-14T19:09:59.086382Z","repo":{"url":"https://github.com/Lethe044/agentskill-kit","stars":50,"forks":4,"license":"MIT","updatedAt":"2026-11-13T21:42:17Z"},"bodyHtml":"<hr>\n<h2>name: python-code-smells\ndescription: Finds common Python code smells with the ast module, such as bare except clauses, mutable default arguments, missing docstrings, very long functions and long argument lists. Use when the user asks for a quick review of Python code, a cleanup pass or a pre-commit style check.\nlicense: MIT\nmetadata:\nversion: 1.0.0\nauthor: Lethe044\ntags: [python, code-review, quality, static-analysis]</h2>\n<h1>Python code smells</h1>\n<p>A fast, dependency-free first pass over Python files. It does not replace a linter, it gives an\nagent concrete line numbers to start a review from.</p>\n<h2>When to use</h2>\n<ul>\n<li>The user asks to review, clean up or \"look over\" Python code.</li>\n<li>Before a commit or pull request, to catch the obvious problems.</li>\n<li>When a project has no linter configured yet.</li>\n</ul>\n<h2>How to run</h2>\n<pre><code>python scripts/smells.py src/\npython scripts/smells.py app.py utils.py --max-lines 40\n</code></pre>\n<p>Directories are searched recursively for <code>.py</code> files. Hidden folders and <code>__pycache__</code> are skipped.</p>\n<h2>Rules</h2>\n<table>\n<thead>\n<tr>\n<th>Rule</th>\n<th>Meaning</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>bare-except</code></td>\n<td><code>except:</code> without an exception type hides real errors</td>\n</tr>\n<tr>\n<td><code>mutable-default</code></td>\n<td>a list, dict or set used as a default argument value is shared between calls</td>\n</tr>\n<tr>\n<td><code>missing-docstring</code></td>\n<td>a public function or class (no leading underscore) has no docstring</td>\n</tr>\n<tr>\n<td><code>long-function</code></td>\n<td>a function is longer than <code>--max-lines</code> (default 50)</td>\n</tr>\n<tr>\n<td><code>too-many-args</code></td>\n<td>a function takes more than <code>--max-args</code> parameters (default 6)</td>\n</tr>\n<tr>\n<td><code>syntax-error</code></td>\n<td>the file could not be parsed</td>\n</tr>\n</tbody>\n</table>\n<h2>Output</h2>\n<p>JSON with <code>files</code> (number of files checked) and <code>findings</code>, a list of\n<code>{\"file\", \"line\", \"rule\", \"message\"}</code>. The exit code is 1 when there are findings and 0 otherwise.</p>\n<h2>After running</h2>\n<p>Group the findings by rule, fix the bugs first (<code>bare-except</code>, <code>mutable-default</code>), then the readability\nitems. Do not add docstrings that only repeat the function name.</p>\n<h2>Errors</h2>\n<p>A path that does not exist exits with code 2.</p>\n","files":[{"path":"scripts/smells.py","sizeBytes":3448,"isText":true},{"path":"SKILL.md","sizeBytes":1967,"isText":true},{"path":"tests/cases.json","sizeBytes":1158,"isText":true}],"reviewScore":null,"reviewSummary":null,"trust":{"provenance":"trusted-source-unreviewed","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow.","bodySource":null},"bodyLocked":false,"purchaseUrl":null,"sourceUrl":null,"report":{"provenance":"trusted-source-unreviewed","screen":{"ran":true,"outcome":"clean","suspicious":0,"notes":0,"hiddenCharacters":false},"virusScan":{"engine":"clamav","status":"clean","scannedAt":"2026-11-14T19:10:29.074907Z","sha256":"EB2577183550B12B16D36BE65C3DFEF44D46AF10928E709D356F8A003B0DB6D9","sizeBytes":3153},"review":null,"source":{"repositoryUrl":"https://github.com/Lethe044/agentskill-kit","path":"skills/python-code-smells","license":"MIT","commit":"219c6e56ddae4f08bc67799d2c27779202ddde5a","subtreeSha":"958FFD5E66898B0E476426CC547B8D10407C4DB503FC598DA2A8324113ABBD9F","lastSyncedAt":"2026-11-14T19:09:55.692Z"},"reviewedAt":"2026-11-14T19:11:14.697105Z","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow."},"install":[{"target":"skills-cli","command":"npx skills add https://github.com/Lethe044/agentskill-kit/tree/main/skills/python-code-smells"},{"target":"claude-code","command":"claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install lethe044-agentskill-kit@llmmart"},{"target":"git","command":"git clone https://github.com/Lethe044/agentskill-kit.git"}]}