Back to skill

Security audit

Auto Create Skill

Security checks for vulnerabilities and agentic risk

Overview

This skill is meant to create and edit reusable agent skills, but it needs Review because it can persistently modify skill directories and uses broad triggers plus unsafe shell-style command templates.

Install only if you intentionally want an agent to create and modify persistent skills. Before enabling generated skills, review their triggers, paths, AUTO steps, and any shell or Git commands; require explicit confirmation for writes, deletes, commits, pushes, and installation into agent skill directories.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:100
Finding

Command Injection and Path Traversal Through Unvalidated Skill Names

Content
View full analysis
cat > $SKILL_DIR//SKILL.md << 'SKILL_EOF' SKILL_EOF ``` ### Technical Analysis The workflow instructs the agent to substitute a user-influenced skill name directly into shell commands. Although the documentation says skill names should use kebab-case, it does not require validation before command construction. The destination path is also unquoted. A crafted value containing shell metacharacters, command substitutions, whitespace, path separators, or traversal sequences could change the meaning of the generated command. For example, shell control operators could append another command, while `../` sequences could direct the file write outside the intended skill directory. Because these commands are intended to be executed by the agent, exploitation occurs with the operating-system permissions assigned to the agent process. ### Attack Path 1. An attacker asks the agent to create a workflow and supplies a malicious skill name. 2. The skill accepts or derives that name without applying a mandatory allowlist. 3. The agent replaces `` in the documented shell sequence. 4. The shell interprets attacker-controlled metacharacters or traversal components. 5. The injected command executes, or `SKILL.md` is written outside the intended skill directory. The attack depends on the agent following the documented shell-based creation procedure without independently sanitizing the value. ### Impact Assessment Successful exploitation could: - Execute arbitrary shell commands with the agent's privileges. - Create or overwrite files writable by the agent. - Write persistent skill instructions outside the intended destination. - Corrupt other skills or agent configuration files. - Expose or modify ...[truncated 238 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
references/workflow-skill-template.md:214
Finding

Command Injection Through Unvalidated Workflow Parameters in Generated Git Commands

Content
View full analysis
# Commit with a message containing the Jira ID git commit -m "fix({jira_id}): " # Push to the remote git push origin bugfix/{jira_id} ``` ### Technical Analysis The template places workflow parameters directly into executable shell commands. The `jira_id`, modified-file list, and bug-title-derived commit message can originate from user input or external issue data, but the template does not require validation or safe process invocation. The branch commands use `{jira_id}` as an unquoted shell token. If the generated workflow substitutes a value containing shell control operators, command substitutions, whitespace, or option-like content, the resulting shell command can be altered. The commit message is enclosed in double quotes, which do not prevent shell command substitution such as `$(...)` or backtick expressions. Consequently, malicious issue-title content incorporated into the placeholder could be evaluated by the shell when the agent executes the generated command. The `git add ` pattern is also unsafe if implemented by joining attacker-influenced paths into one shell command. Crafted filenames could be interpreted as command syntax or Git options. ### Attack Path 1. An attacker supplies a crafted Jira ID, issue title, or filename through the workflow input or an issue record consumed by the generated skill. 2. The generated skill substitutes that content into the template's Git command strings. 3. The agent executes the resulting strings through a shell. 4. The shell evaluates injected control operators or command-substitution syntax. 5. Arb ...[truncated 843 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (18)

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

声明描述的是一个高层自动化 Skill 生成与编辑器:应能根据对话抽取工作流、创建 Skill,并修改 Skill 的流程结构。实际代码只是一个注册表管理脚本,负责在几个候选路径中选择可写 JSON 文件,并维护 Skill 条目的元数据。虽然其中的 list 和部分 update 能力与“列出已创建 skill”“更新某个 skill 的描述/参数/路径”有一定相关性,但核心功能明显缺失:没有任何会话分析、工作流抽取、Skill 文件生成、步骤级流程编辑或自动化逻辑。因此描述与代码行为存在实质性不匹配。

Content

No source excerpt is available for this finding.

Vague Triggers

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The trigger conditions are broad enough to activate on ordinary discussion about repetitive work or automation, causing the skill to run in contexts where the user did not intend persistent skill creation or modification. Because this skill can write files and maintain a registry, accidental activation can lead to unwanted state changes and persistence.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 76)May include surrounding context.

md
文件名必须是 `SKILL.md`(全大写)**。这不是建议,是硬性要求,否则 Claude Code

Agent Config Directory Access

High
Category
Agent Snooping
Confidence
90% confidence
Finding

Reading from ~/.claude/skills accesses the agent's configuration/skill area, which is sensitive because it reveals locally installed skills, templates, and potentially operational conventions. In this skill's context, the access is framed as normal setup, making it more dangerous because it conditions the agent to inspect config directories as part of routine execution.

Content

Scanner excerpt · SKILL.md (reported line 181)May include surrounding context.

md
用 `references/workflow-skill-template.md` 作为参考模板,生成 SKILL.md。

生成前请先阅读模板文件(路径根据 auto-create-skill 自身安装位置而定):
- Claude Code: `cat ~/.claude/skills/auto-create-skill/references/workflow-skill-template.md`
- Claude.ai: `cat /mnt/skills/user/auto-create-skill/references/workflow-skill-template.md`

生成 Skill 时遵循以下原则:

Vague Triggers

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The instruction to make generated descriptions as trigger-happy as possible encourages future skills to contain vague, expansive activation phrases. That propagates unsafe auto-invocation behavior into newly generated skills, amplifying the risk of unintended execution across later conversations.

Content

No source excerpt is available for this finding.

Agent Config Directory Access

High
Category
Agent Snooping
Confidence
98% confidence
Finding

