prompt-rendering

A guide to prompt templates, which are reusable text files with placeholders, and to filling those placeholders for each request. It covers loading, caching the templates, and handling missing values.

In plain words
What is it for?
Use it when changing prompt files, template loading, caching, placeholder rendering, or the values supplied to prompts during a request.
Why use it?
It keeps request-specific information separate and ensures missing required values fail clearly instead of producing incomplete prompts.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/extra-org/extra/prompt-rendering
Any agent
npx skills add extra-org/extra --skill prompt-rendering
Clone the repo
git clone --depth 1 https://github.com/extra-org/extra

Made for: Claude Code, Codex.

Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 475 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00032 $0.00475
Opus 5 $0.00016 $0.00237
Sonnet 5 $0.00006 $0.00095
Haiku 4.5 $0.00003 $0.00047

Measured 2d ago against content hash 701f9e6a813e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

prompt-rendering scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/prompt-rendering/SKILL.md · 61 lines

What it actually says

Skill: Prompt Rendering

When to use this skill

Use this when working on prompt templates, template loading/caching, or per-request rendering. Primary task: tasks/0005-prompt-rendering.md.

Files to read first

  • AGENTS.md
  • docs/PROMPT_RENDERING.md
  • docs/adr/0004-prompts-are-templates-rendered-per-request.md
  • docs/RUNTIME_LIFECYCLE.md

Architecture rules

  • Prompt files are templates with placeholders, not finished text.
  • Parsed templates may be cached; rendered prompts are never globally cached.
  • Values are resolved per request from the ExecutionContext.
  • Missing required variables fail loudly with a named error.
  • Templates are data, not code — no execution inside a template.
  • Prompt text is not a security boundary.

Implementation rules

  • Implement loading/caching/rendering in src/agentplatform/prompts.
  • Cache the parsed template keyed by path + version; never cache rendered output.
  • Use strict rendering: undeclared/missing variables raise errors.
  • Pull values only from the ExecutionContext (which is populated by the resolver plugins), not from globals.
  • Keep the source declaration (YAML) and resolution (runtime) separated.

Validation checklist

  • Parsed templates cached; rendered prompts not cached globally.
  • Missing required variable → clear, named error.
  • No executable logic in templates.
  • No secrets in prompt files.
  • Tests cover successful render, missing variable, and cache behavior.
  • make check passes.

Common mistakes to avoid

  • Caching rendered prompts (data-leak risk across tenants/requests).
  • Silently substituting blanks for missing variables.
  • Embedding logic/secrets in templates.
  • Treating prompt instructions as enforcement.
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 61 lines · 32 tokens per session scan A 701f9e6a813e

Subscribe to this mod's changes

prompt-rendering is a skill published in the GitHub repository extra-org/extra (108 stars, last pushed 4d ago), licensed MIT. It adds 32 tokens to every session and 475 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

skill-meta-prompt

Craft better prompts using proven optimization techniques — use when your prompt needs refinement.

nyldn/claude-octopus · 19 tokens

prompt-engineer

LLM prompts - design, evaluate, tune instructions.

sipyourdrink-ltd/bernstein · 15 tokens

prompt-enhancer

Transform poor or overly simple prompts with expert-level framing. Use when the user explicitly asks to improve, refine, or rewrite a prompt, or wants help framing a request for another AI system. Do NOT use for authoring, reviewing, or migrating system prompts or skills targeting a specific Claude model…

sammcj/agentic-coding · 67 tokens

llm-prompting-guide

Prompt format rules for generative video and music models. Use when writing or reviewing a prompt for MiniMax H3 (text/image/reference-to-video with native audio) or MiniMax Music 3 (song generation from caption plus lyrics), in ComfyUI or elsewhere. Do NOT use for chat-assistant prompts, or for generative models not…

sammcj/agentic-coding · 79 tokens

prompt-optimizer

Advanced prompt optimization and composition system for all prompt types (system prompts, task-specific, creative, technical, agentic). Use when users need to refine, optimize, or transform prompts to achieve better AI outputs. Triggers include requests to improve prompts, make prompts more effective, analyze prompt…

wasintoh/toh-framework · 101 tokens

enhance-prompt

Transforms vague UI ideas into polished, Stitch-optimized prompts. Enhances specificity, adds UI/UX keywords, injects design system context, and structures output for better generation results.

google-labs-code/stitch-skills · 41 tokens