Install
openclaw skills install pyscripts-orgSkill for agents managing terminal Python scripts, aiming to improve efficiency. Every .py file must have a summary block at the END of the file. Automatically generates pyscripts_docs.md for quick lookup of existing scripts. Creates and maintains pyscripts_pitfall.md to record common errors. Before writing a new script, always consult the docs; if a script already exists → run it; if it fails → read the code and add a pitfall entry if needed.
openclaw skills install pyscripts-orgPlace it after all the code, as the very last lines of the file.
Required structure:
# ===== SUMMARY =====
# Brief description of what the script does and when to use it.
# Syntax: python script.py <args>
# ===== END SUMMARY =====
Reason: LLMs/agents pay the most attention to the end of the text; placing the summary there ensures the most up-to-date information is captured when generating docs.
pyscripts_docs.md – generated automatically by summary.pyThis is the index of all scripts, containing a table:
| Script | Summary | Syntax |
|---|---|---|
| … | … | … |
The script summary.py scans all .py files, reads the # ===== SUMMARY ===== block at the end of each file, extracts the description and syntax, then writes pyscripts_docs.md.
pyscripts_pitfall.md – manually recorded errorsWhenever an agent runs a script and encounters an error, it will:
pyscripts_pitfall.md using this template:### Error: [script name] – [short description]
- Cause: ...
- Fix: ...
- Date encountered: ...
This file helps avoid repeating mistakes and speeds up future handling.
pyscripts_docs.md.python <script.py> <args> (or via terminal tool).pyscripts_pitfall.md if the error is worth remembering, to prevent it in the future.summary.py every time a script is added/modified/deleted to update pyscripts_docs.md.execute_code – script files remain primaryEven small scripts are saved as standalone .py files for easy reuse.
execute_code is only used for one-liners or quick checks.
| Script | Function |
|---|---|
summary.py | Scans all .py files, extracts end-of-file summaries, generates pyscripts_docs.md |
Other utility scripts (query, update, fix…) will be listed in pyscripts_docs.md.
Summary of key changes:
pyscripts-org.pyscripts_docs.md (auto-generated).pyscripts_pitfall.md (manual error log).