Agent Skills › pydantic/monty › python-playground

python-playground

GitHub

提供隔离的 Python 代码运行与测试环境,支持实验性脚本执行、CPython 行为验证及 Monty 工具测试,确保不影响主代码库。

.agents/skills/python-playground/SKILL.md pydantic/monty

Trigger Scenarios

需要快速测试 Python 代码片段 验证 CPython 或 Monty 行为 进行不涉及主代码库的实验

Install

npx skills add pydantic/monty --skill python-playground -g -y
More Options

Non-standard path

npx skills add https://github.com/pydantic/monty/tree/main/.agents/skills/python-playground -g -y

Use without installing

npx skills use pydantic/monty@python-playground

指定 Agent (Claude Code)

npx skills add pydantic/monty --skill python-playground -a claude-code -g -y

安装 repo 全部 skill

npx skills add pydantic/monty --all -g -y

预览 repo 内 skill

npx skills add pydantic/monty --list

SKILL.md

Frontmatter
{
    "name": "python-playground",
    "description": "Run and test Python code in a dedicated playground directory. Use when you need to execute Python scripts, test code snippets, investigate CPython behavior, or experiment with Python without affecting the main codebase."
}

Python Playground

Run Python code in an isolated playground directory for testing and experimentation.

Instructions

  1. First, ensure the playground directory exists. If the playground directory doesn't already exist, run mkdir playground.
  2. Use the Write tool to create the Python file at playground/test.py
  3. Run with: uv run playground/test.py to test cpython behavior or cargo run -- playground/test.py to test monty behavior

IMPORTANT: Use separate tool calls for each step - do NOT chain commands with &&. This allows the pre-approved commands to work without prompting.

Example workflow

Step 1 - Create directory if it doesn't already exist (Bash, already allowed):

mkdir playground

Step 2 - Write code (use Write tool, not cat): Write to playground/test.py:

def foo():
    raise ValueError('test')

foo()

Step 3 - Run script (Bash, already allowed):

uv run playground/test.py

Guidelines

  • The playground/ directory is gitignored
  • Use a different file name for each test you want to run, give the files recognizable names like test_value_error.py
  • Use uv run ... to run scripts (uses project Python)
  • Or, cargo run -- ... to run scripts using Monty
  • Use Write tool for creating files (avoids permission prompts)
  • Run mkdir and uv as separate commands (not chained)
  • do NOT delete files from playground after you've finished testing

Version History

  • 64662cc Current 2026-09-22 23:14

    文档改进

  • 026b383 2026-08-20 09:39

Same Skill Collection

.agents/skills/fastmod/SKILL.md
.agents/skills/fix-pr-comments/SKILL.md
.agents/skills/review-general/SKILL.md
.agents/skills/review-security/SKILL.md
.agents/skills/review-usability/SKILL.md
.agents/skills/review-verbosity/SKILL.md
.agents/skills/writing-style/SKILL.md

Metadata

Files
0
Version
15753b3
Hash
d9b93016
Indexed
2026-08-20 09:39

ホーム - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-28 19:26
浙ICP备14020137号-1