Writing directly into ~/.claude/skills creates or alters persistent agent behavior by installing a new skill in the agent config directory. This is especially sensitive because it changes future execution semantics across sessions, effectively creating a persistence mechanism that could be abused to plant overbroad or malicious instructions.

Content

Scanner excerpt · SKILL.md (reported line 208)May include surrounding context.

bash
# ✅ 正确:先建子目录,再在里面写 SKILL.md
mkdir -p ~/.claude/skills/<skill-name>
cat > ~/.claude/skills/<skill-name>/SKILL.md << 'SKILL_EOF'
---
name: <skill-name>
description: ...

Agent Config Directory Access

High
Category
Agent Snooping
Confidence
87% confidence
Finding

Verification by reading and displaying the first lines of a file in ~/.claude/skills still normalizes access to the agent config directory and may expose metadata or instruction content from persistent skills. While less severe than writing, it reinforces a pattern of interacting with sensitive configuration paths without strict scope controls.

Content

Scanner excerpt · SKILL.md (reported line 239)May include surrounding context.

md
# 验证文件路径是否正确
if [ -f "$HOME/.claude/skills/<skill-name>/SKILL.md" ]; then
  echo "✅ Skill 文件路径正确"
  head -5 "$HOME/.claude/skills/<skill-name>/SKILL.md"
else
  echo "❌ 错误:SKILL.md 未在正确位置创建!"
  # 检查是否误创建为平铺文件

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill explicitly instructs file reads and writes, including persistent writes to skill directories, but does not declare any tool scope restrictions such as allowed-tools or permissions. That creates unnecessary ambient authority: if invoked, the agent may perform filesystem operations beyond what users expect, increasing the blast radius of prompt injection or accidental misuse.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The natural-language content and required user-facing messages are written entirely in Chinese, including quoted text the skill tells the agent to present to users. There is no opt-in, language selection mechanism, or justification that this is a Chinese-only regional skill.

Content

No source excerpt is available for this finding.

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 · SKILL.md (reported line 92)May include surrounding context.

md
# ❌ 错误:文件名不对
~/.claude/skills/fix-easy-bug/fix-easy-bug.md
~/.claude/skills/fix-easy-bug/skill.md

# ❌ 错误:路径层级不对
~/.claude/skills/SKILL.md

Session Persistence

Medium
Category
Rogue Agent
Confidence
97% confidence
Finding

The same persistence mechanism applies to the Claude.ai output path: generating downloadable skill artifacts allows unsafe instructions to be packaged for later reinstallation and reuse. Even if the sandbox is ephemeral, the exported files create durable artifacts that can reintroduce risky behavior outside the current session.

Content

Scanner excerpt · SKILL.md (reported line 100)May include surrounding context.

创建文件时必须使用以下命令序列(不可省略 mkdir):

bash
mkdir -p $SKILL_DIR/<skill-name>
cat > $SKILL_DIR/<skill-name>/SKILL.md << 'SKILL_EOF'
<Skill 内容>
SKILL_EOF

Session Persistence

Medium
Category
Rogue Agent
Confidence
97% confidence
Finding

The same persistence mechanism applies to the Claude.ai output path: generating downloadable skill artifacts allows unsafe instructions to be packaged for later reinstallation and reuse. Even if the sandbox is ephemeral, the exported files create durable artifacts that can reintroduce risky behavior outside the current session.

Content

Scanner excerpt · SKILL.md (reported line 100)May include surrounding context.

创建文件时必须使用以下命令序列(不可省略 mkdir):

bash
mkdir -p $SKILL_DIR/<skill-name>
cat > $SKILL_DIR/<skill-name>/SKILL.md << 'SKILL_EOF'
<Skill 内容>
SKILL_EOF

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
85% 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 · SKILL.md (reported line 207)May include surrounding context.

  1. 必须创建子目录,然后在子目录内创建 SKILL.md 文件(不可直接在 skills 目录下创建 .md 文件):
bash
# ✅ 正确:先建子目录,再在里面写 SKILL.md
mkdir -p ~/.claude/skills/<skill-name>
cat > ~/.claude/skills/<skill-name>/SKILL.md << 'SKILL_EOF'
---
name: <skill-name>

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
92% confidence
Finding

Listing ~/.claude/skills enumerates installed skills in the agent configuration area, which can leak capability inventory and operational context. In combination with direct write capability and broad triggers, this information can help target persistent modifications or identify high-value skills to tamper with.

Content

Scanner excerpt · SKILL.md (reported line 243)May include surrounding context.

else echo "❌ 错误:SKILL.md 未在正确位置创建!"

检查是否误创建为平铺文件

ls -la "$HOME/.claude/skills/" | grep "" fi

text

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The template explicitly instructs authors to enumerate triggers as broadly as possible ('宁多勿少'), which encourages overbroad activation conditions. In a skill-generation context, this can cause unintended invocation of automation on loosely related user requests, increasing the chance of acting without sufficient user intent or scope confirmation.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The example trigger phrases such as '修复 BUG / 修 bug' are overly generic and could match many requests that do not intend to invoke this specific workflow. Because the skill supports automated code changes and push operations in later steps, broad triggering raises the risk of accidental execution of impactful actions.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code file contains natural-language instructions and status messaging only in Chinese, including the module docstring and later CLI output. Under the policy, forcing a specific language without opt-in or documented regional justification is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
79% confidence
Finding

该文件中的标题、说明和示例均以中文固定给出,没有声明这是面向特定中文团队的区域化模板,也没有提供用户可选择其他语言的方式。按规则,强制特定语言而无用户 opt-in 属于自然语言策略风险。

Content

No source excerpt is available for this finding.