Agent skill

Prompt Template Authoring

by nicobailon in nicobailon/pi-prompt-template-model

Write and run custom Pi prompt templates (slash commands) for this extension.

MITAuto-check passedAI & LLM Engineering

Install Prompt Template Authoring

skills CLI
$ npx skills add nicobailon/pi-prompt-template-model --skill prompt-template-authoring -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install nicobailon/pi-prompt-template-model prompt-template-authoring --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/nicobailon/pi-prompt-template-model.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/prompt-template-authoring .claude/skills/prompt-template-authoring && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
prompt-template-authoring
GitHub stars
321
Token cost
~1.3k tokens
SKILL.md length
432 words
Files
1
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

Write and run custom Pi prompt templates (slash commands) for this extension.

  • Creating templates with model selection
  • SKILL.md covers Where Templates Live, Minimal Template, Model Selection and Argument Substitution, plus 7 more sections
  • Calls bash
  • Deterministic pre-steps

What it does

Prompt Template Authoring is an agent skill from nicobailon/pi-prompt-template-model. Write and run custom Pi prompt templates (slash commands) for this extension. Use when creating templates with model selection, deterministic pre-steps, loops, chains, subagents, or best-of-N compare flows.

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in AI & LLM Engineering, covering Prompt engineering, Subagents and Hooks and plugins. The repository describes itself as: Pi extension: Add model frontmatter to prompt templates for automatic model switching. The licence is MIT.

When your agent uses it

  • Creating templates with model selection
  • Deterministic pre-steps
  • Best-of-N compare flows

Example prompts

  • “/prompt-template-authoring”

What it can do on your machine

Read from SKILL.md and the folder at commit 6da2059. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • bash

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Prompt Template Authoring loads about 1.3k tokens when it runs. Until then it costs about 58 tokens; SKILL.md has 432 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~58
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from nicobailon/pi-prompt-template-model at commit 6da2059, republished under its MIT licence (© nicobailon). 432 words, ~1,319 tokens.

