Back to skill

Security audit

Prompt Optimizer

Security checks for vulnerabilities and agentic risk

Overview

This is a prompt-rewriting helper with disclosed local preference storage and template-file use; I found no artifact-backed malicious or Review-level behavior.

Before installing, be comfortable with the skill reading local prompt-template JSON files and saving optimizer settings under memory/prompt_optimizer_state.json. If using the standalone setup, review the text before appending it to persistent assistant rule files, and fetch any external template libraries only from a source you trust.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (13)

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · README.md (reported line 37)May include surrounding context.

md
| State Persistence | ⚠️ In-conversation only; lost on restart |
| Quality Evaluation | ✅ |

**Install:** Copy skill folder into your project. Add to `CLAUDE.md`: `Read and follow skills/prompt-optimizer/SKILL.md`
**Recommended Mode:** Template-first (default), in-conversation state memory.
**Limitation:** Must re-enable ("enable prompt optimizer") each new conversation.

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · README.md (reported line 53)May include surrounding context.

md
| State Persistence | ⚠️ In-conversation only; lost on restart |
| Quality Evaluation | ✅ |

**Install:** Copy skill folder into your project. Add to `CLAUDE.md`: `Read and follow skills/prompt-optimizer/SKILL.md`
**Recommended Mode:** Template-first (default), in-conversation state memory.
**Limitation:** Must re-enable ("enable prompt optimizer") each new conversation.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The README says settings are saved automatically to a local JSON file, but it does not clearly warn users about local persistence or define what data is retained. Even if only preferences are stored, undisclosed persistence can expose behavioral data or create privacy surprises in shared or sensitive environments.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
85% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · README.md (reported line 169)May include surrounding context.

|--------|---------| | Enable | "enable prompt optimizer" / "开启提示词优化" | | Enable (Full) | "enable full version" / "开启完整版提示词优化" | | Disable | "disable prompt optimizer" / "关闭提示词优化" |

Minimal usage:

text

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The example activation phrase says users can enable the skill 'or any language,' which makes invocation semantics ambiguous and harder to constrain safely. In instruction-following systems, fuzzy multilingual activation increases the risk of unintended enablement from natural conversation, quoted text, or maliciously crafted prompts.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The README states that all commands accept any language and that the AI should infer intent naturally, which creates an overly broad activation surface. That makes accidental or adversarial prompt injection more likely, since unrelated user text could be interpreted as configuration commands or skill activation without a strict trigger boundary.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill instructs persistent storage of user preferences and timestamps in a local memory file without clearly warning the user up front that data will be retained across sessions. Persistent state can expose behavioral metadata, create unexpected cross-session retention, and violate user expectations or platform privacy requirements if users do not knowingly consent.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
83% confidence
Finding

The manifest says the skill should be used only to optimize or rewrite prompts and explicitly says not to use it for general conversation. However, the workflow documents behavior for handling simple daily conversation with a normal reply path, which broadens the skill from prompt optimization into conversational response handling.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

Step 3 states the core behavior is to directly output only the optimized prompt, with no explanation and no code block. Later, the mandatory confirmation flow requires surrounding metadata, a code fence, and a modification explanation, which directly contradicts the earlier documented intent.

Content

No source excerpt is available for this finding.

Unbounded Output

Medium
Category
Output Handling
Confidence
60% confidence
Finding

Output size or generation rate is not bounded. Unbounded output enables denial-of-service through resource exhaustion, log flooding, or context-window stuffing.

Content

Scanner excerpt · STANDALONE.md (reported line 231)May include surrounding context.

md
| File | Size | Best For |
|------|------|----------|
| `prompt_library_lite.json` | 3.0 MB | Broad coverage, fast |
| `prompt_library_full.json` | 9.9 MB | Maximum quality, no truncation |

The AI auto-selects based on task complexity.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The manifest scope is limited to optimizing or rewriting prompts, with no mention of storing persistent state. The README says settings are saved to memory/prompt_optimizer_state.json, which is an additional behavior beyond pure prompt transformation.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

A prompt optimizer can reasonably read template files and use the host LLM, but writing a persistent state file is not an obvious requirement of that purpose. This introduces a capability to retain configuration across sessions that the manifest does not declare.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The guideline says output language must match the user's input language, which enforces a language/locale behavior automatically. Under the policy, language constraints should either be user-selectable or clearly justified; here the behavior is mandatory rather than opt-in.

Content

No source excerpt is available for this finding.