agentleFS
kuker24kuker24/OpenCodeBestFriend/skills/prompt-optimizer/SKILL.md

prompt-optimizer

Skill0 starsChanged 2 months agoMITView on GitHub

Analyze, critique, and optimize system prompts, task instructions, and agent framing. Enhances structural clarity, edge-case handling, negative constraints, and output schema adherence without executing the underlying task. Advisory only; does not mutate installed skills. Use when refining prompt text, reducing ambiguity, or fixing prompt drift. Not for ordinary coding tasks, prose humanizing (humanizer), or writing agent documentation (writing-for-agents).

72 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use continuous-agent-loop, agent-harness-construction and 8 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • junimnjwSkill

    continuous-agent-loop

    Patterns for continuous autonomous agent loops with quality gates, evals, and recovery controls.

    Also in 3 projects that use this

  • junimnjwSkill

    agent-harness-construction

    Design and optimize AI agent action spaces, tool definitions, and observation formatting for higher completion rates.

    Also in 3 projects that use this

  • get-proofpilotSkill

    context-budget

    Audits Claude Code context window consumption across agents, skills, MCP servers, and rules. Identifies bloat, redundant components, and produces prioritized token-savings recommendations.

    Also in 5 projects that use this

  • LangChainSkill

    docker-patterns

    Best practices for Docker containerization and multi-stage builds

    Also in 4 projects that use this

  • royaluniondesign-sysSkill

    deployment-patterns

    Deployment workflows, CI/CD pipeline patterns, Docker containerization, health checks, rollback strategies, and production readiness checklists for web applications.

    Also in 3 projects that use this

  • GSA-TTSSkill

    architecture-decision-records

    Load when a user wants architecture decision records (ADRs) drafted from requirements or a design discussion, asks which decisions need an ADR, or wants an ADR draft reviewed for one-sided trade-offs, weak alternatives or missing requirement links. Not for setting up a project's whole documentation system (project-documentation-system).

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 58 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Advisory Role Only: Never execute the task described within the prompt.

    line 16
  2. Very specific:

    Use clear XML-style tags or markdown blocks (<context>, <input>, <instructions>) to fence user inputs and prevent injection or ambiguity.

    line 38

“Common” is measured: kept by at least 6 in 10 of the 58 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Prompt Optimizer

Advisory specialist for analyzing, critiquing, and optimizing prompt engineering artifacts.

This skill reviews draft prompts, user task instructions, and system directives to maximize clarity, predictability, model steering, and constraint adherence.

Operating Principles

  • Advisory Role Only: Never execute the task described within the prompt; focus exclusively on analyzing and refining the prompt itself.
  • Zero Auto-Mutation: This skill does NOT automatically overwrite installed skills or configuration files in ~/.config/opencode/. It produces recommended prompt text for the user to review and adopt.

Boundaries & Handoffs

NeedRoute
Removing AI-writing tells and polishing natural prosehumanizer / /unslop
Authoring or modifying project SKILL.md, AGENTS.md, or tool definitionswriting-for-agents
Measuring prompt accuracy across test datasets and computing pass@keval-harness
Structuring system prompts for prefix caching efficiencycost-aware-llm-pipeline
Analyzing and optimizing prompt clarity, constraints, and schemasprompt-optimizer

Optimization Framework

Consult references/rubric.md for quality evaluation criteria:

  1. Role & Objective Framing:
    • Establish an unambiguous persona and primary mission.
    • Clarify the operational context and assumptions.
  2. Context & Variable Delimiters:
    • Use clear XML-style tags or markdown blocks (<context>, <input>, <instructions>) to fence user inputs and prevent injection or ambiguity.
  3. Step-by-Step Procedure:
    • Deconstruct complex tasks into numbered, deterministic phases.
    • Mandate pre-flight checks before destructive actions.
  4. Negative Constraints & Guardrails:
    • Replace vague warnings ("be careful") with explicit prohibitions ("Do NOT call tool X before tool Y completes").
    • Define fallback behavior when required information is absent.
  5. Output Schema & Format Locks:
    • Specify exact output formatting (e.g. JSON schema, table columns, markdown headings).
    • Provide minimal, clean few-shot exemplars demonstrating target format.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.