Download SKILL.mdSave it as .claude/skills/prompt-template-authoring/SKILL.md (or your agent's skills folder).
name
prompt-template-authoring
description
Write and run custom Pi prompt templates (slash commands) for this extension. Use when creating templates with model selection, deterministic pre-steps, loops, chains, subagents, or best-of-N compare flows.

Prompt Template Authoring

Use this skill when working on prompt templates for pi-prompt-template-model. Templates are markdown files that register as slash commands.

Where Templates Live

  • ~/.pi/agent/prompts/ — user prompts (highest priority)
  • .pi/prompts/ inside a trusted project — project-specific prompts

Extension examples/ are reference files only. Copy them to a prompt directory to register them.

Minimal Template

markdown
---
model: claude-sonnet-4-20250514
---
Your prompt body here.

Save as my-command.md, restart Pi, run /my-command. Use description: for autocomplete text.

Model Selection

Omit model: to inherit the current session model. Otherwise:

  • model: claude-sonnet-4-20250514 — specific model
  • model: claude-opus-4, gpt-5.4 — fallback order (tries first, falls back to second if unavailable)
  • model: claude-opus-4, gpt-5.4 + rotate: true — cycle through list on each loop iteration

Argument Substitution

The prompt body can use placeholders:

  • $@ — all arguments passed to the command
  • $1, $2 — specific positional arguments
  • ${@:1} — argument 1 and everything after

Deterministic Steps (Pre-LLM Execution)

Run a command or script before the LLM turn. The model only sees the output if you want it to.

Two equivalent forms. Don't mix them in the same prompt.

Shorthand form — top-level keys:

yaml
---
run: git status --short
handoff: always
---
Summarize the repo state.

Nested form — under deterministic::

yaml
---
deterministic:
  run: ./scripts/ship.sh
  handoff: on-failure
  timeout: 60000
---
Diagnose the failure and suggest a fix.

Handoff controls when the LLM sees the result:

  • never — run, show result, done (no LLM turn)
  • always — always hand result to model
  • on-failure — only hand off if command exits non-zero
  • on-success — only hand off if command exits zero

Execution forms:

  • run: command string — runs via /bin/bash -lc
  • run: {command: git, args: [status], shell: false} — explicit args, optional shell
  • script: ./script.sh or script: {path: ./script.sh, args: [--fast]} — run a file

Constraints:

  • Only single prompt templates (no chain, loop, subagent, or parallel)
  • Runtime flags --loop, --subagent, --fork are rejected for deterministic prompts
Show full SKILL.md (169 more words)Show less

Subagent Delegation

Delegate to another Pi agent instead of running inline:

yaml
---
model: claude-sonnet-4-20250514
subagent: delegate          # or true, or a specific agent name
inheritContext: true        # fork conversation context (optional)
cwd: /absolute/path         # working directory for the subagent (optional)
parallel: 3                 # run 3 copies in parallel (optional)
---
$@

Requires pi-subagents to be installed.

Loops

Run the prompt multiple times:

yaml
---
model: claude-sonnet-4-20250514
loop: 5                     # run exactly 5 times
converge: true              # stop early if no changes (default)
fresh: true                 # collapse context between iterations
---
$@

Or at runtime: /command --loop 5, /command --loop (unlimited), or /command --loop=5 --fresh.

Chains

Chain templates declare a reusable pipeline:

yaml
---
chain: analyze -> fix -> test
chainContext: summary        # pass step summaries to later delegated steps
---
$@

Or use /chain-prompts analyze -> fix -> test at runtime. Chain templates ignore the body and model: field.

Model Conditionals

Show different content based on which model runs:

markdown
<if-model is="anthropic/*">
Use Claude-specific instructions.
<else>
Use default instructions.
</if-model>

Supports exact IDs, provider/model-id pairs, wildcards (anthropic/*), and comma-separated combinations.

Best-of-N Compare

Run multiple workers, aggregate with reviewers, optionally apply final changes:

yaml
---
description: Best-of-N code review
bestOfN:
  worktree: true            # required if using finalApplier
  workers:
    - model: openai-codex/gpt-5.4-mini:low
      count: 2
  reviewers:
    - model: anthropic/claude-sonnet-4-20250514:medium
  finalApplier:
    agent: delegate
    model: anthropic/claude-sonnet-4-20250514:high
---
$@

Runtime Flags

Override frontmatter at invocation:

  • --model=provider/model-id — use this model instead
  • --subagent / --subagent=<name> / --subagent:<name> — force delegation
  • --fork — force delegation with context fork
  • --loop N / --loop=N / --loop — override loop count (unlimited if bare)
  • --fresh — collapse context between iterations
  • --no-converge — run all iterations even if no changes
  • --cwd=/absolute/path — working directory override when the prompt supports cwd
  • --chain-context — pass summaries to later delegated chain steps
  • --worktree — use git worktrees for parallel delegated work

When stuck, check README.md and examples/best-of-n.md in this extension.

© nicobailon, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/prompt-template-authoring of nicobailon/pi-prompt-template-model.

Open the folder on GitHubat commit 6da2059

Compare with similar skills

Prompt Template Authoring next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Prompt Template Authoring compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Prompt Template Authoring this skillnicobailon/pi-prompt-template-model321—~1.3kAutomated safety check: PassMIT
Claude Code Agent Developmentanthropics/claude-plugins-official38k7 repos~2.8kAutomated safety check: PassApache-2.0
Pi AgentK-Dense-AI/scientific-agent-skills48k1 repos~2.1kAutomated safety check: PassMIT
Wjs Evaling Voicedrop Promptsjianshuo/claude-skills131—~475Automated safety check: PassMIT
Reviewing Agent Definitionsbitwarden/ai-plugins155—~2.4kAutomated safety check: PassCustom licence
Subagent CreatorgreatSumini/cc-system438—~958Automated safety check: PassMIT

Similar skills

  • Claude Code Agent Development

    anthropics/claude-plugins-official

    Official

    Explains how to write agents for Claude Code plugins: the markdown file with YAML frontmatter, trigger descriptions, model and color settings, and system prompt design.

    38k GitHub starsUsed in 7 repos~2.8k tokens
    Agent WorkflowsAuto-check passed
  • Pi Agent

    K-Dense-AI/scientific-agent-skills

    Builds with and operates Pi, the minimal terminal coding harness.

    48k GitHub starsUsed in 1 repo~2.1k tokens
    AI & LLM EngineeringAuto-check passed
  • Wjs Evaling Voicedrop Prompts

    jianshuo/claude-skills

    A skill your agent uses when 王建硕 wants to evaluate whether a change to VoiceDrop's 挖矿 system prompt is actually better than the live version — runs the local eval harness (golden fixtures ×…

    131 GitHub stars~475 tokensUpdated 1 mo ago
    AI & LLM EngineeringAuto-check passed
  • Reviewing Agent Definitions

    bitwarden/ai-plugins

    Official

    Reviews Claude Code agent definition files for tool-access security, triggering quality, and system prompt clarity.

    155 GitHub stars~2.4k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • Subagent Creator

    greatSumini/cc-system

    Create specialized Claude Code sub-agents with custom system prompts and tool configurations.

    438 GitHub stars~958 tokensUpdated 4 mo ago
    Agent WorkflowsAuto-check passed
  • Test Prompt

    NeoLabHQ/context-engineering-kit

    A skill your agent uses when creating or editing any prompt (commands, hooks, skills, subagent instructions) to verify it produces desired behavior - applies RED-GREEN-REFACTOR cycle to prompt…

    1.8k GitHub stars~5k tokensUpdated 1 mo ago
    Testing & QAAuto-check passed

Questions about Prompt Template Authoring

What does Prompt Template Authoring do?

Write and run custom Pi prompt templates (slash commands) for this extension. Prompt Template Authoring is an agent skill from nicobailon/pi-prompt-template-model. Write and run custom Pi prompt templates (slash commands) for this extension.

When should I use Prompt Template Authoring?

Prompt Template Authoring fits situations like: creating templates with model selection; deterministic pre-steps; best-of-N compare flows.

How do I install Prompt Template Authoring in Claude Code?

Run `npx skills add nicobailon/pi-prompt-template-model --skill prompt-template-authoring -a claude-code`. Or copy the skill folder (skills/prompt-template-authoring in nicobailon/pi-prompt-template-model) into .claude/skills/prompt-template-authoring in your project. Claude Code loads it when a task matches its description.

How do I install Prompt Template Authoring in Codex?

Run `npx skills add nicobailon/pi-prompt-template-model --skill prompt-template-authoring -a codex`. Or copy the skill folder (skills/prompt-template-authoring in nicobailon/pi-prompt-template-model) into .agents/skills/prompt-template-authoring in your project. Codex loads it when a task matches its description.

Can I use Prompt Template Authoring in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add nicobailon/pi-prompt-template-model --skill prompt-template-authoring -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/prompt-template-authoring, .gemini/skills/prompt-template-authoring, .github/skills/prompt-template-authoring and .opencode/skills/prompt-template-authoring in your project.

What does Prompt Template Authoring need to run?

Going by SKILL.md and its folder, Prompt Template Authoring needs the command-line tools its instructions call (bash).

Does Prompt Template Authoring access the network?

SKILL.md names 1 domain. As links in the text: github.com. This is read from the text; nothing was executed.

Is Prompt Template Authoring safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Prompt Template Authoring use?

Prompt Template Authoring is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Prompt Template Authoring use?

About 1.3k tokens (SKILL.md is roughly 5.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Prompt Template Authoring?

Skills that share tags, products or a category with Prompt Template Authoring: Claude Code Agent Development (anthropics/claude-plugins-official, 38k stars), Pi Agent (K-Dense-AI/scientific-agent-skills, 48k stars), Wjs Evaling Voicedrop Prompts (jianshuo/claude-skills, 131 stars) and Reviewing Agent Definitions (bitwarden/ai-plugins, 155 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Prompt Template Authoring?

nicobailon (a GitHub user) maintains it in nicobailon/pi-prompt-template-model, which has 321 GitHub stars. The repository was last updated on September 21, 2026.

Source: nicobailon/pi-prompt-template-model on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.