prompts.chat
Access thousands of AI prompts and skills directly in your AI coding assistant. Search prompts, discover skills, save your own, and improve prompts with AI.
View on GitHubTable of content
Access thousands of AI prompts and skills directly in your AI coding assistant. Search prompts, discover skills, save your own, and improve prompts with AI.
Installation
npx claude-plugins install @f/prompts.chat/prompts.chat
Contents
Folders: bin, scripts, src
Files: API.md, README.md, package-lock.json, package.json, tsconfig.json, tsup.config.ts
Documentation
A comprehensive developer toolkit for building, validating, and parsing AI prompts. Create structured prompts for chat models, image generators, video AI, and music generation with fluent, type-safe APIs.
Reason
Building effective AI prompts is challenging. Developers often struggle with:
- Inconsistent prompt structure — Different team members write prompts differently, leading to unpredictable AI responses
- No type safety — Typos and missing fields go unnoticed until runtime
- Repetitive boilerplate — Writing the same patterns over and over for common use cases
- Hard to maintain — Prompts scattered across codebases without standardization
- Multi-modal complexity — Each AI platform (chat, image, video, audio) has different requirements
prompts.chat solves these problems by providing a fluent, type-safe API that guides you through prompt construction with autocomplete, validation, and pre-built templates for common patterns.
Installation
npm install prompts.chat
CLI
Create a New Instance
Scaffold a new prompts.chat deployment with a single command:
npx prompts.chat new my-prompt-library
This will:
- Clone a clean copy of the repository (removes
.github,.claude,packages/, dev scripts) - Install dependencies
- Launch the interactive setup wizard to configure branding, theme, auth, and features
Interactive Prompt Browser
Browse and search prompts from your terminal:
npx prompts.chat
Navigation:
↑/↓orj/k— Navigate listEnter— Select prompt/— Search promptsn/p— Next/Previous pager— Run prompt (open in ChatGPT, Claude, etc.)c— Copy prompt (with variable filling)C— Copy raw prompto— Open in browserb— Go backq— Quit
Quick Start
import { builder, chat, image, audio, variables, quality } from 'prompts.chat';
// Build structured text prompts
const prompt = builder()
.role("Senior TypeScript Developer")
.task("Review the following code for bugs and improvements")
.constraints(["Be concise", "Focus on critical issues"])
.variable("code", { required: true })
.build();
// Build chat prompts with full control
const chatPrompt = chat()
.role("expert code reviewer")
.tone("professional")
.expertise("TypeScript", "React", "Node.js")
.task("Review code and provide actionable feedback")
.stepByStep()
.json()
.build();
// Build image generation prompts
const imagePrompt = image()
.subject("a cyberpunk samurai")
.environment("neon-lit Tokyo streets")
.shot("medium")
.lens("35mm")
.lightingType("rim")
.medium("cinematic")
.build();
// Build music generation prompts
const musicPrompt = audio()
.genre("electronic")
.mood("energetic")
.bpm(128)
.instruments(["synthesizer", "drums", "bass"])
.build();
// Normalize variable formats
const normalized = variables.normalize("Hello {{name}}, you are [ROLE]");
// → "Hello ${name}, you are ${role}"
// Check quality locally (no API needed)
const result = quality.check("Act as a developer...");
console.log(result.score); // 0.85
Modules
- Variables — Variable detection and normalization
- Similarity — Content deduplication
- Builder — Structured text prompts
- Chat Builder — Chat/conversational prompts
- Image Builder — Image generation prompts
- Video Builder — Video generation prompts
- Audio Builder — Music/audio generation prompts
- Quality — Prompt validation
- Parser — Multi-format parsing
🔧 Variables
Universal variable detection and normalization across different formats.
import { variables } from 'prompts.chat';
// Detect variables in any format
const detected = variables.detect("Hello {{name}}, welcome to [COMPANY]");
// → [{ name: "name", pattern: "double_curly" }, { name: "COMPANY", pattern: "single_bracket" }]
// Normalize all formats to ${var}
const normalized = variables.normalize("Hello {{name}}, you are [ROLE]");
// → "Hello ${name}, you are ${role}"
// Extract variables from ${var} format
const vars = variables.extractVariables("Hello ${name:World}");
// → [{ name: "name", defaultValue: "World" }]
// Compile template with values
const result = variables.compile("Hello ${name:World}", { name: "Developer" });
// → "Hello Developer"
// Get pattern descriptions
variables.getPatternDescription("double_bracket"); // → "[[...]]"
Supported Formats
| Format | Example | Pattern Name |
|---|---|---|
${var} | ${name} | dollar_curly |
${var:default} | ${name:World} | dollar_curly |
{{var}} | {{name}} | double_curly |
[[var]] | [[name]] | double_bracket |
…(truncated)