python-script
Skill53 starsChanged 3 months agoMITView on GitHub
Create robust Python automation with full logging and safety checks. Use when tasks need complex data processing, authenticated API work, conditional file operations, or error handling beyond simple shell commands.
In this repository7 other files it gives its agents.
- AGENTS.mdAGENTS.md
- cmailSkill
- code-reviewSkill
- humanizerSkill
- lark-cliSkill
- refine-codeSkill
- scoutSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 20
Run with uv run --script ~/.agents/sessions/{project}/scripts/{script_name}.py and monitor logs.
- Very specific: line 27
Add RotatingFileHandler if logs may grow large
- Very specific: line 31
Read references/script-template.md for the full script template.
- Distinctive: line 37
Use temporary directories for intermediates
- Distinctive: line 38
Never run destructive steps without confirmation
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Python Scripter
Overview
Design and run Python scripts with clear requirements, safety checks, and reproducible logging.
Workflow
{project} is the git repo name (if in a git repo) or the basename of the current working directory.
- Confirm inputs, outputs, constraints, and preferred libraries.
- Identify risky operations and secure explicit approval.
- Scaffold a script with PEP 723 metadata and structured logging.
- Lint with
uvx ruff check --fix ~/.agents/sessions/{project}/scripts/{script_name}.py. - Run with
uv run --script ~/.agents/sessions/{project}/scripts/{script_name}.pyand monitor logs. - Report results, risks encountered, and any follow-up steps.
Logging requirements
- Log to
~/.agents/sessions/{project}/logs/{script_name}.logand stream to console - Capture start/end timestamps, parameters, file operations, and errors
- Add
RotatingFileHandlerif logs may grow large
Template
Read references/script-template.md for the full script template.
Safety practices
- Provide dry-run or rollback paths
- Validate external inputs and API responses
- Use temporary directories for intermediates
- Never run destructive steps without confirmation
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

