Skip to content

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.

Nameprompt-library
Version0.1.0
Categoryai-systems
LicenseApache-2.0
Personaengineering
Tagsprompts, yaml, versioning, llm, ai
Sourcetemplates/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

ToolVersionWhy
node>=22Node.js runtime for the SDK and validation scripts

Variables

Required

ProjectName string
Kebab-case project name, used as package name and directory Must be lowercase kebab-case starting with a letter.

Optional

Description string — defaults to A versioned prompt library
Short project description for package.json and README
IncludeSdk bool — defaults to true
Include TypeScript SDK for loading, validating, and rendering prompts
IncludeTests bool — defaults to true
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.ts

Composes with

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..