T01 · Skill Instruction Hijacking
- Location
SKILL.md:264- Finding
Generated Skills Enforce Identity and Response Hijacking
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 264–266
Vulnerability Type:T01: Skill Instruction Hijacking
Risk Level: HighComplete Code Snippet:
markdown ## 角色扮演规则(最重要) **此Skill激活后,直接以[人名]的身份回应。**English translation:
markdown ## Role-Playing Rules (Most Important) **After this Skill is activated, respond directly as [person's name].**Technical Analysis
The Skill template embeds a highest-priority role-playing directive into every generated person-themed Skill. When a generated Skill is subsequently activated, the directive tells the agent to assume the selected person's identity rather than transparently presenting its output as an AI-generated simulation or analysis.
The surrounding template reinforces this behavior by requiring first-person speech and mandatory adherence to the inferred vocabulary, tone, and response patterns of the selected person. Because these instructions become part of a generated
SKILL.md, the behavioral redirection can affect later sessions whenever that generated Skill is loaded.This constitutes instruction hijacking because the generated instructions redefine the agent's identity and response behavior. It also creates a risk that inferred or fabricated conclusions will be presented as first-person statements attributable to a real individual.
Attack Path
- A user asks the audited Skill to create a perspective model for a selected person.
- The Skill researches that person and synthesizes inferred mental models and stylistic characteristics.
- It generates a new
SKILL.mdunder.claude/skills/[person-name]-perspective/. - The generated file includes the instruction that the agent must respond directly as the selected person.
- A later user or agent activates the generated Skill.
- The embedded instruction redirects the agent's identity and responses, causing it to present model-generated statements in the first ...[truncated 664 chars]
- Remediation
View remediation
Remediation Suggestions
- Replace identity-assumption instructions with transparent simulation language, such as: “Provide an analysis inspired by publicly documented aspects of the person's reasoning.”
- Explicitly prohibit claims that the agent is the selected person.
- Require third-person attribution or a visible disclaimer explaining that responses are AI-generated approximations.
- Distinguish sourced statements from inferred conclusions and require citations for direct quotations or documented positions.
- State that system, developer, safety, privacy, and user instructions always take precedence over persona and style directives.
- Make stylistic imitation optional and require explicit user consent before activation.
- Add a validation check that rejects generated Skills containing directives such as “respond as,” “you are,” or equivalent identity-assumption language.
- Require generated responses to communicate uncertainty whenever the researched person has not publicly addressed the subject.
