python-guidelines
Guiding principles for writing clear, concise, human readable and maintainable Python code.
Skill by viktor-ferenczi
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/viktor-ferenczi-python-guidelines
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: writing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/python-guidelines
What's inside
- Skill name
python-guidelines- Description
- Guiding principles for writing clear, concise, human readable and maintainable Python code. Use whenever writing, refactoring, or reviewing Python code.
- License
- MIT
- Instructions
- 51 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
Add type hints wherever you can. Think more like static typing, avoid changing the type of the same variable. Define complex (nested) types separately if they are used in more than one place in the code. Omit type hints when the type is obvious from the context (e.g., `x = 1`). Write clean, human-readable code. Avoid spaghetti code; keep it structured. Refactor the code as a separate step before making further changes whenever it would become too nested. Too much nesting means more than 2 levels inside functions and methods. Avoid adding too many parameters to functions and methods. In such cases introduce a data model class to store that information, especially if they are used together more than once. The same applies to return values. Prefer using data model classes to dictionaries, Pydantic is good, but can also use a dataclass if you have to. For converting between naming schemes, always use explicit `from_something` and `to_something` methods instead of hardcoding the external names of fields everywhere in the code. It typically happens while loading/saving data from/to JSON with a different naming convention than the fields of the corresponding Pydantic model class. Do not use catch-all exception handling (`except Exception`), except to cover retryable processing, like request handlers or batch data processing. In all other cases use explicit exception handling wherever required. Disable catch-all error handling in development, especially if a debugger is connected. Never use exception handling for logic, except if there is no other alternative. Do not combine multiple context managers into a single context manager just to save nesting on `with` statements at the top level of the application. It is better to write them out explicitly, even if the nesting level increases. Do not use excessive nested iteration. While it needs less code, it also makes error handling and debugging at a per-item level much harder when exceptions happen anywhere inside the generator functions. Do not introduce abstractions prematurely. Do not add abstract base classes, unless there are multiple subclasses or there will be multiple soon according to the current plans. Do not write comments unless they are absolutely necessary to explain *why* the code is written the way it is. Do not add a description of the method or function arguments if they are obvious from their names or types. Prefer writing single-line docstrings that explain what the function or method does. Define any duration in seconds (floating point), unless instructed otherwise. Prefer test-driven development whenever it is practical. Use only absolute imports, because relative imports will fail when you run a file directly, as Python loses the context of the project's package structure. Follow these guidelines from the Zen of Python: - Explicit is better than implicit. Simple is better than complex. Complex is better than complicated. - Flat is better than nested. Sparse is better than dense, readability counts. - Special cases aren't special enough to break the rules, although practicality beats purity. - Errors should never pass silently, unless explicitly silenced. - If the implementation is hard to explain, it's a bad idea. - In the face of ambiguity, refuse the temptation to guess.
From viktor-ferenczi/skills, MIT.
More from viktor-ferenczi/skills
- 0.582score
pr-description-concise-markdown
viktor-ferenczi
Writes a concise, high-level PR description in Markdown for the changes in the current branch.
SkillAFreshness: A★ 1Claude Code +9 - 0.539score
pr-review-comment-fix
viktor-ferenczi
Fixes an issue pointed out by a comment in a PR review.
SkillBFreshness: B★ 1Claude Code +9 - 0.502score
bizzfactory-document-downloader
viktor-ferenczi
Download all of a client's documents from the Bizz Factory portal (portal.bizzfactory.se) into a local folder tree that mirrors the page, without converting…
SkillCFreshness: C★ 1Claude Code +9 - 0.499score
recursive-language-model
viktor-ferenczi
Recursive Language Model workflow for processing documents that exceed context window limits.
SkillCFreshness: C★ 1Claude Code +9 - 0.498score
sdl3-wiki
viktor-ferenczi
Complete offline copy of the SDL3 (Simple DirectMedia Layer 3) wiki in CommonMark format.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
gcp-batch-inference
viktor-ferenczi
Run Gemini batch inference on Google Cloud Vertex AI.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
consistency-check
viktor-ferenczi
Finds and fixes internal inconsistencies in a software project — code vs configuration vs documentation drift, plus linter findings.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
structured-documentation
viktor-ferenczi
Generate a verified, modular handbook from a large source-code or document tree, then keep it cheap to refresh as the inputs change.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
stabilization-loop
viktor-ferenczi
Iterates on a locally runnable project (typically a server with a test suite) until it builds, runs, and passes all tests cleanly, fixing failures between runs.
SkillCFreshness: C★ 1Claude Code +9 - 0.493score
godot-documentation
viktor-ferenczi
Installs and serves an offline copy of the official Godot Engine documentation (getting started guides, tutorials, API class reference, engine details).
SkillCFreshness: C★ 1Claude Code +9 - 0.492score
swdev-best-practices
viktor-ferenczi
Best practices to follow and principles to adhere to during software development.
SkillCFreshness: C★ 1Claude Code +9 - 0.492score
token-saving-techniques
viktor-ferenczi
A list of techniques for reducing token usage while working on complex tasks.
SkillCFreshness: C★ 1Claude Code +9
Signals
- Stars
- 1
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Jul 4, 2026 (3 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/viktor-ferenczi/skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from viktor-ferenczi
- 0.582score
pr-description-concise-markdown
viktor-ferenczi
Writes a concise, high-level PR description in Markdown for the changes in the current branch.
SkillAFreshness: A★ 1Claude Code +9 - 0.539score
pr-review-comment-fix
viktor-ferenczi
Fixes an issue pointed out by a comment in a PR review.
SkillBFreshness: B★ 1Claude Code +9 - 0.502score
bizzfactory-document-downloader
viktor-ferenczi
Download all of a client's documents from the Bizz Factory portal (portal.bizzfactory.se) into a local folder tree that mirrors the page, without converting…
SkillCFreshness: C★ 1Claude Code +9 - 0.499score
recursive-language-model
viktor-ferenczi
Recursive Language Model workflow for processing documents that exceed context window limits.
SkillCFreshness: C★ 1Claude Code +9 - 0.498score
sdl3-wiki
viktor-ferenczi
Complete offline copy of the SDL3 (Simple DirectMedia Layer 3) wiki in CommonMark format.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
consistency-check
viktor-ferenczi
Finds and fixes internal inconsistencies in a software project — code vs configuration vs documentation drift, plus linter findings.
SkillCFreshness: C★ 1Claude Code +9
Cite this page
python-guidelines skill. Agent Mart. https://agentmart.dev/skills/viktor-ferenczi-python-guidelines (last updated 2026-10-24)