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.
npx skills add stephansama/packages --skill typed-templatesgit clone --depth 1 https://github.com/stephansama/packagesWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/stephansama/packages/typed-templates)<a href="https://agentmods.dev/skills/stephansama/packages/typed-templates"><img src="https://agentmods.dev/badge/skills/stephansama/packages/typed-templates/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/stephansama/packages/typed-templates"><img src="https://agentmods.dev/badge/skills/stephansama/packages/typed-templates.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00083 | $0.01528 |
| Opus 5.5 | $0.00033 | $0.00611 |
| Sonnet 5.5 | $0.00017 | $0.00306 |
| Haiku 4.5 | $0.00008 | $0.00153 |
Grade A, and why
typed-templates 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 3mo 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.
How it starts
The opening of the file, as written. The whole thing — 214 lines — stays where its author put it; the contents beside it link to each section on GitHub.
typed-templates
Schema-validated Handlebars template compilation. audit() verifies template slot names match the schema at authoring time. compile(key, data) validates data at runtime then renders.
Choosing the right factory
| Scenario | Use |
|---|---|
| Each template has a different data shape | createHandlebarSchemaMap |
| Multiple templates share the same data shape | createHandlebarSchemaSingleton |
Setup
import * as z from "zod";
import {
createHandlebarSchemaMap,
getFileContext,
} from "@stephansama/typed-templates";
const { isLinting, templateDirectory } = getFileContext(import.meta.url);
export const templates = createHandlebarSchemaMap(
{
greeting: {
path: "greeting.hbs",
schema: z.object({ name: z.string() }),
},
},
{ templateDirectory },
);
if (isLinting()) await templates.audit();
getFileContext(import.meta.url) resolves templateDirectory to the directory of the current file — not the working directory. isLinting() returns true only when this file is run directly (e.g. node ./templates.ts), preventing audit() from running on every import.
Core Patterns
Compile a template
const output = await templates.compile("greeting", { name: "Alice" });
// data is validated against the schema before compilation
Singleton: one schema, multiple templates
import * as z from "zod";
import {
createHandlebarSchemaSingleton,
getFileContext,
} from "@stephansama/typed-templates";
const { isLinting, templateDirectory } = getFileContext(import.meta.url);
const itemSchema = z.object({
items: z.array(z.object({ key: z.string(), value: z.string() })),
});
export const itemTemplates = createHandlebarSchemaSingleton(
["list.hbs", "table.hbs"],
itemSchema,
{ templateDirectory },
);
if (isLinting()) await itemTemplates.audit();
const output = await itemTemplates.compile("list.hbs", {
items: [{ key: "a", value: "1" }],
});
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.
- 3mo ago First seen · 214 lines · 83 tokens per session scan A faa12e3b62f9
typed-templates is a skill published in the GitHub repository stephansama/packages (5 stars, last pushed 11d ago), licensed MIT. It adds 83 tokens to every session and 1,528 once invoked, about $0.0003 per session on Opus 5.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-31.
typed-templates compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| typed-templatesstephansama/packages | Skill | 5 | 11d ago | MIT | A | 83 | Claude Code, Codex |
| opendia-harnessaeonfun/opendia | Skill | 1.9k | 3d ago | MIT | A | 52 | Claude Code |
| opendiaaeonfun/opendia | Skill | 1.9k | 3d ago | MIT | A | 66 | Claude Code |
| npm-securitybodadotsh/npm-security-best-practices | Skill | 859 | 16d ago | MIT | A | 43 | Claude Code, Codex |
| frontmcp-extensibilityagentfront/frontmcp | Skill | 154 | today | Apache-2.0 | A | 124 | Claude Code, Codex |
| huly-clidearlordylord/huly-mcp | Skill | 64 | yesterday | MIT | A | 56 | Codex |
| censor_messageglincker/glin-profanity | Skill | 70 | yesterday | MIT | A | 16 | Claude Code, Codex |