Official agent skill

Python Playground

by pydantic in pydantic/monty

Run and test Python code in a dedicated playground directory.

OfficialMITAuto-check passedDevelopment

Install Python Playground

skills CLI
$ npx skills add pydantic/monty --skill python-playground -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install pydantic/monty python-playground --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/pydantic/monty.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/python-playground .claude/skills/python-playground && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
python-playground
GitHub stars
8.6k
Token cost
~424 tokens
SKILL.md length
187 words
Files
1
Skills in repo
9
Repo updated
First seen
Licence
MIT

At a glance

Run and test Python code in a dedicated playground directory.

  • Works in 3 steps: First, ensure the playground directory… → Use the Write tool to create the Python… → Run with: uv run playground/test.py to…
  • You need to execute Python scripts
  • SKILL.md covers Instructions, Example workflow and Guidelines
  • Calls uv and cargo

What it does

Python Playground is an agent skill from pydantic/monty, published by the product's own GitHub organization. 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.

Its SKILL.md is about 420 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development. It works with Python. The repository describes itself as: A minimal, secure Python interpreter written in Rust for use by AI. The licence is MIT.

When your agent uses it

  • You need to execute Python scripts
  • Test code snippets
  • Investigate CPython behavior
  • Experiment with Python without affecting the main codebase

Example prompts

  • “/python-playground”

Requirements

  • Python 3

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  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

What it can do on your machine

Read from SKILL.md and the folder at commit 5915273. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • uv
    • cargo

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use uv, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Python Playground loads about 424 tokens when it runs. Until then it costs about 59 tokens; SKILL.md has 187 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~59
When it runs · the whole SKILL.md, loaded when a task matches
~424

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from pydantic/monty at commit 5915273, republished under its MIT licence (© pydantic). 187 words, ~424 tokens.

Download SKILL.mdSave it as .claude/skills/python-playground/SKILL.md (or your agent's skills folder).
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):

bash
mkdir playground

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

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

foo()

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

bash
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

© pydantic, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/python-playground of pydantic/monty.

Open the folder on GitHubat commit 5915273

Compare with similar skills

Python Playground next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Python Playground compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Python Playground this skillpydantic/monty8.6k—~424Automated safety check: PassMIT
Code Review ChecklistshareAI-lab/learn-claude-code78k5 repos~1.1kAutomated safety check: PassMIT
Merge Dependabot PRsonyx-dot-app/onyx32k1 repos~2.2kAutomated safety check: PassMIT
Kedro Babysitkedro-org/kedro11k—~4kAutomated safety check: PassCustom licence
LangBot Plugin Developmentlangbot-app/LangBot18k—~3.9kAutomated safety check: PassApache-2.0
Senior Architect Toolkitmaslennikov-ig/claude-code-orchestrator-kit2597 repos~1.2kAutomated safety check: NotesCustom licence

Similar skills

  • Code Review Checklist

    shareAI-lab/learn-claude-code

    Reviews code against a five-part checklist covering security, correctness, performance, maintainability and testing, and reports findings in a fixed format.

    78k GitHub starsUsed in 5 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Merge Dependabot PRs

    onyx-dot-app/onyx

    Triages and lands a batch of open Dependabot PRs in the Onyx repo, where main is gated exclusively by GitHub's merge queue: approves and enqueues green PRs, closes superseded duplicates, fixes…

    32k GitHub starsUsed in 1 repo~2.2k tokens
    DevelopmentAuto-check passed
  • Kedro Babysit

    kedro-org/kedro

    Run Kedro's local lint / format / type-check / tests on changed files (uses the project's pre-commit hooks, ruff, mypy, pytest, lint-imports, detect-secrets, Make targets — in the right venv), or…

    11k GitHub stars~4k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • LangBot Plugin Development

    langbot-app/LangBot

    Guides building, debugging and testing LangBot plugins: components, SDK calls, README and locale rules, SDK pitfalls and WebSocket-based testing.

    18k GitHub stars~3.9k tokensUpdated today
    DevelopmentAuto-check passed
  • Senior Architect Toolkit

    maslennikov-ig/claude-code-orchestrator-kit

    Comprehensive software architecture skill for designing scalable, maintainable systems using ReactJS, NextJS, NodeJS, Express, React Native, Swift, Kotlin…

    259 GitHub starsUsed in 7 repos~1.2k tokens
    DevelopmentAuto-check: notes
  • Flowsint Enricher Builder

    reconurge/flowsint

    Guides building Flowsint enrichers and types: where definitions live, how the base class and vault work, and when a new type is warranted.

    9.3k GitHub stars~2.6k tokensUpdated 4 days ago
    DevelopmentAuto-check passed

