Token导航 LogoToken导航TokenDH.com
开发敏感数据github未标认证来源可访问许可证需确认审计通过

coding-pythoncoding Python 测试

Agent Skill

用于辅助 Python 项目开发、测试、依赖管理和常见框架工作流。它适合让 Agent 阅读 Python 代码、定位测试问题、整理运行命令、生成脚本或分析数据处理逻辑。使用时需要确认项目虚拟环境、依赖版本和测试入口;涉及执行脚本、读写文件、访问数据库或调用外部 API 时,应先明确运行目录和输入输出范围,避免误改生产数据。

总安装

489

周安装

21

GitHub Stars

4

下载量

171
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:coding-python(coding Python 测试)
来源仓库:https://github.com/alphaonedev/openclaw-graph
仓库路径:skills/coding-python
安装命令:
npx skills add https://github.com/alphaonedev/openclaw-graph --skill coding-python
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

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

简介

coding-python 支持 Python 3.12+ 核心特性,包括 async/await、dataclass 与类型提示。

  • 适用于 FastAPI REST 服务、pandas 数据分析与环境管理(venv/uv)。
  • 强调类型安全与快速迭代,但不处理 GUI 或系统级底层操作。
  • 使用前请确认 pip 版本支持 PEP 660 editable installs,避免依赖解析冲突。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

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).

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

34.33%
按下载量换算59

Claude

32.49%
按下载量换算56

Cursor

21.12%
按下载量换算36

Gemini CLI

9.09%
按下载量换算16

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills