Agent skill

Cot Injection

by wgpsec in wgpsec/AboutSecurity

思维链 (Chain-of-Thought) 注入攻击方法论。当目标系统使用 ReAct/CoT 框架进行多步推理、 Agent 依赖中间推理结果做决策、或需要测试思维链完整性时触发。

No licenceAuto-check passedSecurity

Install Cot Injection

skills CLI
$ npx skills add wgpsec/AboutSecurity --skill cot-injection -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install wgpsec/AboutSecurity cot-injection --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/wgpsec/AboutSecurity.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/ai-security/cot-injection .claude/skills/cot-injection && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
cot-injection
GitHub stars
1.8k
Token cost
~640 tokens
SKILL.md length
126 words
Files
1
Skills in repo
64
Repo updated
First seen
Licence
None found

At a glance

思维链 (Chain-of-Thought) 注入攻击方法论。当目标系统使用 ReAct/CoT 框架进行多步推理、 Agent 依赖中间推理结果做决策、或需要测试思维链完整性时触发。

  • Works in 4 steps: 识别 CoT/ReAct 架构 → 思维链干扰注入 (GAARM.0042.001) → 思维链操纵注入 (GAARM.0042.002) → …
  • Tasks that involve Prompt injection and agent security
  • SKILL.md covers 概述, CoT 攻击分类, Phase 0: 识别 CoT/ReAct 架构 and Phase 1: 思维链干扰注入…, plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Cot Injection is an agent skill from wgpsec/AboutSecurity. 思维链 (Chain-of-Thought) 注入攻击方法论。当目标系统使用 ReAct/CoT 框架进行多步推理、 Agent 依赖中间推理结果做决策、或需要测试思维链完整性时触发。 覆盖: 思维链干扰注入(伪造中间 Agent 结果)、思维链操纵注入(跳过验证步骤直接调度敏感操作)、 查询注入(在数据查询 Agent 中注入恶意查询语句)。

Its SKILL.md is about 640 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Security, covering Prompt injection and agent security. It works with React and SQL. The repository describes itself as: Everything for pentest. | 渗透测试知识库,以 AI Agent 可执行的格式沉淀安全方法论。

When your agent uses it

  • Tasks that involve Prompt injection and agent security

Example prompts

  • “/cot-injection”

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. 识别 CoT/ReAct 架构
  2. 思维链干扰注入 (GAARM.0042.001)
  3. 思维链操纵注入 (GAARM.0042.002)
  4. 查询注入 (GAARM.0056.001)

What it can do on your machine

Read from SKILL.md and the folder at commit db4573f. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Cot Injection loads about 640 tokens when it runs. Until then it costs about 47 tokens; SKILL.md has 126 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~47
When it runs · the whole SKILL.md, loaded when a task matches
~640

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

Without a licence we can't republish the file, so here is its outline and opening line. It has 126 words (~640 tokens).

“CoT(Chain-of-Thought)推理通过 Thought → Act → Obs 循环让 LLM 分步解决问题,ReAct 框架在此基础上引入外部工具调用。与传统代码流程的严格分支控制不同,CoT 的每一步决策都由模型基于上下文动态生成,这种开放性使得攻击者可以通过精心构造的输入干扰或操纵推理链路——让模型"以为"某步已完成、"认为"某步可跳过,从而在不触发传统安全机制的情况下达成攻击目标。”

— opening of SKILL.md by wgpsec
name
cot-injection
metadata.tags
cot injection, chain of thought, 思维链注入, react framework, agent reasoning, 推理劫持, thought manipulation, reasoning bypass, 查询注入, cot hijack
metadata.category
ai-security

Read the full SKILL.md on GitHub

Files

Just SKILL.md in skills/ai-security/cot-injection of wgpsec/AboutSecurity.

Open the folder on GitHubat commit db4573f

Compare with similar skills

Cot Injection next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Cot Injection compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Cot Injection this skillwgpsec/AboutSecurity1.8k—~640Automated safety check: PassNone
Security Audit312362115/claude107—~1.3kAutomated safety check: PassMIT
Agent Email Inboxviclafouch/meme-studio1102 repos~10kAutomated safety check: WarnNone
Effect TSpproenca/dot-skills215—~2kAutomated safety check: PassMIT
Skill InspectorNVIDIA/SkillSpector20k1 repos~1.8kAutomated safety check: PassApache-2.0
Forensifyalexgreensh/repo-forensics188—~2.5kAutomated safety check: NotesCustom licence

Similar skills

  • Security Audit

    312362115/claude

    服务上线前的 AI 安全审查,聚焦需要理解代码语义和业务逻辑的安全问题. An agent skill from 312362115/claude.

    107 GitHub stars~1.3k tokensUpdated 4 mo ago
    SecurityAuto-check passed
  • Agent Email Inbox

    viclafouch/meme-studio

    A skill your agent uses when setting up an email inbox for an AI agent (Moltbot, Clawdbot, or similar) - configuring inbound email, webhooks, tunneling for local development, and implementing…

    110 GitHub starsUsed in 2 repos~10k tokens
    Backend & APIsAuto-check: warnings
  • Effect TS

    pproenca/dot-skills

    Effect-TS library usage in TypeScript — Effect.gen generators, Schema.Struct/Schema.Class definitions, Layer/Context.Tag/Service patterns, Effect.pipe pipelines, Data.TaggedError/Data.Class error…

    215 GitHub stars~2k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Skill Inspector

    NVIDIA/SkillSpector

    Official

    Decides whether an agent skill is safe to install by combining a SkillSpector static scan with the agent's own source review, ending in APPROVE, CAUTION or REJECT.

    20k GitHub starsUsed in 1 repo~1.8k tokens
    SecurityAuto-check passed
  • Forensify

    alexgreensh/repo-forensics

    Cross-agent self-inspection of your AI-agent stack. An agent skill from alexgreensh/repo-forensics.

    188 GitHub stars~2.5k tokensUpdated 11 days ago
    SecurityAuto-check: notes
  • Secknowledge Skill

    Pa55w0rd/secknowledge-skill

    Web+AI 安全测试知识库。融合 WooYun 88,636 案例 + 先知 L1-L4 方法论 + GAARM 173 风险 + OWASP Top 10 (LLM/ASI/WSTG)。

    423 GitHub stars~2.7k tokensUpdated 3 mo ago
    SecurityAuto-check passed

