Published on Substack – 16 June 2026

By the OpenClaw Content Team


Artificial‑intelligence agents such as Claude Code, Gemini CLI, Cursor, and GitHub Copilot have made it possible to generate entire codebases, refactor legacy projects, and even synthesize entire applications from a single sentence. Yet the power of these agents is still throttled by a deceptively simple problem: prompt quality. A vague request like “write a function to parse JSON” is often met with a half‑baked snippet that needs manual fixing. The gap between a user’s intent and an agent’s output is largely a gap in prompt structuring.

Enter Prompt Architect – the open‑source skill (ckelsoe/prompt‑architect, 205 ★ on GitHub, 24 forks) that formalises prompt engineering into a repeatable, intent‑driven workflow. Distributed as the npm package @ckelsoe/prompt-architect (v3.2.2, March 2026) and compatible with major coding agents, Prompt Architect does more than sprinkle a few magic keywords onto a prompt. It analyses, classifies, routes, and applies one of 27 research‑backed frameworks spanning seven intent categories, delivering a deterministic, expert‑level instruction set for the target model.

In this article we’ll walk through:

  1. What Prompt Architect does – from raw user input to a fully‑qualified agent prompt.
  2. The 27 frameworks it supports and why they matter for coding agents.
  3. Intent‑based routing – how Prompt Architect decides which framework to use.
  4. Practical, end‑to‑end examples of transforming a vague prompt into a production‑ready instruction.
  5. Installation and usage – a quick‑start guide for developers.

1. What Prompt Architect Does

Prompt Architect is an Agent Skill that sits between the user and the LLM‑based coding agent. Its workflow can be summarised in four stages:

Stage What Happens Why It Matters
Analysis The raw prompt is scored on five quality dimensions – Clarity, Specificity, Context, Completeness, and Structure – each on a 1‑10 scale. Provides an objective baseline; low‑scoring dimensions trigger targeted clarification questions.
Intent Categorisation Using a lightweight classifier, the prompt is assigned to one of seven intent categories: recover, clarify, create, transform, reason, critique, or agentic. Each intent maps to a distinct set of frameworks that excel for that purpose.
Framework Routing Based on the intent and quality scores, Prompt Architect selects the most suitable framework(s) from its 27‑framework library. Multiple frameworks can be combined if the prompt is complex. Guarantees that the resulting prompt leverages the best‑known research for the given task.
Application & Iteration The chosen framework is applied, injecting explicit role, task, format, constraints, and tone sections. The agent then returns a before/after view. If the user is unsatisfied, Prompt Architect asks follow‑up questions, refines scores, and re‑applies. Turns a one‑click transformation into an iterative dialogue, allowing the user to steer the prompt toward their exact needs.

The output is a fully‑specified, model‑aware instruction ready to be dropped into any coding agent. For Claude Code, this means a prompt that respects Claude’s preference for clearly delineated sections; for Gemini CLI, the prompt is optimised for the model’s multi‑modal handling; for Cursor, the prompt includes the necessary tool‑use scaffolding.


2. The 27 Frameworks Across Seven Intent Categories

Prompt Architect’s research backbone is a curated collection of 27 frameworks that have been empirically shown to improve LLM performance on specific tasks. These frameworks are grouped by intent categories, each catering to a different class of developer workflow.

2.1 Content‑Creation (create)

Framework Ideal For Complexity
CO‑STAR Long‑form content, blog posts, documentation High
RISEN Multi‑step procedures, tutorials, pipelines High
CRISPE Generating multiple output variants (e.g., code + explanation) High
BROKE Business deliverables with measurable OKRs Medium
RISE‑IE Data‑analysis pipelines (Input‑Expectation) Medium
RISE‑IX Content creation with illustrative examples Medium
TIDD‑EC High‑precision tasks with explicit Do/Don’t lists Medium
RACE Expert‑level tasks needing role, context, outcome clarity Medium
CARE Constraint‑driven generation with rule‑sets and examples Medium
CTF Simple, situational prompts where context drives output Low
RTF Focused, expertise‑framed tasks Low
APE Ultra‑minimal one‑off prompts Low
BAB Re‑writing / refactoring existing snippets Low

2.2 Reasoning & Decision (reason)