More from pydantic/monty

All 9 skills in this repo
  • Fix PR Comments

    pydantic/monty

    Official

    Read the review comments left by the known agent reviewers on the current PR, resolve and reply.

    8.6k GitHub stars~552 tokensUpdated yesterday
    Auto-check passed
  • Review General

    pydantic/monty

    Official

    Review the current branch against its merge base for bugs, CPython divergence, sandbox escapes, resource-limit escapes, performance regressions, verbose comments and missing ./limitations/ or docs/…

    8.6k GitHub stars~501 tokensUpdated yesterday
    Auto-check passed
  • Review Security

    pydantic/monty

    Official

    Security review of the current branch against its merge base — sandbox escapes, memory errors, panics and resource-limit bypasses.

    8.6k GitHub stars~852 tokensUpdated yesterday
    Auto-check passed
  • Writing Style

    pydantic/monty

    Official

    How to write prose that reads like human technical documentation rather than LLM output.

    8.6k GitHub stars~3.2k tokensUpdated yesterday
    Auto-check passed
  • Review Usability

    pydantic/monty

    Official

    Check whether the common Python code an LLM would plausibly write still works on this branch, testing real cases in ./playground against CPython.

    8.6k GitHub stars~410 tokensUpdated yesterday
    Auto-check passed
  • Coverage

    pydantic/monty

    Official

    Fetch coverage diff from Codecov for the current branch or a specific PR.

    8.6k GitHub stars~282 tokensUpdated yesterday
    Auto-check passed

Works with

Categories

Questions about Python Playground

What does Python Playground do?

Run and test Python code in a dedicated playground directory. Python Playground is an agent skill from pydantic/monty, published by the product's own GitHub organization. Run and test Python code in a dedicated playground directory.

When should I use Python Playground?

Python Playground fits situations like: you need to execute Python scripts; test code snippets; investigate CPython behavior; experiment with Python without affecting the main codebase.

How do I install Python Playground in Claude Code?

Run `npx skills add pydantic/monty --skill python-playground -a claude-code`. Or copy the skill folder (.agents/skills/python-playground in pydantic/monty) into .claude/skills/python-playground in your project. Claude Code loads it when a task matches its description.

How do I install Python Playground in Codex?

Run `npx skills add pydantic/monty --skill python-playground -a codex`. Or copy the skill folder (.agents/skills/python-playground in pydantic/monty) into .agents/skills/python-playground in your project. Codex loads it when a task matches its description.

Can I use Python Playground in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add pydantic/monty --skill python-playground -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/python-playground, .gemini/skills/python-playground, .github/skills/python-playground and .opencode/skills/python-playground in your project.

What does Python Playground need to run?

Going by SKILL.md and its folder, Python Playground needs the command-line tools its instructions call (uv and cargo). Our summary lists: Python 3.

Does Python Playground access the network?

SKILL.md contains no URLs. Its commands use uv, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Python Playground safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Python Playground use?

Python Playground is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Python Playground use?

About 424 tokens (SKILL.md is roughly 1.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Python Playground?

Skills that share tags, products or a category with Python Playground: Code Review Checklist (shareAI-lab/learn-claude-code, 78k stars), Merge Dependabot PRs (onyx-dot-app/onyx, 32k stars), Kedro Babysit (kedro-org/kedro, 11k stars) and LangBot Plugin Development (langbot-app/LangBot, 18k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Python Playground?

pydantic (a GitHub organization, an official publisher) maintains it in pydantic/monty, which has 8,581 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on October 6, 2026.

Source: pydantic/monty on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.