Agent skill
python-playground
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.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/python-playground
SKILL.md
Python Playground
Run Python code in an isolated playground directory for testing and experimentation.
Instructions
- First, ensure the playground directory exists:
mkdir -p playground - Use the Write tool to create the Python file at
playground/test.py - Run with:
uv run playground/test.pyto test cpython behavior orcargo run -- playground/test.pyto test monty behavior
IMPORTANT: Use separate tool calls for each step - do NOT chain commands with && or use heredocs. This allows the pre-approved commands to work without prompting.
Example workflow
Step 1 - Create directory (Bash, already allowed):
mkdir -p 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
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?