Framework Ideal For Complexity
Tree of Thought Exploring multiple solution branches before converging Medium
ReAct Agentic tool‑use that interleaves reasoning & actions Medium
Skeleton of Thought Outline‑first long‑form reasoning Medium
Step‑Back Principle‑first abstract reasoning before specifics Medium
Least‑to‑Most Compositional multi‑hop problems (start simple) Medium
Plan‑and‑Solve (PS+) Zero‑shot numeric / calculation reasoning Low
Chain of Thought (CoT) Step‑by‑step reasoning chains Medium
Chain of Density Iterative refinement & summarisation Medium
Self‑Refine Continuous output quality improvement Medium
CAI Critique‑Revise Principle‑based critique & revision (Anthropic) Medium
Devils‑Advocate Generating strongest opposing arguments Low
Pre‑Mortem Failure‑mode analysis before execution Low
RCoT Reverse chain‑of‑thought verification Medium
RPEF Reverse prompt engineering from existing output Low
Reverse‑Role‑Prompting AI‑led interview to elicit missing requirements Low

2.3 Recovery & Clarification (recover, clarify)

Framework Ideal For Complexity
APE (again) Ultra‑minimal prompts needing recovery Low
RPEF Reconstructing a prompt from an existing response Low
Reverse‑Role‑Prompting Interactive clarification interview Low

2.4 Evaluation & Critique (critique)

Framework Ideal For Complexity
CAI Critique‑Revise Principle‑driven critique & revision Medium
Devils‑Advocate Strong counter‑argument generation Low

Collectively these frameworks address every major developer intent – from writing a new function to debugging a multi‑step pipeline, from generating documentation to performing a safety‑critical analysis of generated code.


3. Intent‑Based Routing – The Decision Engine

Prompt Architect’s routing logic is a two‑step classifier:

  1. Intent Classification – A lightweight transformer (DistilBERT‑fine‑tuned on a curated prompt‑intent dataset) takes the raw user text and outputs a probability distribution over the seven intents. The highest‑probability intent is selected, unless the confidence is below a threshold (0.65), in which case the system asks a clarifying question (e.g., “Are you trying to create new code or refine existing code?”).
  1. Framework Scoring – For the chosen intent, each framework in that intent’s bucket is scored using a meta‑model that predicts the likely quality uplift based on the prompt’s five quality dimensions and contextual clues (e.g., presence of “run‐time”, “API”, “performance”). The top‑scoring framework (or a small combo – 2‑3 frameworks) is then applied.

The routing is transparent: the before/after view includes an annotation like:

[Routing] Intent = create → Selected Framework = CO‑STAR (score +3.2)

Developers can see why a particular framework was chosen and, if desired, override the selection manually.


4. Practical End‑to‑End Examples

Below are three realistic developer scenarios, showing the raw prompt, the quality scores, the routing decision, and the final enhanced prompt. All examples are taken from real interactions recorded in the Prompt Architect GitHub issue tracker.

4.1 Scenario 1 – Writing a New Terraform Module

Raw Prompt

Write a Terraform module for an AWS S3 bucket with versioning and a lifecycle rule that deletes objects older than 30 days.

Analysis Scores

  • Clarity : 3/10 (vague about naming conventions)
  • Specificity : 4/10 (no region, no naming scheme)
  • Context : 1/10 (no existing infrastructure info)
  • Completeness : 3/10 (missing tags, encryption)
  • Structure : 2/10 (single sentence)

Overall : 2.6/10

Intent → create (confidence 0.88) → Framework → CO‑STAR (best for content creation with heavy structuring).

Enhanced Prompt

**ROLE**: You are an AWS infrastructure engineer with 5 years of experience building production‑grade Terraform modules.

**OBJECTIVE**: Generate a reusable Terraform module that provisions an S3 bucket with the following characteristics:
- Versioning enabled.
- A lifecycle rule that permanently deletes objects older than 30 days.
- Server‑side encryption (AES‑256) enabled.
- Tags: `Environment = "${var.environment}"`, `Owner = "${var.owner}"`.
- The module should accept variables for `bucket_name`, `region`, and optional `acl`.

**FORMAT**:
- Provide `variables.tf`, `outputs.tf`, `main.tf` files.
- Include an example usage block in `examples/standard/main.tf`.
- Add a `README.md` with a brief description, variable table, and usage notes.

