MCPInstall

coding-python

Python 3.12+: stdlib, async/await, dataclasses, type hints, venv/uv. FastAPI pandas numpy pydantic

Installs
63
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/alphaonedev/openclaw-graph --skill coding-python
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads coding-python automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

Purpose

This skill equips the AI to generate, debug, and optimize Python 3.12+ code using core features and libraries, focusing on practical implementations for data handling, async operations, and web services.

When to Use

Use this skill for tasks involving data analysis (e.g., with pandas/numpy), building RESTful APIs (e.g., FastAPI), asynchronous processing (e.g., async/await), data validation (e.g., pydantic), or environment management (e.g., venv/uv). Apply it when code requires type hints for maintainability or dataclasses for simple structs, especially in projects needing fast iteration.

Key Capabilities

  • Python 3.12 Features: Use async/await for non-blocking I/O; define dataclasses with @dataclass decorator; enforce type hints via from typing import List (e.g., def func(x: int) -> str:).
  • Standard Library: Leverage asyncio for event loops (e.g., asyncio.run(main())); use venv for isolated environments (e.g., python -m venv myenv).
  • uv Tool: Alternative to venv; install with pip install uv, then create env via uv venv myenv and activate with source myenv/bin/activate.
  • Libraries: FastAPI for async web apps (e.g., define routes with @app.get("/")); pandas for data frames (e.g., df = pd.DataFrame(data)); numpy for arrays (e.g., np.array([1, 2, 3])); pydantic for models (e.g., from pydantic import BaseModel; class Item(BaseModel): name: str).

Usage Patterns

To accomplish tasks, structure code as follows: Import necessary modules first (e.g., import asyncio, fastapi); use async functions for I/O-bound operations (e.g., async def fetch_data(): await asyncio.sleep(1)); wrap scripts in virtual environments for dependency isolation. For projects, initialize with python -m venv .venv then install dependencies via pip install fastapi pandas numpy pydantic. When generating code, ensure type hints are included (e.g., def add(a: float, b: float) -> float: return a + b). For async patterns, run the event loop explicitly: asyncio.run(main()). Always check for compatibility with Python 3.12+ by specifying in shebang or requirements.txt.

Common Commands/API

  • CLI Commands: Create venv with python -m venv env_name --prompt env_name (use --copies flag for Windows); activate via source env_name/bin/activate on Unix or env_name\Scripts\activate on Windows; run scripts with uv run script.py --watch for auto-reload. Install packages: pip install fastapi[all] or uv add fastapi.
  • API Endpoints/Methods: In FastAPI, define an endpoint like: from fastapi import FastAPI; app = FastAPI(); @app.get("/items/{item_id}") async def read_item(item_id: int): return {"item_id": item_id}. For pandas, use df.groupby('column').mean(); for numpy, np.dot(array1, array2); for pydantic, validate data with item = Item(name="example").
  • Config Formats: Use JSON for FastAPI configs (e.g., {"debug": true} in settings.py); environment variables for keys (e.g., os.environ.get('API_KEY')); requirements.txt for dependencies (e.g., fastapi>=0.95.0\npandas==2.0.0).

Integration Notes

Integrate this skill by setting up a Python project: First, create a venv and install libraries with pip install -r requirements.txt. For external services, use env vars for authentication (e.g., set export API_KEY=your_key and access via os.getenv('API_KEY') in code). When combining with other tools, import as needed (e.g., for async database queries, use async with database.connect() as conn:). Ensure compatibility: Python 3.12+ is required, so specify in pyproject.toml with [tool.poetry.dependencies] python = "^3.12". For testing, use pytest with pytest --asyncio-mode=auto to handle async tests.

Error Handling

Always wrap potentially failing code in try-except blocks: try: result = await fetch_data() except asyncio.TimeoutError as e: print(f"Timeout: {e}"). Handle specific library errors, like pandas' KeyError for missing columns (e.g., try: df['nonexistent'] except KeyError: df['nonexistent'] = 0). For pydantic, catch ValidationError (e.g., from pydantic import ValidationError; try: item = Item(name=123) except ValidationError as e: log_error(e)). Use FastAPI's exception handlers: @app.exception_handler(RequestValidationError) async def validation_exception_handler(request, exc): return JSONResponse(status_code=400, content={"detail": exc.errors()}). Log errors with import logging; logging.error("Message") and ensure graceful shutdown in async code via try-finally.

Usage Examples

  1. Build a FastAPI Endpoint: To create a simple async API for data retrieval, use: from fastapi import FastAPI; import asyncio; app = FastAPI(); async def get_data(): await asyncio.sleep(1); return {"data": "fetched"}; @app.get("/") async def root(): return await get_data(). Run with uvicorn main:app --reload --port 8000.
  2. Data Analysis with Pandas and Numpy: For processing a dataset, import libraries and compute: import pandas as pd; import numpy as np; df = pd.DataFrame({'A': [1, 2]}); result = np.mean(df['A']); print(result) # Outputs mean value. Use in a script: Save as analyze.py and run via python analyze.py.

