Prompt Library
Scaffolds a versioned prompt management system using YAML files with structured frontmatter for metadata, model configuration, and typed variables. Includes an optional TypeScript SDK for loading, validating, and rendering prompts programmatically, plus a validation test suite that checks all prompt files against a JSON Schema.
| Name | prompt-library |
| Version | 0.1.0 |
| Category | ai-systems |
| License | Apache-2.0 |
| Persona | engineering |
| Tags | prompts, yaml, versioning, llm, ai |
| Source | templates/prompt-library |
Render it
Three front doors, one catalog. Pick whichever suits the caller.
# CLI
npx @nanohype/sdk render prompt-library --out ./my-app
# SDK
import { LocalSource, renderTemplate } from "@nanohype/sdk";
const result = await renderTemplate(source, "prompt-library", variables);
# MCP — from an agent
get_template({ name: "prompt-library" })Prerequisites
| Tool | Version | Why |
|---|---|---|
node | >=22 | Node.js runtime for the SDK and validation scripts |
Variables
Required
ProjectNamestring- Kebab-case project name, used as package name and directory Must be lowercase kebab-case starting with a letter.
Optional
Descriptionstring — defaults toA versioned prompt library- Short project description for package.json and README
IncludeSdkbool — defaults totrue- Include TypeScript SDK for loading, validating, and rendering prompts
IncludeTestsbool — defaults totrue- Include validation test suite for prompt files
What it produces
15 files. Placeholder names such as __APP_NAME__ are what the renderer substitutes into.
.env.example
.gitignore
biome.json
package.json
prompts/system/example.yaml
prompts/user/example.yaml
README.md
schema/prompt.schema.json
sdk/package.json
sdk/src/__tests__/loader.test.ts
sdk/src/index.ts
sdk/src/types.ts
sdk/tsconfig.json
sdk/vitest.config.ts
tests/validate.tsComposes with
- Pairs with
agentic-loop - Pairs with
eval-harness - Nests inside
monorepo
Composites that use it
- Chrome AI Extension — Chrome extension with AI sidepanel backed by MCP tool servers and optional prompt library..
- Enterprise AI Infrastructure — Full enterprise AI stack with agents, tool servers, safety guardrails, evaluation, prompt management, observability, and Kubernetes deployment..
- AI Evaluation Suite — Standalone evaluation infrastructure with test harness, versioned prompts, and guardrails validation.
- MCP Toolkit — MCP server with evaluation harness, prompt library, and deployment.
- Safe AI Agent — AI agent with safety guardrails, evaluation harness, and prompt management.
- VS Code AI Extension — VS Code extension with AI provider integration, MCP tool servers, and versioned prompt management..