Skill
Prompt optimizer
Turns rough intent or a weak prompt into a reliable one — diagnosing why output is inconsistent, restructuring the instruction, and adapting it across models.
- Technology
- prompt-optimizer
- version 1.1.0
- MIT license
When it loads
Your assistant reads this description and loads the skill when a request matches it. Nothing else is in context until then.
Turns rough intent or a weak prompt into a reliable one — diagnosing why output is inconsistent, restructuring the instruction, and adapting it across models. Use this when a prompt is not producing what was wanted, when output varies run to run, when writing a prompt for a repeated task, when moving a prompt between models, or when someone describes what they want an AI to do and needs it written properly.
Add it to your assistant
This skill ships in the Technology department, with 18 others.
Claude Code
/plugin marketplace add cbrock84/headcount
/plugin install technology@headcount
ChatGPT and Codex
Add Headcount: Technology to ChatGPT from the ChatGPT plugin directory.
GitHub Copilot CLI
copilot plugin marketplace add cbrock84/headcount
copilot plugin install technology@headcount
Cursor
The repository is a Cursor plugin marketplace. On a Teams or Enterprise plan, import it under Dashboard, Plugins & MCPs, New marketplace, Import from a repository. To try this department on one machine, copy plugins/technology into ~/.cursor/plugins/local/ and reload the window.
Gemini CLI
Gemini CLI installs one skill at a time:
gemini skills install https://github.com/cbrock84/headcount.git --path plugins/technology/skills/prompt-optimizer
The skill is identical in every tool. The Copilot, Cursor and Gemini steps follow each tool's published format and have not been run end to end here.
What the skill tells the assistant
The full text, as it installs. View the source on GitHub.
Diagnose before rewriting
Bad output has a small number of causes, and the fix differs entirely by cause:
- Underspecified — the model is guessing at something you know. Most common by far.
- Overspecified — so many constraints that they conflict, and the model satisfies some arbitrarily.
- Wrong shape — asking for a paragraph when you want a table, or a decision when you want options.
- No success criterion — nothing in the prompt says what good looks like, so quality varies with nothing.
- Buried instruction — the actual task is in the middle of context and gets weighted like context.
- Genuinely hard — the task needs information the model does not have, and no prompt fixes that. Say so rather than iterating.
Read the actual bad output before rewriting. The failure mode names the cause.
What reliably helps
- Say what to do, not what to avoid. Negative instructions are weaker than positive ones and often summon the thing named.
- Give the shape of the output — the sections, the length, the format. If format matters, show an example rather than describing it.
- Provide one worked example where the task is judgment-heavy. Examples carry more instruction per token than description does, and one good one beats three mediocre.
- State the audience and purpose. "For a technical reader deciding whether to adopt this" changes the output more than most adjectives.
- Ask for reasoning before the answer on analytical tasks — order matters, since a conclusion stated first is defended rather than derived.
- Give an out. Tell it what to do when the input is insufficient, or it will invent something.
What does not help
Politeness, threats, incentives, insisting on importance, and stacked superlatives. These consume tokens and change little. So does repeating an instruction in three phrasings — it usually signals the instruction is unclear rather than reinforcing it.
Structure
Put the task first, context second, and any output format last where it will be closest to generation. Long context between instruction and output is where instructions get lost.
For repeated prompts, separate the fixed instruction from the variable input explicitly, so the model can tell which is which.
Testing
A prompt is not done because one run looked good. Run it three to five times on the same input and look at the variance — that is the actual quality. Then run it on the awkward inputs: empty, far too long, ambiguous, adversarial.
Fix the worst case, not the average. The average is what you see in testing; the worst case is what your users see.
Producing variations
When a prompt matters enough to optimize, produce genuinely different versions rather than variants of one phrasing:
- Terse — instruction only, minimal framing. Often outperforms, and it is cheapest.
- Structured — explicit sections, numbered constraints, defined output shape.
- Exemplar-led — one worked example carrying most of the instruction.
- Role-framed — audience and stance set before the task.
Test all four on the same inputs. Which wins is genuinely hard to predict, and the intuition that a longer prompt is better is wrong about as often as it is right.
Scoring output
Judge against criteria written before seeing results, or you will rationalize whatever came back. For most tasks: did it do the task, is it correct, is it the right shape and length, is it usable without editing. Score each run rather than forming an overall impression — impressions are dominated by the best run, and the worst run is what matters.
Moving between models
Do not assume a prompt transfers. Models differ in how they weight system versus user instruction, how they handle long context, and how they respond to formatting. Re-test on the target model, and be especially suspicious of prompts tuned through many small iterations — those are often fitted to one model's quirks.
Never
- Rewrite a prompt before reading the failing outputs. You will fix the wrong thing.
- Change more than one thing between test runs.
- Judge a change on a single output. Sampling variance will fool you.
- Keep an instruction because it was already there. Every line has to earn its tokens.
Company context
Before answering, look for the company profile: the file .headcount/company.md in the working folder, or a document titled "Headcount company profile" in the conversation, the project's instructions or files, or saved memory. Where there is one, answer for that company and do not ask for anything it already states. Where it conflicts with what the person says now, the person is right, and say that the profile looks out of date. Where there is none, carry on: ask only for the facts this question turns on, and mention once that executive:company-onboarding records them so they are not asked again.
Other departments
A skill written as department:skill belongs to another department, and each department installs separately. If the one a question belongs to is not installed, name the department that owns it and how to add it, and do not improvise its work. references/departments.md in this skill lists each department this skill names, with the install step for Claude Code and for ChatGPT.
Files it ships with
Loaded only when the skill calls for them.
More in Technology
- AI workflow architect
Designs AI systems, automations, and agent workflows for a business — identifying which manual work is worth automating, how to structure the system, which tools fit, and what cou…
- API design
Designs interfaces that survive their consumers — resource modeling, errors, versioning, pagination, and compatibility.
- Branch and worktree workflow
Isolates feature work in its own branch or worktree and integrates it cleanly when done.
- Chief Technology Officer / CIO
Owns architecture, engineering delivery, infrastructure, data platform, and internal systems.
- Cloud infrastructure
Designs and runs cloud infrastructure — environments, infrastructure as code, networking and isolation, scaling, and cost.
- Code review
Conducts and responds to code review — reviewing a change for correctness, design, and risk, and evaluating review feedback received on your own work.
- Completion verification
Verifies that work is actually complete before it is claimed to be — running the checks, reading the output, and confirming the original request was satisfied rather than approxim…
- Data migration
Moves data from one system to another without losing it or corrupting it — profiling the source before mapping, deciding between big-bang and parallel-run cutover, reconciling cou…
- Implementation planning
Turns a spec or requirement into a written plan a separate session or agent can execute, then drives that plan through review checkpoints.
- Observability and reliability
Makes systems debuggable and reliably operable — instrumentation, alerting that is worth waking for, service objectives, and learning from failure.
- Parallel agent delivery
Splits work across multiple agents or sessions running at once, keeping their surfaces disjoint so results merge cleanly.
- Release and deployment
Ships changes safely and often — pipelines, deployment strategies, feature flags, rollback, and database changes.
- Skill authoring
Writes and revises agent skills so they trigger at the right moments and give usable instruction when they do.
- Solution architecture
Designs system structure and makes architectural decisions defensible — boundaries, coupling, trade-offs, and recording why.
- Solution exploration
Explores the problem and the range of possible approaches before any code is written — clarifying what is actually being asked, surfacing options with their tradeoffs, and converg…
- Systematic debugging
Finds the root cause of a bug, test failure, or unexpected behavior before proposing any fix.
- Technical debt management
Makes technical debt visible and decidable — distinguishing real debt from mess, quantifying its cost, and arguing for remediation in business terms.
- Test-driven development
Drives implementation by writing a failing test first, then the smallest code that passes it.