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.svg" alt="Measured on agentmods" 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 | $0.00042 | $0.00764 |
| Sonnet 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 7d 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.
- 7d 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 1mo ago), licensed MIT. It adds 83 tokens to every session and 1,528 once invoked, about $0.0004 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-31.
Other skills, from other repositories
opendia-harness
Install, configure, and troubleshoot OpenDia for Grok Build (and other MCP harnesses). Use when setting up the plugin, config.toml MCP entry, ports, extension disconnects, tool timeouts, or tunnel mode.
opendia
Drive the user's real browser through OpenDia MCP (logged-in sessions, cookies, wallets, bookmarks, history). Use when automating Chrome/Firefox for social posts, form fills, multi-tab research, local webapp testing, or any task that needs the user's existing browser profile — not a disposable cloud browser.
npm-security
Prevent JavaScript/TypeScript projects from supply-chain attacks across package managers like npm, pnpm, yarn, bun, and deno. Use whenever planning, installing, updating packages or configuring package managers.
frontmcp-extensibility
Use when extending FrontMCP beyond the core SDK by integrating external npm packages, libraries, or third-party services into providers and tools. Covers VectoriaDB for in-memory semantic and vector search (ML-based embeddings or TF-IDF keyword engines, with persistence) and the tamper-evident, hash-chained skill…
huly-cli
Operate Huly through the @firfi/huly-cli executable. Use when a coding agent needs to authenticate, switch Huly workspaces or projects, discover commands, query structured Huly data, or perform confirmed Huly mutations from a shell or automation workflow.
javascript-expert
Expert-level JavaScript development with modern ES2024+ features, Node.js, npm ecosystem, and best practices. Use when the user mentions ECMAScript, ES2024, Node.js, npm, or web, or when the task involves Modern JavaScript, Node.js Development, Modern Tooling, or Functional Programming.