T01 · Skill Instruction Hijacking
- Location
SKILL.md:17- Finding
Broad Automatic Activation Can Override the User's Current Task
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a legitimate SKILL.md optimizer, but it uses overly broad automatic activation and mutable remote install instructions that users should review carefully.
Install only if you want a proactive optimizer for agent skill files. Prefer a pinned release or verified checksum instead of the documented raw main-branch URL, and disable or narrow the auto-trigger terms so it runs only when you explicitly ask it to analyze a specific SKILL.md file.
SKILL.md:17Broad Automatic Activation Can Override the User's Current Task
README-en.md:230Installation Retrieves a Mutable Remote Skill Without Integrity Verification
The trigger metadata uses very broad keywords such as “检查”, “提升”, “skill”, “技能”, and “agent”, combined with auto-triggering. This can cause the skill to activate on many unrelated conversations, leading to unintended execution, context hijacking, and reduced user control over which skill handles a request.
The auto-trigger rules are expansive and include passive signals like file creation/modification windows and quality thresholds, while stating the skill should be called immediately without user confirmation in some cases. This creates an overbroad activation surface that can cause the agent to act on incidental events, override user intent, or expose internal workflow details through unsolicited interventions.
Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.
### ❌ Not Applicable Scenarios
- Need to change skill core functionality
- Completely rewrite skill logic
- Add brand new functional modules
- Cross-skill integration
The workflow explicitly instructs the skill to rewrite SKILL.md, which is a self-/peer-modification capability affecting agent behavior definitions. If triggered on the wrong target or without strict constraints, it can alter operational instructions, weaken security controls, or introduce unsafe behavior into other skills.
### Step 2: Structural Refactoring
Rewrite SKILL.md based on confirmed strategy:
1. **Modularize References**: Move long lists to `references/` files
2. **Apply Design Patterns**:
The trigger list includes extremely generic terms such as "check," "skill," and "agent," and the metadata enables auto-trigger with high priority. In an agent environment, this can cause the optimizer to activate during unrelated conversations or tasks, potentially hijacking workflow and causing unintended analysis or rewriting of skill files.
The trigger list includes extremely common terms such as "skill", "agent", "检查", and "优化", combined with auto-trigger: true and priority: high. This creates a high risk of unintended activation on unrelated user requests or repository events, causing the skill to run when not explicitly requested and potentially influencing other workflows or content.
The skill is configured to auto-trigger on very broad optimization-related keywords and is marked high priority, which can cause it to activate during ordinary conversation rather than a clear invocation request. In an agent system, this creates unintended control transfer, increasing the chance of prompt hijacking, workflow disruption, and unauthorized processing of unrelated user content.
The activation rules trigger on generic terms like "skill," "技能," and "agent," and state that the skill should proactively run without user confirmation in some cases. This is dangerous because simple discussion about agents or skills could invoke a refactoring workflow that overrides more relevant tasks or manipulates files and instructions outside the user's actual intent.
Referenced artifact was not completely inspected
2. **用户提及技能文件**:提到"skill"、"技能"、"agent"、"SKILL.md"等术语
L031 写明“使用中文描述,更符合本地用户习惯”,整体文档中的触发短语、提示语和响应示例也均固定为中文,没有提供用户可选择语言的机制。按照语言/locale 政策,强制单一语言而无用户 opt-in 可能构成自然语言策略违规。
The examples normalize proactive triggering when a user merely mentions a skill performing poorly or asks for comparison, even if they did not request optimization. This weakens consent boundaries and encourages intent overreach, making accidental or manipulative invocation of the optimization skill more likely.
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
### ❌ Not Applicable Scenarios
- Need to change skill core functionality
- Completely rewrite skill logic
- Add brand new functional modules
- Cross-skill integration
The usage examples rely on broad natural-language prompts like "Improve this SKILL.md file" and file-change detection that lack strict activation boundaries. This increases the chance of accidental invocation and ambiguous scope selection, especially when the user is discussing a skill rather than requesting modification.
The file-change trigger example indicates the skill may notice creation or modification of paths like skills/new-skill/SKILL.md, revealing awareness of skill inventory and file activity. In shared or sensitive environments, this can expose the existence and naming of internal skills and encourage unsolicited prompts based on observed workspace changes.
Detected: skills/new-skill/SKILL.md was created or modified
→ Ask: "Skill file change detected, would you like to optimize?"
The file structure labels README-en.md as "Documentation (English only)," which suggests an English-only locale constraint in the skill's materials. The document does not state that users may choose their preferred language or that the English-only variant is optional, which may conflict with language-choice policy expectations.
The example invocation phrases are broad natural-language requests like "检查一下这个 agent 的质量" and "skill 效果不好,有什么建议?", which overlap with ordinary conversation. In a skill-routing environment, ambiguous activation examples can encourage overbroad matching and accidental execution of a high-priority optimization skill.
The documented file-change trigger explicitly watches a skill path (skills/new-skill/SKILL.md) and proposes automatic prompting when such files are created or modified. In agent environments, this can facilitate skill enumeration and reveal the presence, naming, or lifecycle of internal skill files, especially if surfaced across workspace boundaries or to untrusted users.
检测到:skills/new-skill/SKILL.md 被创建或修改
→ 询问:"检测到技能文件变更,是否需要优化?"
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
# 1. 创建技能目录
mkdir -p ~/.trae/skills/skill-optimizer
# 2. 下载 SKILL.md 文件
cd ~/.trae/skills/skill-optimizer
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.
# skills/skill-optimizer/SKILL.md
---
name: skill-optimizer
description: |
The description and examples define activation phrases and user-facing behavior primarily in Chinese, while the rest of the file is in English. This can impose a language-specific interaction model without user opt-in or a stated reason for limiting the locale.
The file-change and quality-score triggers are underspecified and rely on system state that may be noisy, stale, or unavailable, yet they can still cause unsolicited activation. This can lead to repeated or spurious optimization prompts, accidental interference with normal development workflows, and privilege creep if the skill assumes access to project state it should not act on automatically.
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.
检测到新建:skills/new-skill/SKILL.md
→ 询问:"检测到新技能文件,是否需要优化以确保最佳实践?"
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.
检测到新建:skills/new-skill/SKILL.md
→ 询问:"检测到新技能文件,是否需要优化以确保最佳实践?"
The document consistently frames the skill in Chinese and English, but does not state whether the skill adapts to the user's preferred language or allows locale selection. While not severe on its own, this can create a locale-policy concern if the skill behavior is expected to respect user language preference rather than assume a preset presentation style.