{"slug": "pi-prompt-template-or-skill", "title": "pi: prompt template or skill?", "summary": "Thiago Perrotta explains that a short, stable request like 'commit (only) what you changed' is best implemented as a prompt template in Pi, which turns a Markdown file in ~/.pi/agent/prompts/ into a /slash command, rather than as a skill, which is a self-contained capability package loaded on-demand for complex workflows. He demonstrates creating a /commit template that instructs the agent to commit only changed files without pushing, and notes that a commit flow with checks or project-specific policy would warrant a skill.", "body_md": "♠ **Problem statement**: I often type `commit (only) what you changed`\n\nin coding\nagent harnesses. Can I make an abbreviation out of it?\n\n[Pi](https://pi.dev/) turns a Markdown file in `~/.pi/agent/prompts/`\n\ninto a\n/slash command. This one gives me `/commit`\n\n:\n\n```\n---\ndescription: Commit files changed in this turn without pushing\n---\nCommit what you changed (only). DO NOT push.\n% find ~/.pi/agent/prompts -maxdepth 1 -type f -print -exec sh -c 'printf \"%s\\n\" \"--- $1\"; cat \"$1\"' _ {} \\;\n/Users/thiago.perrotta/.pi/agent/prompts/commit.md\n--- /Users/thiago.perrotta/.pi/agent/prompts/commit.md\n---\ndescription: Commit files changed in this turn without pushing\n---\nCommit what you changed (only). DO NOT push.\n```\n\nIn Pi, a [prompt template](https://pi.dev/docs/latest/prompt-templates) is fixed\nprompt expansion. It is right for a short, stable request:\n\nPrompt templates are Markdown snippets that expand into full prompts. Type /name in the editor to invoke a template, where name is the filename without .md.\n\nA [skill](https://agentskills.io/home) is a capability package. Its description\nis available at startup, but Pi loads its\n[ SKILL.md](https://pi.dev/docs/latest/skills) only when task matches or I run\n\n`/skill:name`\n\n. A skill can carry scripts, references, setup, and a workflow that\nbranches on state:Skills are self-contained capability packages that the agent loads on-demand. A skill provides specialized workflows, setup instructions, helper scripts, and reference documentation for specific tasks.\n\nA commit flow with checks, generated files, partial staging rules, or project specific policy deserves a skill. This one is a couple of words and one constraint, so I choose to keep it simple. ∎\n\n— § —\n\nReply via [email](mailto:serendipity@perrotta.dev?subject=Reply to: pi: prompt template or skill?)", "url": "https://wpnews.pro/news/pi-prompt-template-or-skill", "canonical_source": "https://perrotta.dev/2026/08/pi-prompt-template-or-skill/", "published_at": "2026-08-24 23:13:46+00:00", "updated_at": "2026-08-24 23:42:56.585533+00:00", "lang": "en", "topics": ["developer-tools", "ai-tools", "ai-agents"], "entities": ["Pi", "Thiago Perrotta"], "alternates": {"html": "https://wpnews.pro/news/pi-prompt-template-or-skill", "markdown": "https://wpnews.pro/news/pi-prompt-template-or-skill.md", "text": "https://wpnews.pro/news/pi-prompt-template-or-skill.txt", "jsonld": "https://wpnews.pro/news/pi-prompt-template-or-skill.jsonld"}}