Writing Python

🌐Community
by julianobarbosa · vlatest · Repository

Helps with writing, Python as part of developing backend services and APIs workflows.

Install on your platform

We auto-selected Claude Code based on this skill’s supported platforms.

1

Run in terminal (recommended)

terminal
claude mcp add writing-python npx -- -y @trustedskills/writing-python
2

Or manually add to ~/.claude/settings.json

~/.claude/settings.json
{
  "mcpServers": {
    "writing-python": {
      "command": "npx",
      "args": [
        "-y",
        "@trustedskills/writing-python"
      ]
    }
  }
}

Requires Claude Code (claude CLI). Run claude --version to verify your install.

About This Skill

What it does

This skill assists AI agents with writing Python code, specifically focusing on backend service and API development workflows. It emphasizes core principles like prioritizing the standard library, using type hints extensively, favoring explicit code over implicit behavior, and raising errors early for faster debugging. The skill leverages a specific toolchain including uv for package management, ruff for linting and formatting, pytest for testing, and mypy for type checking.

When to use it

  • When developing backend APIs or services that require Python code generation.
  • For tasks involving the creation of data classes with default values.
  • To implement event handling logic using pattern matching.
  • When needing assistance with utilizing new features introduced in Python 3.14, such as deferred annotations and template strings.

Key capabilities

  • Type Hinting: Generates code incorporating type hints for functions and parameters.
  • Data Class Generation: Creates data classes with specified fields and default values.
  • Pattern Matching Implementation: Produces code utilizing pattern matching constructs for event handling or other logic.
  • Python 3.14 Feature Utilization: Demonstrates the use of new features like deferred annotations, template strings, and concurrent interpreters.
  • Toolchain Integration: Guides usage of uv, ruff, pytest, and mypy for package management, linting/formatting, testing, and type checking respectively.

Example prompts

  • "Write a Python function to process a list of users with an optional limit."
  • "Create a data class called 'Config' with fields for host (string), port (integer defaulting to 8080), and tags (list of strings)."
  • "Generate code to handle click and key events using pattern matching."

Tips & gotchas

  • This skill is designed for Python development focused on backend services, not general-purpose coding.
  • It strongly encourages adherence to the specified principles (stdlib first, type hints everywhere) which might influence generated code style.
  • Familiarity with the uv, ruff, pytest, and mypy tools will enhance your ability to utilize the skill effectively.

Tags

🛡️

TrustedSkills Verification

Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.

Security Audits

Gen Agent Trust HubPass
SocketPass
SnykPass

Details

Version
vlatest
License
Author
julianobarbosa
Installs
34

🌐 Community

Passed automated security scans.