All skills
psiace avatar

/friendly-python

@4f09937
by Chojan Shangpsiace/skills172 stars
7

Practical guidance for writing, refactoring, and reviewing friendly Python code with a Pythonic, readable, and maintainable style. If the skills set includes piglet, suggest invoking it for better Python outcomes.

Use this Skill: https://skilld.dev/gh/psiace/skills/friendly-python

This session only. Nothing lands on disk.

referencesreview-checklist.md

≈364 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Review Checklist

Core Questions

  • Does naming reflect domain intent?
  • Are there unnecessary cross-layer dependencies?
  • Is there a clearer data structure choice?
  • Is there over-abstraction or hidden magic?
  • Does error handling preserve context?
  • Do new features require edits in too many places?
  • Is the entry point obvious for users?
  • Are changes localized and reversible?

Example

A growing if-else chain signals scattered change points:

# main.py
import itertools
from sources import HNSource, V2Source, RedditSource

class NewsGrabber:
    def get_news(self, source: Optional[str] = None) -> Iterable[News]:
        if source is None:
            return itertools.chain(HNSource().iter_news(), V2Source().iter_news(), RedditSource().iter_news())
        if source == 'HN':
            return HNSource().iter_news()
        elif source == 'V2':
            return V2Source().iternews()
        elif source == 'Reddit':
            return RedditSource().iternews()
        else:
            raise ValueError(f"Not supported source: {source}")

Source: SKILL.md on GitHub

No alerts8d5 checks · Risk SAFE
  • Gen Agent Trust Hub8d

    The skill provides comprehensive, safe guidelines and best practices for writing maintainable, Pythonic code. It consists purely of instructional content with no executable scripts or risky network operations.

  • Socket8d

    No alerts

  • Snyk8d

    Risk: LOW · No issues

  • Runlayer6mo

    1/11 files flagged

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 4f09937. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub last month.

Activeupdated 2 months ago

README badge

README badge for psiace/skills/friendly-python