{"slug": "turn-chats-into-skills-skills-into-scripts", "title": "Turn chats into Skills, Skills into scripts", "summary": "A developer outlined a technique for making AI agents faster and cheaper by converting repeated chat interactions into Agent Skills — natural-language Markdown instruction files — and then into deterministic Bash or Python scripts when tasks are run frequently or are expensive. The developer frames the approach as a \"spectrum of determinism,\" noting that scripts run faster and more consistently without burning tokens, while Skills remain valuable for their flexibility and as a glue layer between scripts.", "body_md": "Here's a tip to make your agents faster, burn fewer tokens, and behave more consistently:\n\nI find this technique helpful because we're constantly trying to find ways to reduce our token costs or do more with our subscription rate limits.\n\nBut it's important not just for costs; I find this is an automation mindset that improves my productivity as well. Consistency is important, especially for complex tasks that I want to happen consistently.\n\nWhen you chat with an agent, it has to burn tokens and time to acquire context, understand your intent, reason, and implement.\n\nIf you have an Agent Skill (which is basically a natural language script as a Markdown file), your agent has to spend less time reasoning about what you want to do. It just follows the instructions you've specified.\n\nBy that same logic, classic code scripts (e.g. Bash, Python) have advantages over Agent Skills. An Agent Skill is a natural-language script — a sequence of instructions — but the LLM still has to spend time and tokens to process it. It's also non-deterministic: running the same Skill 10 times can lead to different behavior, sometimes significantly different.\n\nMeanwhile, Bash and Python scripts are clear sequences of instructions that run faster, more consistently, and without burning tokens. So when I have an Agent Skill that's run repeatedly, complex, or expensive, I often convert it into a script.\n\nBut I don't always reach for scripts right away — they take time to write, are more rigid in adapting to unexpected scenarios, and can be more brittle. This is the classic [automation](https://xkcd.com/1319/) [tradeoff](https://xkcd.com/1205/) — it takes time and effort to create the scripts.\n\nIt helps me to recognize that this is an automation technique, which is something that \"Operators\" (IT, SRE, DevOps) think about more than developers. A few concepts are useful here if you look through an operational lens: repeatability, reliability, cost of automation, cost of operations, and long-term maintenance.\n\nIt's useful to recognize that not everything SHOULD be automated; there is a cost to writing and maintaining a Skill. There may be an even higher one for scripts. Even when I ask AI to one-shot a Skill or script, it takes valuable time to refine it.\n\nThere are other times where I care about reliability and repeatability. Even if I rarely run it, the task is important or complex enough that I want a repeatable playbook. Agent Skills play an interesting role here.\n\nSince Agent Skills are incredibly easy to write, this changes things. In the past I might have written up a playbook as a natural-language document; now it's easy to ask my agent to simply make that document executable as a Skill.\n\nTo summarize, these are just ways of getting an agent to perform my task. I like to think about it as a \"spectrum of determinism.\"\n\nOn one extreme, the most open-ended you can be is to simply chat with your agent. This is what we all do - no tips, no tricks. Just request something, and the agent researches as much as it thinks it needs to fulfill your task.\n\nOn the other extreme, you can ask your agent to write a Python script that will behave the same way every time you run it. You can ask your agent to run it for you, instead of trying to reason about that sequence of steps.\n\n(I haven't talked about subagents, but I think they deserve a place on this spectrum. I think of them as a slightly constrained general agent, with context isolation. I think about them like Skills, but even more flexible and less predictable.)\n\nOne final note: you don't have to choose scripting versus Skills. You can blend them — I often embed scripts in my Agent Skills. There are some parts I want to run faster and more consistently, so I spend the time building the scripts.\n\nBut Skills shine in their natural-language flexibility and open-endedness. I use Skills as a wrapper for calling my scripts, as the \"glue\" layer between multiple scripts, and the \"transform\" layer that validates and transforms inputs and outputs.\n\nIn the end, you're just trying to help your agents perform a task. They're pretty good at most general tasks, but giving them constraints may save them tokens and time. The question is whether it's worth your time to automate and tinker with the automation.\n\nShoutout to [@InboxZero's tweet](https://x.com/InboxZero/status/2100695650388283700?s=20) for prompting me to write this article. I've been using this technique, and variations of this topic come up regularly when I swap tips with engineers about how I improve my productivity.", "url": "https://wpnews.pro/news/turn-chats-into-skills-skills-into-scripts", "canonical_source": "https://dev.to/0xandrewshu/turn-chats-into-skills-skills-into-scripts-2ndg", "published_at": "2026-09-19 16:34:16+00:00", "updated_at": "2026-09-19 16:53:39.624249+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "developer-tools", "mlops"], "entities": [], "alternates": {"html": "https://wpnews.pro/news/turn-chats-into-skills-skills-into-scripts", "markdown": "https://wpnews.pro/news/turn-chats-into-skills-skills-into-scripts.md", "text": "https://wpnews.pro/news/turn-chats-into-skills-skills-into-scripts.txt", "jsonld": "https://wpnews.pro/news/turn-chats-into-skills-skills-into-scripts.jsonld"}}