Should Agent Skills scripts be prewritten or generated on the fly?

dotey · x · 2026-09-08

A discussion of two approaches to Scripts in Agent Skills: prewriting scripts versus only providing instructions and letting the agent generate them at runtime.

On-the-fly generation is flexible—agents already dynamically write Python scripts in tool calls without Skills—but costs more tokens, is slower, and less stable, often needing repeated debugging and missing edge cases.

So scripts are usually prewritten, with the agent just passing parameters for stable results. Example: a Markdown-to-HTML skill written on the fly is barely usable, while a prewritten one handles styling and edge cases reliably.

Original post →

More from coding & agent

coding & agent channel →