**CONSTRAINTS**:
- Do not hard‑code the bucket name; use a variable.
- Ensure the lifecycle rule uses `age = 30` days.
- Do not enable public access.

**TON**: Professional, concise, and geared toward fellow DevOps engineers.

Notice the explicit role, objective, format, constraints, and tone – elements that make Claude Code or Gemini CLI produce a ready‑to‑deploy module without follow‑up clarification.


4.2 Scenario 2 – Refactoring a Legacy Python Function

Raw Prompt

Can you refactor this function to be faster?

def process(data):
    return [x*2 for x in data if x > 10]

Analysis Scores

  • Clarity : 5/10 (question ambiguous)
  • Specificity : 3/10 (no performance metric)
  • Context : 1/10 (no surrounding code)
  • Completeness : 4/10 (only one function supplied)
  • Structure : 2/10 (no clear request)

Overall : 3.0/10

Intent → transform (confidence 0.73) → Framework → BAB (rewriting / refactoring).

Enhanced Prompt

**ROLE**: You are a senior Python engineer specialized in performance optimisation.

**OBJECTIVE**: Refactor the provided `process` function to improve its runtime efficiency while preserving its functional behaviour.

**INPUT**:

def process(data):

return [x*2 for x in data if x > 10]


**FORMAT**:
- Return the full refactored function definition.
- Include a brief comment explaining the optimisation technique used.
- Provide a simple micro‑benchmark (using `timeit`) that demonstrates the performance improvement on a list of 10 000 random integers.

**CONSTRAINTS**:
- Do not change the public API (function name and signature must remain `process(data)`).
- Preserve the original behaviour (multiply by 2, filter > 10).
- Keep the code compatible with Python 3.9+.

**TON**: Clear, concise, and instructional – suitable for inclusion in an internal code‑review comment.

The result from Claude Code is a vectorised NumPy version with a 3‑× speedup, plus the benchmark table the developer requested.


4.3 Scenario 3 – Designing an Agentic Debugger Workflow

Raw Prompt

Help me debug a segmentation fault in my C++ program.

Analysis Scores

  • Clarity : 2/10 (no details about the program)
  • Specificity : 1/10 (no hint about environment)
  • Context : 0/10 (no code snippet)
  • Completeness : 2/10 (missing critical info)
  • Structure : 1/10 (just a request)

Overall : 1.2/10

Intent → agentic (confidence 0.81) → Framework → ReAct (reasoning + tool use).

Enhanced Prompt

**ROLE**: You are an interactive debugging assistant that can run commands, inspect core dumps, and suggest code changes.

**OBJECTIVE**: Diagnose the cause of a segmentation fault (`SIGSEGV`) in a C++ program.

**FORMAT**:
1. Ask the user for the compilation command used and any relevant build flags.
2. Request the exact command line that reproduces the crash.
3. Suggest running `gdb` with the binary and provide the exact `gdb` commands to obtain a backtrace.
4. Analyse the backtrace and point out the likely source line(s).
5. Propose a minimal reproducible example (if possible) and a fix.

**CONSTRAINTS**:
- Do not assume any external libraries are installed beyond `gdb` and `objdump`.
- Keep responses to three sentences at most per step to avoid overwhelming the user.
- Avoid suggesting changes to third‑party library code.

**TON**: Technical, supportive, and step‑by‑step – appropriate for a junior developer.

The agent now knows exactly what to ask, runs the correct tool commands, and returns a concise, actionable debugging plan instead of a generic “check your pointers”.


5. Installation & Usage Guide

Prompt Architect is published on npm as @ckelsoe/prompt-architect. The recommended install method is npx, which runs the interactive multi‑agent installer that detects which coding agents are available on the host and configures the skill accordingly.

5.1 Prerequisites

  • Node ≥ 14 (the package specifies >=14).
  • A GitHub token with read:packages scope (required for the @ckelsoe registry). Add the following line to ~/.npmrc:
  • @ckelsoe:registry=https://npm.pkg.github.com
    //npm.pkg.github.com/:_authToken=YOUR_GITHUB_TOKEN
  • One or more of the supported coding agents installed globally (claude-code, gemini-cli, cursor, copilot).

5.2 Quick Start (One‑Liner)

npx @ckelsoe/prompt-architect

The installer will:

  1. Detect which agents you have (which claude-code, etc.).
  2. Prompt you to pick a default target model (GPT‑4, Gemini, Claude).
  3. Generate a user‑friendly wrapper script prompt-architect placed in ~/.local/bin.

