Skip to content

kishormorol/promptlean

Repository files navigation

PromptLean

A curated library of token-efficient prompts — for developers, creators, educators, and everyone.
Every prompt ships with Lean, Balanced, and Max Quality variants.

Live Site License PRs Welcome Prompts Categories


What is PromptLean?

PromptLean is a curated, open-source library of 120 prompts across 14 categories — from code review and SQL optimization to creative writing, journaling, interview prep, and emotional support.

The key idea: most prompts are overengineered. You don't need 200 tokens of preamble for a code review. But sometimes you do need the full rubric. PromptLean gives you the right prompt for the right moment.

Every prompt ships with three variants:

Variant Typical tokens When to use
Lean 18–40 Fast iteration, tight context windows, high-volume API calls
Balanced 50–110 Structured output with consistent format across runs
Max Quality 85–230 External deliverables, research-grade tasks, expert review

The Lean variant saves 80–87% of tokens vs Max Quality with surprisingly little quality loss for well-understood tasks.

Every prompt detail page also includes a Model × Variant comparison table — quality scores (1–5) across 8 frontier models with recommended variant per model.


Features

On every prompt page

  • ⌨ Playground — fill [PLACEHOLDER] slots with live preview and one-click copy of the completed prompt
  • ⊞ Diff view — word-level diff between Max Quality and Lean, side by side with additions/removals highlighted
  • Cost estimator — sidebar dropdown: pick a model, see estimated cost per 1,000 API calls for each variant
  • ★ Favorites — star any prompt to save it; browse page has a "Saved" filter
  • 🔥 Popular badge — appears on cards after 10+ copy-clicks (tracked in localStorage)

On the browse page

  • Token budget filters — ⚡ < 30t · ⚖ 30–100t · ★ 100+t filter chips on the lean variant
  • Saved filter — show only starred prompts
  • Tag + category filters — sidebar with all 14 categories and top 18 tags

On prompt detail pages

  • Workflow stepper — 7 predefined workflows (Code Quality, Writing, Research, Career, Data, Learning, Engineering); shows where the current prompt sits and links to the next step
  • Community variant tabs — extra tabs loaded from community/{id}.json; fuchsia-styled to distinguish from standard variants

Use as an API

All prompts are available as a raw JSON endpoint — no key, no auth:

https://raw.githubusercontent.com/kishormorol/promptlean/main/data/prompts.json
const { prompts } = await fetch(
  'https://raw.githubusercontent.com/kishormorol/promptlean/main/data/prompts.json'
).then(r => r.json());

CORS is open (access-control-allow-origin: *). Full docs on the About page.


What's New

20 new prompts added in the latest expansion (100 → 120):

Category New Prompts
AI / ML Fine-Tuning Dataset Designer · Prompt Chain Architect · RAG Query Optimizer · AI Feature Product Spec · Model Selection Advisor
Entertainment & Creative Game Narrative Designer · Worldbuilding Assistant · Screenplay Scene Writer · Trivia Question Generator · Comedy Sketch Writer
Safety & Crisis Support Boundary-Setting Script · Personal Safety Plan Builder · Conflict De-escalation Guide
Research Literature Review Outliner
Data SQL Query Optimizer
Career & Professional Growth Tailored Cover Letter Writer
Education & Tutoring Flashcard Generator
Engineering API Documentation Writer
Well-being & Mental Health Daily Reflection Coach
General Purpose Problem Reframing Toolkit

Browse all new prompts


Prompts

120 prompts across 14 categories:

Category Count Prompts
Code 10 Code Review · Explain Code to a Junior Dev · Write Unit Tests · Debug & Fix a Bug · Refactor Code · Write Code Documentation · Generate a Regular Expression · Translate Code to Another Language · Developer Relations Consultant · Cybersecurity Strategy Advisor
Data 9 Optimize a SQL Query · Data Cleaning Plan · Exploratory Data Analysis Plan · Statistical Analysis Advisor · Annual Report Analyst (10-K) · Excel Formula Specialist · Unstructured Text to JSON · Data Visualization Advisor · SQL Query Optimizer
Writing 6 Write a Technical Blog Post · Write a Cold Email · Write an Executive Summary · Ad Copy Generator · Social Media Post Optimizer · FAQ Generator
Productivity 7 Meeting Notes → Action Items · Weekly Planner & Prioritization · Draft a Professional Email Reply · Decision Framework · Startup Idea Generator · Personal Finance Advisor · Legal Contract Reviewer
Engineering 8 System Design Review · Write a Product Requirements Document · Incident Postmortem · Architecture Decision Record (ADR) · IT Solution Architect · UX/UI Design Reviewer · Software Project Planner · API Documentation Writer
Research 5 Summarize a Research Paper · Literature Review Synthesis · Debate Both Sides · Venture Capital Analyst · Literature Review Outliner
Education & Tutoring 7 Explain Any Concept · Socratic Tutoring Session · Generate Practice Questions · Lesson Plan Generator · Study Guide Creator · Word Etymology Explorer · Flashcard Generator
Career & Professional Growth 7 Resume Review · Interview Preparation Coach · Write a LinkedIn Post · Salary Negotiation Script · Performance Review Self-Assessment · Negotiation Coach · Tailored Cover Letter Writer
General Purpose 7 Summarize Any Text · Brainstorm Ideas · Explain Like I'm 5 (ELI5) · Give Constructive Feedback · Fallacy Finder · Product Critique & Feedback · Problem Reframing Toolkit
AI / ML 7 LLM Evaluation Rubric · Write a System Prompt · Prompt Optimizer · System Prompt Debugger · Fine-Tuning Dataset Designer · Prompt Chain Architect · RAG Query Optimizer · AI Feature Product Spec · Model Selection Advisor
Well-being & Mental Health 4 Daily Reflection & Journaling Guide · Stress Relief & Reframing · Goal Setting & Action Plan · Daily Reflection Coach
Entertainment & Creative 8 Short Story Generator · Poem Generator · Character Creator · Game Narrative Designer · Worldbuilding Assistant · Screenplay Scene Writer · Trivia Question Generator · Comedy Sketch Writer
Safety & Crisis Support 4 Compassionate Crisis Response · Boundary-Setting Script · Personal Safety Plan Builder · Conflict De-escalation Guide
Supportive Conversation 1 Active Listening & Emotional Support

