Skip to content

Releases: HadiFrt20/promptdiff

v0.1.0 — Initial Release

26 Mar 09:06

Choose a tag to compare

promptdiff v0.1.0

ESLint + git diff for LLM prompts. Semantic diff, lint, score, auto-fix, A/B test, and Claude Code hook for .prompt files.

Highlights

  • 16 CLI commands: diff, lint, fix, score, stats, new, compare, migrate, compose, watch, setup, hook, log-to-mlflow, diff-to-mlflow, init, log
  • 10 built-in lint rules: conflicting constraints, role confusion, vague language, missing injection guards, few-shot minimum, word limit conflicts, implicit tone, redundant instructions, missing output format, example quality
  • Semantic diff engine: matches sections by type, classifies changes, rates impact, adds behavioral annotations
  • Quality scorer: 0-100 across 5 dimensions (structure, specificity, examples, safety, completeness)
  • Claude Code hook: auto-lint .prompt files on every edit — errors block, Claude self-corrects
  • A/B testing: compare prompt versions via Claude, GPT-4o, or any Ollama model
  • Prompt composition: extends and includes for DRY prompt management
  • MLflow integration: log prompts, scores, and diffs as experiment runs
  • Custom rules: .promptdiffrc for team-specific lint rules
  • JSON output: --json on every command for CI/CD pipelines

Install

npm install -g promptdiff

No LLM or API keys required. 3 runtime dependencies. 217 tests. 94% coverage.

Quick start

promptdiff new my-agent --template support
promptdiff lint my-agent.prompt
promptdiff score my-agent.prompt
promptdiff diff v1.prompt v2.prompt --annotate
promptdiff setup --project  # Claude Code hook