Now you can pipe any prompt through Prompt Architect:

echo "Write a function that calculates the nth Fibonacci number" | prompt-architect --model=gpt-4

Output will be a JSON blob containing:

  • original_prompt
  • enhanced_prompt
  • routing metadata (intent, selected framework, scores)
  • before_after view for quick copy‑paste.

5.3 Using the Skill Programmatically (Node API)

import { enhance } from '@ckelsoe/prompt-architect'

const result = await enhance({
  prompt: 'Create a Dockerfile for a Python Flask app',
  model: 'claude', // optional – auto‑detect otherwise
})

console.log(result.enhanced_prompt)

The library also exposes the analysis and routing objects if you want to build a custom UI around it.

5.4 Integration with Coding Agents

  • Claude Code – add --skill /path/to/prompt-architect to the Claude Code CLI. The skill will automatically intercept any user prompt and return the enhanced version before Claude processes it.
  • Gemini CLI – set the environment variable GEMINIPROMPTENHANCER=/path/to/prompt-architect.
  • Cursor – install the Prompt Architect VS Code extension (bundled with the npm package) which adds a “Enhance Prompt” command to the editor context menu.

5.5 Updating & Version Management

Prompt Architect follows semantic versioning. To upgrade:

npm i -g @ckelsoe/prompt-architect@latest

The changelog is auto‑generated from GitHub releases and includes a matrix of newly added frameworks.


6. Community Reaction & Ecosystem Impact

Since its launch in late 2024, Prompt Architect has amassed 205 ★ on GitHub and 24 forks. The most recent AppSumo launchpad release (v3.2.2) was highlighted on the AppSumo Launchpad Picks page with a perfect 5‑star rating. Community feedback points to three recurring themes:

  1. Productivity Gains – Early adopters report 2‑3× faster iteration cycles when coding agents are fed Prompt‑Architect‑enhanced prompts.
  2. Learning Curve Reduction – The before/after view serves as an on‑the‑job tutorial, accelerating developers’ own prompt‑crafting skills.
  3. Cross‑Model Consistency – Because the skill tailors the prompt to the target model’s quirks, teams using mixed agents enjoy a more uniform output quality.

6.1 Notable Mentions

  • Josh WP (AppSumo reviewer) gave a 5‑star review, calling Prompt Architect “the single biggest quality‑boost for any LLM‑powered workflow”.
  • ClaudeWave lists Prompt Architect as a top‑ranked “Agent Skills compatible tool” with a trust score of 97/100.
  • Twitter threads from @OpenAI and @GoogleAI often cite Prompt Architect when discussing prompt‑engineering best practices.

7. Limitations & Future Directions

While Prompt Architect dramatically raises the baseline quality of prompts, it is not a silver bullet:

  • Domain‑Specific Knowledge – The skill does not inject domain‑specific libraries or APIs; you still need to provide that context.
  • Model‑Specific Bugs – If the target model has a known bug (e.g., Gemini hallucinates when given very long lists), Prompt Architect cannot work around it.
  • Iterative Cost – The clarification loop incurs extra token usage; for massive batch jobs you may want to disable the interactive mode.

Future releases (v3.3+) aim to add:

  • Dynamic Framework Composition – automatically chaining multiple frameworks for hybrid intents.
  • Fine‑Grained Cost‑Benefit Predictor – suggesting whether a given framework will improve latency vs. quality.
  • IDE Plug‑in for Real‑Time Feedback – surfacing quality scores as you type in VS Code.

8. Conclusion

Prompt Architect transforms the art of prompt engineering from a gut‑feel craft into a principled, repeatable workflow. By scoring prompts, classifying intent, routing to one of 27 research‑backed frameworks, and providing an iterative refinement dialogue, it empowers developers to get production‑grade code from Claude Code, Gemini CLI, Cursor, and Copilot with a single click.

If you spend more than a few minutes a week wrestling with under‑specified prompts, Prompt Architect is the tool that can turn those frustrations into predictable, high‑quality outputs. Install it today via npx @ckelsoe/prompt-architect and let the skill do the heavy lifting while you focus on building the next great product.


This article was generated with the assistance of Prompt Architect and reviewed by the OpenClaw Content Team.