More from wgpsec/AboutSecurity

All 64 skills in this repo
  • A skill your agent uses whenever the user asks to add, absorb, migrate, port, update, merge, compare, or extract security knowledge into the AboutSecurity repository from any external resource such…

    1.8k GitHub stars~1.4k tokensUpdated 4 days ago
    Auto-check passed
  • Ad Persistence

    wgpsec/AboutSecurity

    AD 域环境持久化技术。当已获取域管/本地管理员权限、需要建立持久访问以确保重启或密码更改后仍能回到目标环境时使用。覆盖主机级持久化(计划任务/注册表Run/COM劫持/WMI事件订阅/Windows服务/启动文件夹)、域级持久化(Golden Ticket/Silver Ticket/Skeleton…

    1.8k GitHub stars~2.3k tokensUpdated 4 days ago
    Auto-check passed
  • Apt Emulation

    wgpsec/AboutSecurity

    APT 模拟与情报驱动红队方法论。基于已知 APT 组织的 TTP(MITRE ATT&CK)设计红队行动计划。当需要模拟特定威胁组织、设计高仿真攻击演练、或根据威胁情报制定攻击策略时使用

    1.8k GitHub stars~922 tokensUpdated 4 days ago
    Auto-check passed
  • Argocd Tactics

    wgpsec/AboutSecurity

    ArgoCD 后渗透方法论:Redis缓存投毒集群接管、SSO认证绕过、未授权API枚举、恶意Application部署、Webhook SSRF、默认凭据利用。

    1.8k GitHub stars~510 tokensUpdated 4 days ago
    Auto-check passed
  • C2 Beacon Analysis

    wgpsec/AboutSecurity

    C2 Beacon 配置提取与分析。当捕获到 Cobalt Strike/Sliver/Havoc 等 C2 框架的 Beacon 样本、内存 dump、或网络流量时使用。提取 C2 地址、通信协议、Malleable Profile、Watermark 等关键情报。红队视角:了解蓝队如何从 Beacon 提取 IOC 以改进 C2 OPSEC

    1.8k GitHub stars~1.2k tokensUpdated 4 days ago
    Auto-check passed
  • C2 Evasion Methodology

    wgpsec/AboutSecurity

    C2框架免杀方法论:分析 C2 源码、搜索检测规则(YARA/Sigma/Snort)、逐规则分析、修改源码绕过检测。当遇到 YARA/Sigma/Snort 规则触发告警、beacon/implant 被杀软检测到时使用。第一步:确认 implant/beacon 语言和架构;第二步:搜索对应检测规则并逐规则分析修改

    1.8k GitHub stars~557 tokensUpdated 4 days ago
    Auto-check passed

Works with

Categories

Questions about Cot Injection

What does Cot Injection do?

思维链 (Chain-of-Thought) 注入攻击方法论。当目标系统使用 ReAct/CoT 框架进行多步推理、 Agent 依赖中间推理结果做决策、或需要测试思维链完整性时触发。. Cot Injection is an agent skill from wgpsec/AboutSecurity.

When should I use Cot Injection?

Cot Injection fits situations like: tasks that involve Prompt injection and agent security.

How do I install Cot Injection in Claude Code?

Run `npx skills add wgpsec/AboutSecurity --skill cot-injection -a claude-code`. Or copy the skill folder (skills/ai-security/cot-injection in wgpsec/AboutSecurity) into .claude/skills/cot-injection in your project. Claude Code loads it when a task matches its description.

How do I install Cot Injection in Codex?

Run `npx skills add wgpsec/AboutSecurity --skill cot-injection -a codex`. Or copy the skill folder (skills/ai-security/cot-injection in wgpsec/AboutSecurity) into .agents/skills/cot-injection in your project. Codex loads it when a task matches its description.

Can I use Cot Injection in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add wgpsec/AboutSecurity --skill cot-injection -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/cot-injection, .gemini/skills/cot-injection, .github/skills/cot-injection and .opencode/skills/cot-injection in your project.

What does Cot Injection need to run?

SKILL.md names no scripts, command-line tools or credentials: Cot Injection is instructions for the agent only.

Does Cot Injection access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Cot Injection safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Cot Injection use?

No licence was found for Cot Injection or its repository. Without one, default copyright applies: ask the author before reusing or redistributing it.

How many tokens does Cot Injection use?

About 640 tokens (SKILL.md is roughly 2.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Cot Injection?

Skills that share tags, products or a category with Cot Injection: Security Audit (312362115/claude, 107 stars), Agent Email Inbox (viclafouch/meme-studio, 110 stars), Effect TS (pproenca/dot-skills, 215 stars) and Skill Inspector (NVIDIA/SkillSpector, 20k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Cot Injection?

wgpsec (a GitHub organization) maintains it in wgpsec/AboutSecurity, which has 1,775 GitHub stars. The repository holds 64 skills in this directory. The repository was last updated on October 3, 2026.

Source: wgpsec/AboutSecurity on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.