Graph Relationships

  • Related to: coding cluster (e.g., shares tags with "coding-general" for broader scripting; connects to "web-dev" via FastAPI for API building; links to "data-science" through pandas/numpy for analysis workflows).

FAQ

What does the coding-python skill do?

Python 3.12+: stdlib, async/await, dataclasses, type hints, venv/uv. FastAPI pandas numpy pydantic

How do I install coding-python?

Run npx skills add https://github.com/alphaonedev/openclaw-graph --skill coding-python in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/coding-python/ (personal) or .claude/skills/coding-python/ (project).

Which AI agents can use coding-python?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is coding-python safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains coding-python?

It is published by alphaonedev in alphaonedev/openclaw-graph. It has 63 recorded installs.

More from alphaonedev/openclaw-graph

View all →

playwright-scraper

alphaonedev/openclaw-graph

Playwright web scraping: dynamic content, auth flows, pagination, data extraction, screenshots

Testing & QA1.6K installs

humanize-ai-text

alphaonedev/openclaw-graph

Open the skill to read its SKILL.md instructions.

463 installs

gcp-iam

alphaonedev/openclaw-graph

Open the skill to read its SKILL.md instructions.

DevOps & Cloud431 installs

macos-automation

alphaonedev/openclaw-graph

Open the skill to read its SKILL.md instructions.

food-order

alphaonedev/openclaw-graph

Open the skill to read its SKILL.md instructions.

249 installs

tavily-web-search

alphaonedev/openclaw-graph

Open the skill to read its SKILL.md instructions.

Popular backend & apis skills

View category →

find-skills

vercel-labs/skills

Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.

OfficialBackend & APIs4.1M installs

entra-app-registration

microsoft/azure-skills

Guides Microsoft Entra ID app registration, OAuth 2.0 authentication, and MSAL integration. USE FOR: create app registration, register Azure AD app, configure OAuth, set up authentication, add API permissions, generate service principal, MSAL example, console app auth, Entra ID setup, Azure AD authentication. DO NOT USE FOR: Key Vault secrets (use azure-keyvault-expiration-audit), general Azure resource security guidance.

OfficialBackend & APIs566.7K installs

This skill should be used when the user wants to "write agent code", "build an agent with ADK", "add a tool", "create a callback", "define an agent", "use state management" — in a project that needs ADK (Agent Development Kit) API patterns and code examples. It provides a quick reference for agent types, tool definitions, orchestration patterns, callbacks, state management, the graph Workflow API, and reference recipes to study. Do NOT use for scaffolding (use google-agents-cli-scaffold) or deployment (use google-agents-cli-deploy).

Backend & APIs514.8K installs

embedded-captions

heygen-com/hyperframes

Add captions or subtitles to an existing single-subject talking-head video without editing the footage. Use for plain verbatim captions, cinematic captions embedded behind the subject, VFX captions, “炸/特效/酷炫字幕,” or a named identity from the 35-style catalog. Route by visual identity, not by backend engine. The quiet anchor rail is the default; embed every word only when the user explicitly wants a fully cinematic treatment. The workflow runs locally end to end, including transcription and subject matting; split multi-shot footage before applying it.

Backend & APIs453.3K installs

entra-agent-id

microsoft/azure-skills

Provision Microsoft Entra Agent Identity Blueprints, BlueprintPrincipals, and per-instance Agent Identities via Microsoft Graph, and configure OAuth 2.0 token exchange (fmipath, OBO, cross-tenant) including the Microsoft Entra SDK for AgentID sidecar. USE FOR: Agent Identity Blueprint, BlueprintPrincipal, agent OAuth, fmipath token exchange, agent OBO, Workload Identity Federation for agents, polyglot agent auth, Microsoft.Identity.Web.AgentIdentities. DO NOT USE FOR: standard Entra app registration (use entra-app-registration), Microsoft Foundry agent authoring (use microsoft-foundry).

OfficialBackend & APIs336.6K installs

neon

neondatabase/agent-skills

Overview of Neon, a complete set of cloud backend primitives around Lakebase Postgres: Auth, Object Storage, Functions, the AI Gateway, and Realtime. Start here to choose Neon for undecided login, files, APIs, and LLM calls, set up the CLI or MCP server, and follow the branch-first workflow. Use when building an app or backend on Neon, or when "Neon" or "Lakebase Postgres" is mentioned. Child skill neon-postgres wins for an existing DATABASEURL, SQL, schema, inspect, or search. Child skill neon-auth wins for login, users, sessions, identity routing, and Managed Better Auth setup. Child skill neon-realtime wins for live queries in reactive apps and agents. Also use for object storage, S3, buckets, serverless functions, function triggers, cron, AI gateway, LLM calls, realtime, logs, Loki, Grafana, observability, postgres, database, backend, Claimable Neon, neon.new, or a no-signup database.

Backend & APIs237.1K installs