Skip to content

โœจ Prompt Polisher

Live at: aguidetocloud.com/prompt-polisher/ Built: April 2026 Cost: $0 โ€” 100% client-side JavaScript, zero API calls


What It Does

An interactive prompt improvement tool that scores any AI prompt on a 0โ€“100 scale using the CRAFTS framework, then automatically rewrites it with missing elements โ€” all running entirely in the browser with no backend.

Think of it like Grammarly, but for AI prompts โ€” paste a weak prompt, get a stronger one instantly.


Architecture Overview

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚              100% Client-Side (No API Calls)              โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚                                                          โ”‚
โ”‚  User Input                                              โ”‚
โ”‚     โ†“                                                    โ”‚
โ”‚  Domain Detection (tech/business/creative/academic/      โ”‚
โ”‚                    education/email/data)                  โ”‚
โ”‚     โ†“                                                    โ”‚
โ”‚  CRAFTS Scoring (6 pillars, 100 points total)            โ”‚
โ”‚     โ†“                                                    โ”‚
โ”‚  Smart Rewrite Engine (adds missing elements)            โ”‚
โ”‚     โ†“                                                    โ”‚
โ”‚  Output: Polished prompt + score delta + diff + tips     โ”‚
โ”‚                                                          โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚  layouts/prompt-polisher/list.html  (Hugo template)      โ”‚
โ”‚  static/js/polisher.js             (936 lines)           โ”‚
โ”‚  static/css/polisher.css           (coral accent theme)  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

The CRAFTS Scoring Framework

Each prompt is scored across 6 pillars totalling 100 points:

Pillar Points What It Checks
Context 15 Background info, situation, constraints
Role 20 Who the AI should act as (persona/expertise)
Action 25 Clear task/verb โ€” what to do (highest weight)
Format 15 Output structure (list, table, email, code, etc.)
Tone 10 Communication style (professional, casual, etc.)
Scope 15 Boundaries, length, audience, exclusions

Score Labels

Range Label
0โ€“20 Needs Work
21โ€“40 Getting There
41โ€“60 Good Start
61โ€“80 Strong
81โ€“100 Expert Level

Scoring is heuristic/keyword-based โ€” it checks for patterns, keywords, and structural elements in the prompt text. No AI model is involved in scoring.


Smart Rewrite Engine

When a pillar scores low, the rewrite engine adds the missing element using domain-aware suggestions:

Missing Pillar What Gets Added
No Role Adds "Act as a [domain-specific expert]..."
No Context Adds background/scenario relevant to the detected domain
No Format Adds output structure (e.g., "Format as a numbered list...")
No Tone Adds tone guidance (e.g., "Use a professional tone...")
No Scope Adds boundaries (e.g., "Keep it under 500 words...")

7 Supported Domains

The engine detects the domain from keywords in the prompt:

tech ยท business ยท creative ยท academic ยท education ยท email ยท data

Each domain has tailored suggestions (e.g., tech prompts get "Act as a senior software engineer", business prompts get "Act as a management consultant").

Additional Rewrites

  • Strips vague openers ("Can you help me...")
  • Capitalises first letter
  • Adds punctuation if missing
  • Expands very short prompts
  • Appends platform-specific hints when a platform is selected

Frontend Features

Feature Detail
Score dashboard Animated count-up + per-pillar progress bars
Green diff highlighting Added text shown in green (.polisher-added class)
Before/After toggle Side-by-side comparison view
Re-score delta Shows "Original: 22 โ†’ Polished: 78 (+56 points)"
Platform-aware rewrites Dropdown: Any AI / M365 Copilot / ChatGPT / Claude / Gemini
5 example prompts Pre-loaded examples to try the tool
Related prompts 3 prompts from the Prompt Library matched by domain
localStorage history Last 10 polished prompts saved locally
Ctrl+Enter shortcut Quick-polish keyboard shortcut (hidden on mobile)
"Edit & re-polish" Scrolls back to input for iterating
3-step "How it works" Pre-analysis guide, hidden after first use
CRAFTS explainer Full breakdown of each pillar with examples

Accessibility

Feature Implementation
aria-live="polite" Results region announces updates to screen readers
aria-label Input textarea + platform select labelled
tabindex="0" + role="button" History items keyboard-navigable
Enter/Space support History items respond to keyboard
focus-visible styles Visible focus outlines on all interactive elements
prefers-reduced-motion Disables animations for motion-sensitive users

SEO

  • JSON-LD WebApplication schema in the Hugo template
  • Body class: page-polisher for page-specific CSS

CSS โ€” polisher.css (Coral Accent #FF6B6B)

Element Detail
Accent Coral #FF6B6B
Score bars Animated width transitions per pillar
Green diff .polisher-added = green text + background
Compare view Before (red tint) / After (green tint) panels
History Clickable items with hover/focus states
Mobile Ctrl+Enter hint hidden, stacked layout

Key Design Decisions

Decision Rationale
Zero API calls Runs entirely in browser โ€” no cost, no latency, no privacy concerns
Heuristic scoring Fast, predictable, and transparent โ€” users understand why they scored low
Domain detection Tailored rewrites feel relevant, not generic
CRAFTS acronym Memorable framework that teaches prompt engineering principles
Cross-links to Prompt Library "Here are 3 prompts related to your domain" โ€” drives discovery
localStorage history Users can revisit and re-polish previous prompts

File Inventory

File Lines Purpose
layouts/prompt-polisher/list.html ~190 Hugo template โ€” UI structure + JSON-LD
static/js/polisher.js 936 Core logic โ€” scoring, rewriting, UI
static/css/polisher.css ~670 Styling โ€” coral accent theme
content/prompt-polisher/_index.md 5 Front matter only (title/description/layout)

Remaining TODOs

Feature Status
Teach Me interactive walkthrough ๐Ÿ”ฒ Planned
Share Score card (social sharing) ๐Ÿ”ฒ Planned
Custom OG image for social previews ๐Ÿ”ฒ Planned

Last updated: 11 April 2026