Skip to content

joseph0926/prompt-smith

prompt-smith

Prompt quality management for Claude Code

한국어 문서 (Korean)

License: MIT Version

ps_demo_02

Core Features:

  • 8-Point Quality Check (LINT / BUILD / Review / Intercept)
  • Eval Mode: A/B testing with test datasets
  • Long Context: 200K token optimization
  • Token Management: Cost estimation & context validation
  • Structured Outputs: 100% JSON validity

When to Use Which Mode?

Situation Recommended Command
"Is this prompt good enough?" LINT /ps:lint <prompt>
"Make this prompt better" Review /ps:r <prompt>
"Just fix it and run" Intercept /ps:a <prompt>
"Design a new prompt" BUILD /ps:build <goal>
"Compare prompt variants" Eval See Eval Mode

Quick Start

Commands at a Glance

Command Description Best For
/ps:r <prompt> Review Mode - Show improvements, await approval Daily use (safe)
/ps:lint <prompt> LINT Mode - Full diagnosis with test cases Debugging prompts
/ps:a <prompt> Intercept Mode - Auto-improve and execute immediately Quick tasks
/ps:build <goal> BUILD Mode - Design from requirements New prompts
/ps:help [topic] Help - Show usage guide and command reference Getting started

Quick Example:

/ps:r Write a function to parse JSON

Shows score (3/10 → 8/10), changes, asks "Proceed? (y/n/e)"


Option 1: Plugin Install (slash commands enabled)

  1. In VS Code, type /plugin to open plugin terminal
  2. Press Tab to navigate to "Add Marketplace"
  3. Enter: joseph0926/prompt-smith
  4. Press Tab to navigate to "Install Plugin"
  5. Select ps@prompt-smith

Install Guide

Option 2: Local Plugin (development)

git clone https://github.com/joseph0926/prompt-smith
claude --plugin-dir ./prompt-smith

Option 3: Skill Only (natural language triggers)

git clone https://github.com/joseph0926/prompt-smith
cp -r prompt-smith/skills/prompt-smith ~/.claude/skills/

Note: This method only enables natural language triggers (use prompt-smith -r), not slash commands.

Usage

Slash Commands (recommended):

/ps:r your prompt here            # Review Mode (single line)
/ps:r your prompt here
with multiple lines               # Review Mode (multiline)
/ps:a your prompt here            # Intercept Mode
/ps:lint your prompt              # LINT Mode
/ps:build requirements            # BUILD Mode

Note: Triple backticks (```) are optional. Plain text and multiline input are fully supported.

Natural Language (alternative):

use prompt-smith -r Your prompt here

Real Examples

LINT Mode (Diagnose)

/ps:lint Analyze user feedback

Output: Score 3/10 → Top 3 issues → Improved prompt → 5 test cases

Review Mode (Safe Improvement)

/ps:r Write a function to parse JSON

Output:

+----------------------------------------------------------+
| Score: 3/10 -> 8/10 (+5)                                 |
+----------------------------------------------------------+
Changes:
- [+] Added: Software engineer role
- [+] Added: Error handling examples
- [~] Modified: Specified return format

Proceed? (y/n/e)

Intercept Mode (Auto-fix)

/ps:a Summarize this document

Output: Auto-improved if +2 points possible → Executes immediately

What's New in v3.x

v3.3.1 (Latest)

Feature Description
Examples & TOCs Expanded examples and added TOCs to long references
Structured Outputs Stronger guidance for schema mismatch and JSON mode caution

v3.3.0

Feature Description
ps:a Token Efficiency Minimal output: [Prompt Smith] 활성화됨 (X→Y점)
ps:r Intent Capture AskUserQuestion for format/detail/constraints/goals

v3.2.0

Feature Description
Eval Mode A/B prompt comparison with test datasets
Long Context 200K token optimization (chunking, placement)
Token Management Cost estimation, context window validation
Structured Outputs 100% JSON validity techniques

v3.0.0 - v3.1.0

Feature Description
Progressive Loading Skills load on-demand
Hooks Auto-LINT on prompt submit (optional)
Agents 3 specialized: optimizer, reviewer, test-generator
GitHub Actions CI/CD integration

See CHANGELOG.md for full release notes.

Modes

Mode Slash Command Natural Language Description
Review /ps:r <prompt> use prompt-smith -r Show improvements, await approval
Intercept /ps:a <prompt> use prompt-smith -a Auto-improve and execute
LINT /ps:lint <prompt> lint this prompt Diagnose existing prompts
BUILD /ps:build <goal> build a prompt for... Design from requirements

8-Point Quality Check

# Dimension Score Note
1 ROLE 0-2 Base
2 CONTEXT 0-2 Base
3 INSTRUCTION 0-2 Base
4 EXAMPLE 0-2 Base
5 FORMAT 0-2 Base
6 SUCCESS_CRITERIA 0-2 Base (v2.7+)
7 STATE_TRACKING 0-2 Extended
8 TOOL_USAGE 0-2 Extended

Base Score: Dimensions 1-6 (max 12 → normalized to 10) Extended Score: All 8 dimensions (normalized)

Documentation

Getting Started

Mode Guides

Advanced (v3.2.0)

Reference

Troubleshooting

Slash commands not working

  1. Verify plugin: In VS Code, type /plugin → check installed list
  2. Restart VS Code or reload Claude Code extension
  3. Try reinstalling: Remove plugin, then reinstall

Score seems wrong

  • Extended items (STATE_TRACKING, TOOL_USAGE) only apply to multi-step or tool-using prompts
  • If N/A, they're excluded from score calculation

Platform

  • Claude Code (CLI / VS Code extension)

Contributing

We welcome contributions! See CONTRIBUTING.md for guidelines.

License

MIT License - see LICENSE