Browse all prompts


Model Coverage

All prompts include notes and quality benchmarks for 8 frontier models:

Model Provider
gpt-5.4 OpenAI
claude-sonnet-4-6 Anthropic
claude-opus-4-6 Anthropic
gemini-3.1-pro Google
grok-4 xAI
llama-4-scout Meta (open weight)
mistral-large-3 Mistral (open weight)
o1 OpenAI

Each prompt detail page shows a Model × Variant matrix with color-coded quality scores and a recommended variant badge per model.


Pages

Page URL
Home /
Browse /browse.html — search, filter by category/tag/budget/saved
Prompt detail /prompt.html?id=... — variants, playground, diff, cost estimator, workflow, community tabs
Compare /compare.html — 3-column side-by-side view
About /about.html — includes API docs
Contribute /contribute.html — prompt builder + community variant guide

Alternatives comparison

Tool Free Open source Token variants Model benchmarks 14+ categories
PromptLean
AwesomePrompts
FlowGPT Partial
PromptHero Partial
LangChain Hub

PromptLean is the only prompt library that gives you three token-optimized variants per prompt with quality benchmarks across 8 frontier models — free, no sign-up, open source.


Contributing

Add a new prompt

All prompts live in data/prompts.json. Use the Prompt Builder on the contribute page to generate the correct JSON, then open a PR.

Schema:

{
  "id": "your-prompt-id",
  "title": "Your Prompt Title",
  "category": "Code",
  "tags": ["tag1", "tag2"],
  "featured": false,
  "description": "One sentence describing what this prompt does and when to use it.",
  "model_notes": {
    "gpt-5.4": "...",
    "claude-sonnet-4-6": "...",
    "claude-opus-4-6": "...",
    "gemini-3.1-pro": "...",
    "grok-4": "...",
    "llama-4-scout": "...",
    "mistral-large-3": "...",
    "o1": "..."
  },
  "benchmarks": {
    "gpt-5.4":           { "lean": 4, "balanced": 5, "max_quality": 5, "best": "balanced" },
    "claude-sonnet-4-6": { "lean": 5, "balanced": 5, "max_quality": 4, "best": "lean" }
  },
  "variants": {
    "lean":        { "prompt": "...", "token_estimate": 24 },
    "balanced":    { "prompt": "...", "token_estimate": 72 },
    "max_quality": { "prompt": "...", "token_estimate": 160 }
  }
}

Add a community variant

Have a specialized take on an existing prompt? Create community/{prompt-id}.json:

[
  {
    "id": "your-variant-id",
    "label": "🔒 Your Variant Name",
    "author": "your-github-username",
    "description": "One sentence: what does this variant optimize for?",
    "prompt": "Your prompt text. Use [PLACEHOLDER] for user content.",
    "token_estimate": 95
  }
]

Community variants appear as extra tabs on the prompt detail page. See community/code-review.json for a working example.

Full contribution guidelines: contribute.html


Stack

  • Pure HTML + CSS + Vanilla JS — no framework, no build step
  • Data-driven — all prompts in data/prompts.json, community variants in community/
  • GitHub Pages — deployed via GitHub Actions on every push to main
  • Dark mode default, light mode toggle, persisted in localStorage

Local development

git clone https://github.com/kishormorol/promptlean.git
cd promptlean
# open index.html in a browser, or serve with any static server:
python -m http.server 8000
# then visit http://localhost:8000

Attribution

Some prompts are adapted from open-source collections. All adaptations are significantly rewritten into PromptLean's three-tier format with model notes and benchmarks added. Source metadata is stored in data/prompts.json for full traceability.

Source License Prompts adapted
awesome-chatgpt-prompts by Fatih Kadir Akın CC0 1.0 (public domain) 11
LLM-Prompt-Library by Alexander Bilzerian MIT © 2025 Alexander Bilzerian 7
Community Gist by BigDog1400 MIT 1

Full attribution details: ATTRIBUTION.md


License

MIT — use freely, contribute back.

About

Open-source library of token-efficient prompts — 18 prompts, 14 categories, 3 variants each (Lean/Balanced/Max Quality). Covers code, research, creative writing, career, mental health, and more.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors