بنقرة واحدة
prompt-optimizer
Analyzes, improves, and restructures LLM prompts for clarity, efficiency, and reliability
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Analyzes, improves, and restructures LLM prompts for clarity, efficiency, and reliability
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Analyzes project structure, module dependencies, imports, and entry points to generate architecture diagrams in Mermaid format
Analyzes ETL and data pipeline code for optimization opportunities across Python (Pandas, PySpark), Rust (polars, datafusion), SQL, and general pipeline descriptions
Validates environment variable configurations and config files (YAML, TOML, JSON, .env) for missing required variables, type mismatches, deprecated keys, naming convention violations, secret exposure risks, and invalid value ranges
Analyzes code for performance bottlenecks including N+1 queries, O(n^2) or worse algorithms, unnecessary allocations, sync I/O in async contexts, excessive cloning, missing caching opportunities, and large payload transfers. Supports Rust, Python, TypeScript, and Go.
Analyzes source code for common security vulnerabilities including SQL injection, XSS, command injection, hardcoded secrets, insecure deserialization, path traversal, and SSRF
Agent reviews its own work before presenting to the user. Catches errors, style violations, and omissions before the user sees the output.
| name | prompt-optimizer |
| description | Analyzes, improves, and restructures LLM prompts for clarity, efficiency, and reliability |
| version | 1.0.0 |
| author | go-on-team |
| tags | ["prompt","llm","prompt-engineering","optimization","ai"] |
| min_go_on_version | 1.0.0 |
Analyzes existing prompts or constructs new ones following prompt engineering best practices. Provides structured feedback on system prompts, user prompts, and few-shot examples to improve output quality, reduce token usage, and eliminate ambiguity.
prompt, optimization, LLM
Analyzes system prompts and user prompts for token efficiency, clarity, and effectiveness. Deconstructs prompts into components (system role, instructions, context, examples, output format, constraints), scores them across 5 clarity dimensions, and suggests restructuring, compression, and templating improvements.
Invoke by providing a prompt string and the desired action. The optimizer will return structured analysis or an improved version.
/prompt-optimize analyze — Score the prompt across clarity, specificity, efficiency, structure, and robustness/prompt-optimize improve — Rewrite the prompt following best practices (chain-of-thought, role prompting, XML tagging)/prompt-optimize optimize — Reduce token count while preserving semantic meaning/prompt-optimize build — Construct a new prompt from a goal descriptionReturns a structured evaluation or improved prompt depending on the action:
All outputs include a token count comparison (before vs. after) and model-specific recommendations when a target model is specified.
| Parameter | Type | Description |
|---|---|---|
prompt | string | The prompt to analyze and/or optimize |
action | string | Action: analyze, improve, optimize, build (default: analyze) |
goal | string | Optional: description of what the prompt should achieve (used with action=build) |
model | string | Optional: target model for model-specific optimizations (claude, gpt-4o, deepseek, gemini, default: general) |
output_format | string | Optional: desired output format (text, json, markdown, code, default: text) |
{
"prompt": "Write a function in Rust. It should read a file and parse some numbers. Return the result.",
"action": "improve",
"model": "claude",
"output_format": "code"
}
Example output:
## Improved Prompt
You are a senior Rust engineer. Your task is to write a single, well-documented Rust function based on the specification below.
impl AsRef<Path>)f64, skipping invalid linesResult<Vec<f64>, io::Error> so the caller can handle errorsOnly return the Rust code inside a single ```rust code block. Do not include explanations outside the code block.
## Analysis (original vs improved)
| Dimension | Original | Improved |
|-----------|----------|----------|
| Clarity | 3/10 | 9/10 |
| Specificity | 2/10 | 9/10 |
| Efficiency | 6/10 | 7/10 |
| Structure | 4/10 | 10/10 |
| Robustness | 2/10 | 8/10 |
## Key Improvements
1. **Role assignment** — "senior Rust engineer" sets expertise expectations
2. **Explicit signature** — `impl AsRef<Path>` + `Result<Vec<f64>, io::Error>` eliminates ambiguity
3. **Error handling** — "skip invalid lines" covers edge cases
4. **Output constraint** — Prevents extraneous explanations
5. **Test requirement** — Ensures correctness is verifiable