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 GitHub
Author Fatih Kadir Akın
Namespace @f/prompts.chat
Category ai
Version 1.0.0
Stars 143,993
Downloads 27
self.md verified
Table 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.

Playground

Reason

Building effective AI prompts is challenging. Developers often struggle with:

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:

  1. Clone a clean copy of the repository (removes .github, .claude, packages/, dev scripts)
  2. Install dependencies
  3. 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:


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

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

FormatExamplePattern Name
${var}${name}dollar_curly
${var:default}${name:World}dollar_curly
{{var}}{{name}}double_curly
[[var]][[name]]double_bracket

…(truncated)

Source

View on GitHub

Tags: ai promptsaiskillschatgptclaudellmpromptsai-toolsproductivityskills