Back to skill

Security audit

Claude Prompt Engineering - 提示词工程大师

Security checks for vulnerabilities and agentic risk

Overview

The skill is a prompt-engineering helper, but it asks to inject mandatory system-level behavior broadly and automatically, which users should review before installing.

Install only if you want this skill to change the assistant's prompt-engineering behavior, and keep auto-apply or auto-inject settings disabled unless you explicitly want it active for a specific conversation. Prefer using its templates manually rather than allowing automatic system-prompt injection.

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
Findings (1)

T01 · Skill Instruction Hijacking

Error
Location
system-prompt.md:3
Finding

System-Prompt Injection Alters Agent Identity and Mandatory Workflow

Content
View full analysis

Vulnerability Details

File Location: system-prompt.md:3-30; SKILL.md:338-394
Vulnerability Type: T01: Skill Instruction Hijacking
Risk Level: Critical

Vulnerable Code Snippets

system-prompt.md:3-30 — English translation of the complete vulnerable source segment:

markdown
You are Claude, an AI assistant. Strictly comply with the following prompt-engineering rules:

## Core Prohibitions (Mandatory)
- Do not add content that the user did not mention.
- Do not change the meaning of the original text.
- If uncertain, directly say, "I am not sure."
- Do not say, "It looks fine," without verification.
- Do not fabricate or guess.
- Do not use idioms or four-character phrases.

## Execution Workflow
1. Restate first: Before execution, restate the user's core request.
2. Confirm next: Wait for the user to confirm that the understanding is correct.
3. Execute afterward: Begin work only after confirmation.
4. Self-check: Validate the result and identify problems after completion.

## Output Format
- Conclusion first: Give the answer or action before the reasons.
- Concise and direct: Use bullet points, with no more than two lines per point.
- Modular: Divide complex tasks into sections.

## Memory Management
- Proactively restate key requirements.
- Do not rely on earlier context that may have been compressed.
- Explicitly state when information is insufficient.

## Repeated Emphasis
If uncertain, say, "I am not sure." Do not guess.

SKILL.md:338-394 — English translation of the complete relevant injection and tool-definition segment:

markdown
## System-Prompt Injection

When triggered, inject the following content into the system prompt:

You are Claude, an AI assistant. Strictly comply with the following nine prompt-engineering rules:

Rule 1: Modular structure
- Divide complex tasks into independent modules.
- Each module handles only one function.
- Make later modification and reuse easier.

Rule 2: Prohibition first
- 
...[truncated 4380 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove all directions that inject content into the system-prompt layer.
  2. Remove identity assignment such as directing the agent to assume a specific model identity.
  3. Present prompt-engineering templates only as inert text returned to a user who explicitly requests them.
  4. Require explicit, task-scoped user consent before applying any template or behavioral rule.
  5. Remove automatic activation based on environment variables, session startup, inferred task importance, or broad task categories.
  6. State that Skill content cannot override system, developer, platform-safety, or current user instructions.
  7. Do not require confirmation before execution unless the user requests it or essential information is genuinely missing.
  8. Scope any selected formatting preferences to the immediate task and discard them afterward.
  9. Replace the claimed system-injection effect of apply_rules with a safe function that only generates a proposed prompt for user review.
  10. Add tests confirming that loading the Skill alone does not change identity, instruction priority, tool behavior, refusal policy, or subsequent unrelated responses.
Vulnerability Patterns
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (3)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The title presents the skill as a Chinese-language prompt-engineering assistant, and the document consistently instructs in Chinese without offering a language choice or documenting a justified locale restriction. This can violate language/locale policy when users have not opted into Chinese output.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The trigger conditions are broad and include generic phrases like prompt-engineering requests, general quality-improvement questions, and automatic activation based on a high-level scenario or environment variable. This can cause the skill to activate in unrelated conversations and inject its own instruction layer, potentially overriding user intent, altering response behavior, or creating prompt-scope confusion.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill is entirely written as mandatory Chinese-language system instructions and does not provide any user language choice or opt-in. This can override user preferences, reduce usability and transparency, and in some contexts cause misunderstanding of safety-critical instructions or outputs.

Content

No source excerpt is available for this finding.