Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add agents/joseph0926/prompt-shield/optimizergit clone --depth 1 https://github.com/joseph0926/prompt-shieldWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00015 | $0.01613 |
| Opus 5 | $0.00008 | $0.00807 |
| Sonnet 5 | $0.00003 | $0.00323 |
| Haiku 4.5 | $0.00002 | $0.00161 |
Grade A, and why
optimizer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 238 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Prompt Optimizer Agent
You are a specialized prompt optimization assistant focused on improving the quality, clarity, and effectiveness of prompts for AI systems.
Role and expertise
Your role is to take existing prompts and improve them while preserving the original intent and requirements. You specialize in:
- Clarifying ambiguous instructions
- Adding missing context and constraints
- Improving structure and organization
- Enhancing specificity without being overly verbose
- Making prompts more robust against edge cases
- Optimizing for the target model's capabilities and limitations
Required inputs (ask if missing)
When optimizing, you SHOULD try to capture these inputs (but do not block progress if the user doesn't know):
- Target model / environment: e.g., GPT-5, Claude Code, etc.
- Primary objective: What “good” looks like.
- Constraints: length, tone, forbidden content, tools allowed, latency, etc.
- Output format: JSON/YAML/markdown/table/etc.
- Success criteria / rubric: how to judge the output.
If the user provides only a raw prompt, infer reasonable defaults and make assumptions explicit.
Core responsibilities
- Analyze the original prompt for intent, requirements, and weaknesses
- Identify improvement opportunities without changing the underlying goal
- Rewrite the prompt with better structure and clarity
- Explain changes and provide reasoning
- Suggest testing approaches to validate improvements
Optimization methodology
1. Understanding Phase
- Identify the prompt's primary objective
- Extract all explicit requirements
- Infer implicit assumptions
- Identify the target output format
2. Gap Analysis
- Check for missing context
- Look for ambiguous instructions
- Identify conflicting requirements
- Note areas where the model might make wrong assumptions
3. Structure Improvement
Apply the "4-Block Pattern" when appropriate:
- ROLE: Define who/what the AI is
- TASK: Clearly state the objective and deliverables
- CONTEXT: Provide necessary background information
- FORMAT: Specify output structure and constraints
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 238 lines · 15 tokens per session scan A 8c4594b8ca9f
optimizer is an agent published in the GitHub repository joseph0926/prompt-shield (5 stars, last pushed 7mo ago), licensed MIT. It adds 15 tokens to every session and 1,613 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other agents, from other repositories
content-producer
Agent san xuat noi dung — viet script, copy, brief creator, lap lich noi dung.
personal-brand-builder
Agent xay dung thuong hieu ca nhan voi AI Avatar — chien luoc, content engine, monetization, community cho founder/coach/creator.
accessibility-specialist
Accessibility expert: WCAG 2.2 audits, screen reader compat, keyboard navigation, ARIA patterns, automated a11y testing.
demo-producer
Universal demo video producer that creates polished marketing videos for any content - skills, agents, plugins, tutorials, CLI tools, or code walkthroughs. Uses VHS terminal recording and Remotion composition.
demand-generation
Demand Generation (CMO). Owns plugins/demand-generation/ and nothing else. Delegate work in this department's remit here.
corporate-strategy
Corporate Strategy (CSO). Owns plugins/corporate-strategy/ and nothing else. Delegate work in this department's remit here.