T01 · Skill Instruction Hijacking
- Location
INTEGRATION_PLAN.md:123- Finding
Agent Decision-Flow Hijacking Through Mandatory Router Integration
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This router is not overtly malicious, but it can change agent-wide skill selection and auto-invoke or rewrite other skills with weak safeguards.
Install only if you want a global fast-path router and are comfortable reviewing its configuration. Do not enable automatic invocation for skills that write files, run commands, use browsers, authenticate, or contact external services unless you add an allowlist, higher thresholds, ambiguity checks, and explicit user confirmation. Avoid running the metadata repair scripts on your whole skills directory without backups and a diff review.
INTEGRATION_PLAN.md:123Agent Decision-Flow Hijacking Through Mandatory Router Integration
scripts/integration.py:31Untrusted Skill Metadata Can Trigger Automatic Skill Invocation at a Weak Threshold
generate_metadata.py:87Maintenance Utilities Rewrite Other Installed Skills Without Safe Preservation or Transaction Controls
The document explicitly proposes automatic logging of raw user queries, routing decisions, and feedback without any mention of notice, consent, minimization, retention limits, or redaction. Because user prompts can contain secrets, personal data, or sensitive business information, storing them verbatim creates a real privacy and data-exposure risk if logs are accessed, shared, or reused for optimization.
The automatic logging design stores natural-language user queries directly, which is risky because free-form prompts often contain credentials, identifiers, health/financial details, or proprietary requests. This is especially dangerous in an agent-routing context because the system is designed to capture many prompts over time, turning incidental sensitive input into a searchable corpus.
The skill describes automated monitoring/listening across GitHub, Discord, and review platforms, but provides no boundaries for what content is collected, whether platform terms and user expectations are respected, or how collected data is stored and used. Automated aggregation of user-generated content can expose personal data and create privacy/compliance issues, especially when centralized with internal usage logs.
The hot-term discovery and auto-optimization flow analyzes and aggregates original user prompts to generate trigger updates and optimization proposals. Even if intended for model improvement, this increases exposure by reprocessing sensitive user input at scale and can leak private terms into reports, PRs, or downstream artifacts.
The document explicitly recommends broad trigger/keyword metadata for routing multiple skills, but does not define exclusion conditions, priority rules, or safety gating for ambiguous requests. In a prompt-router context, overly generic triggers can cause unintended skill activation, misrouting user input to the wrong capability, and bypassing more careful handling paths for sensitive actions.
The troubleshooting guidance suggests fixing mismatches by adding or broadening triggers, including examples that can still remain generic, without emphasizing constraints or abuse resistance. This encourages operators to expand activation phrases in ways that increase accidental or adversarial routing, especially when combined with low confidence thresholds and automatic invocation behavior described elsewhere in the file.
The plan instructs the system to invoke a local Python script with the full user message before normal skill selection, but it provides no disclosure, trust boundary discussion, or safeguards around forwarding all prompts to that subprocess. Even though the script appears local, it expands the attack surface by introducing automatic code execution and broad message exposure to another component that may log, mishandle, or later be modified to exfiltrate data.
The documented trigger/keyword examples are broad generic terms such as 搜索, 查找, search, and find, with no scope, namespace, or disambiguation constraints. In a prompt-routing skill, this can cause overmatching and unintended invocation of this or other skills, potentially redirecting user requests away from safer or more appropriate handling paths.
The document explicitly states that the skill will automatically collect user queries, match results, confidence scores, routing decisions, response times, and user feedback, but it provides no notice, consent flow, retention policy, redaction guidance, or access controls. In an agent skill context, user queries and feedback can easily contain sensitive personal, business, or credential-like data, so silent logging increases privacy and data exposure risk.
The trigger list includes broad, generic terms such as “路由”, “匹配”, “技能”, and “自动调用”, which can overlap with normal user conversation and unrelated tasks. In a prompt-routing skill, overly permissive activation terms increase the chance of unintended invocation or misrouting, causing the wrong skill to handle user input and potentially exposing downstream capabilities unexpectedly.
The manifest trigger list includes very broad, generic terms such as '路由', '匹配', '技能选择', and '自动调用', which are likely to appear in ordinary conversation and unrelated tasks. In a prompt-routing skill, this increases unintended activation risk and can steer requests into deterministic tool/skill execution paths that bypass richer intent disambiguation.
The skill explicitly documents direct invocation of matched skills for higher-confidence results and includes command-oriented examples like opening browsers and executing commands, but it does not require user confirmation or warn about side effects. In this context, a false-positive route can immediately trigger sensitive actions, especially because the router is designed to avoid LLM review for speed and determinism.
This markdown file is natural-language documentation, and its content forces a specific language for readers and operators. Under the policy rule, a fixed language without user opt-in or a documented region-specific justification is a natural-language policy violation.
The file hard-codes trigger and keyword vocabularies in both Chinese and English for multiple skills, and the module/docstrings are written only in Chinese. This encodes a language/locale behavior choice in the skill maintenance logic without any indication that users can choose language preferences or that the locale constraint is intentionally justified.
The module docstring is written only in Chinese, and the script's user-facing messages are also Chinese-only. This creates a locale policy concern because the skill forces a specific language without offering user opt-in or documenting a justified region-specific constraint.
The console output strings shown to users are hardcoded in Chinese, including progress and completion messages. Because there is no opt-in, fallback language, or documented regional limitation, this is a natural-language locale policy violation.
This Python file contains natural-language documentation and output strings entirely in Chinese, including the module docstring and recommendation messages. The file does not offer any language choice or indicate that the skill is intentionally region-specific, which violates the policy against forcing a specific language without user opt-in.
This Python file contains core documentation and operational output entirely in Chinese, including the module docstring and later user-visible messages. For a general-purpose prompt router, this imposes a specific language/locale without opt-in, which matches the policy's language/locale violation criteria.
This code's user-facing natural-language documentation and labels are written exclusively in Chinese, including core behavior descriptions and printed output labels. That creates a language/locale constraint without any indication that users can choose another language or that the skill is intentionally region-specific.
This Python file contains natural-language descriptions and user-facing output/comments exclusively in Chinese, such as the module docstring and multiple explanatory comments. Under the policy rule for language/locale, forcing a specific language without opt-in or documented regional justification is a violation.
This Python file contains natural-language docstrings and printed status text exclusively in Chinese, which imposes a specific language on users and maintainers without any opt-in or stated regional scope. The policy explicitly flags language or locale constraints when the skill does not offer a user choice or justify the restriction.
The test runner prints headings, result labels, expectations, and performance messages only in Chinese. Because this is user-visible runtime output and no alternative language selection or justification is provided, it constitutes a natural-language policy violation under the language/locale rule.
The file's docstring and printed status messages are written in Chinese, which imposes a specific language in the user-facing text without any opt-in or alternative. The policy requires flagging language or locale constraints when a skill forces a language without user choice or documented justification.
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.
router = PromptRouter()
# 测试解析 prompt-router 自己的 SKILL.md
skill_md_path = 'C:/Users/User/.openclaw/workspace/skills/prompt-router/SKILL.md'
content = open(skill_md_path, 'r', encoding='utf-8').read()
print("解析 prompt-router/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.
# 测试解析 multi-search-engine
print("解析 multi-search-engine/SKILL.md:")
print("=" * 60)
skill_md_path = 'C:/Users/User/.openclaw/workspace/skills/multi-search-engine/SKILL.md'
content = open(skill_md_path, 'r', encoding='utf-8').read()
meta = router._parse_skill_md(content)
print(f"name: {meta.get('name')}")