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.

referencesapi-design.md

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

API and Entry-Point Design

Goals

  • Provide reasonable defaults for common use.
  • Hide internal wiring; expose a small, clear entry point.
  • Make resource lifecycles obvious.

Guidance

  • Offer a simple constructor for common cases.
  • Allow limited multi-type parameters without overloading meaning.
  • Keep the default usage to a few lines.

Example

Too much manual wiring forces users to know internal objects:

from awesome_sdk.client import AwesomeClient
from awesome_sdk.core.auth.basic import AwesomeBasicAuth
from awesome_sdk.core.connection.tcp import AwesomeTCPConnection

# Build an auth object
auth = AwesomeBasicAuth(username=os.getenv("USERNAME"), password=os.getenv("PASSWORD"))
# Build a connection
connection = AwesomeTCPConnection(host="127.0.0.1", port=5762, timeout=10, retry_times=3, auth=auth)
# Build a client
client = AwesomeClient(connection=connection, type="test", scope="read")
# Use client
print(client.get_resources())
# Close connection
connection.close()

A simpler entry point and context manager improve usability:

from awesome_sdk import AwesomeClient

client = AwesomeClient(type="test", scope="read", auth=(os.getenv("USERNAME"), os.getenv("PASSWORD")))

with client.connect():
    print(client.get_resources())

Advanced auth can still be supported:

client = AwesomeClient(..., auth=SSHAuth(...))

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