home / skills / trpc-group / trpc-agent-go / python_math
This skill runs small Python scripts inside the workspace, returning results as text or output files for easy automation.
npx playbooks add skill trpc-group/trpc-agent-go --skill python_mathReview the files below or copy the command above to add this skill to your agents.
---
name: python-math
description: Small Python utilities for math and text files.
---
Overview
Run short Python scripts inside the skill workspace. Results can be
returned as text and saved as output files.
Examples
1) Print the first N Fibonacci numbers
Command:
python3 scripts/fib.py 10 > out/fib.txt
2) Sum a list of integers
Command:
python3 - <<'PY'
from sys import stdin
nums = [int(x) for x in stdin.read().split()]
print(sum(nums))
PY
Output Files
- out/fib.txt
This skill runs short Python utilities inside the skill workspace to perform quick math and text-file tasks. It executes Python scripts or inline Python commands, returns results as text, and can save outputs to files in the workspace. It is optimized for small, fast computations and simple file-based workflows.
You provide a Python script file or an inline Python snippet that the skill runs with the workspace Python interpreter. Standard output is captured and returned as text; any redirected output can be written to files under the out/ directory and preserved as output files. The skill supports passing arguments to scripts and reading from stdin for flexible input handling.
How do I save results to an output file?
Redirect script output to a file path under out/, for example: python3 scripts/fib.py 10 > out/fib.txt.
Can I pass input via stdin?
Yes. Use stdin in your script and pipe or provide here-doc style input so the skill reads data from standard input.
Are external Python packages available?
Prefer the standard library; external packages may not be installed in the workspace. If you need extras, include setup steps or vendor minimal dependencies.