Python add-on
Skills that make charts and office files with a ready-made Python.
What you'll learn
- How to ask for the Python add-on.
- How to write instructions for a risky capability.
- Why working examples beat descriptions.
What people get: Tallgeese that can do calculations, draw charts, and read, make and change Excel, Word, PowerPoint and PDF files. The item contains no program of its own. It brings two skills and asks Tallgeese for its Python.
[[provides]]
kind = "skillPack"
skills = ["python-scripts", "office-and-pdf-files"]
[[provides]]
kind = "runtime"
family = "python"
How it works for people
- They press Get, and are told how big the download is and where it comes from.
- Python downloads once. The Get button shows progress.
- Removing the last item that uses Python removes it from the computer.
What the skills teach the assistant
The main skill is a good model of instructions for a risky capability:
- Check Python is there first. If not, say how to get it back, then stop.
- Write the script to a file, then run it. Never use long one-line commands, because quote marks break in some shells.
- Print little. Show a few rows and a summary, never a whole table.
- Protect the person's files. Save results as new files and say where they are.
- Know what's installed, and don't try to install more.
- When a script fails, read the error and fix it. After three tries at the same problem, stop and explain.
Reference files with working examples
Beside the skill are reference files, one each for charts, Excel, Word, PowerPoint and PDF. Each holds a complete script the assistant copies and adapts, and every example was run before it went in. They also solve real problems ahead of time:
- No window can open, so charts are saved as pictures rather than shown.
- Japanese, Korean and Chinese text needs a font that has the letters. The chart example picks one by language, and falls back to English labels if none is found.
- Old file formats can't be written, so the skill makes the new format and says so.
- Saving over a file can lose charts, comments and tracked changes, so the skill warns when changing something the person made.
Put complete, tested examples into your skill's reference files. An assistant copies a working example far more reliably than it writes one from a description.