Getting it into your agent
There is no command for this one: it runs only inside a plugin, and the catalogue could not identify which plugin ships it. The source is linked below.
Wrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/maxwzg/claude-code-auto-approve/claude-md)<a href="https://agentmods.dev/instructions/maxwzg/claude-code-auto-approve/claude-md"><img src="https://agentmods.dev/badge/instructions/maxwzg/claude-code-auto-approve/claude-md.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.01509 | $0.01509 |
| Opus 5 | $0.00754 | $0.00754 |
| Sonnet 5 | $0.00302 | $0.00302 |
| Haiku 4.5 | $0.00151 | $0.00151 |
Grade C, and why
claude-code-auto-approve CLAUDE.md scanned grade C with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Asks for rootmediumPrivilege escalation
A mod that escalates privileges can change anything on the machine, not only the project.
"Bash(sudo *)" Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
1. `~/.claude/settings.json` (用户级) How it starts
The opening of the file, as written. The whole thing — 219 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLAUDE.md
此文件为 Claude Code (claude.ai/code) 在此代码库中工作时提供指导。
项目概述
这是 claude-code-auto-approve - 一个 Claude Code Plugin,用于智能 Bash 命令自动批准。
Plugin 功能
- PreToolUse Hook: 自动批准复合 Bash 命令(管道、链式、子shell 等)
- PostToolUse Hook: 自动学习用户批准的新命令并添加到允许列表
- 安全检查: 区分安全命令和危险命令,保护系统安全
- 依赖检查: 自动检测所需依赖(jq, shfmt 等),缺失时优雅降级
项目结构
claude-code-auto-approve/
├── .claude-plugin/ # Plugin 元数据
│ ├── plugin.json # Plugin 清单和 Hook 配置
│ └── marketplace.json # Marketplace 发布配置
│
├── scripts/ # 可执行脚本
│ ├── approve-compound-bash.sh # PreToolUse Hook
│ ├── post-process-compound-bash.sh # PostToolUse Hook
│ ├── add-to-allowlist.sh # 辅助工具
│ └── command-lists.sh # 共享配置
│
├── commands/ # Claude Code 命令文档
│ └── allowlist.md # /allowlist 命令
│
├── .claude/ # 示例配置
│ └── settings.example.json
│
├── 文档/
│ ├── README.md # 用户文档
│ ├── QUICKSTART.md # 快速入门
│ ├── DEVELOPMENT.md # 开发指南
│ ├── STRUCTURE.md # 架构说明
│ └── CHANGELOG.md # 变更日志
│
├── test-plugin.sh # 测试脚本
└── LICENSE # MIT 许可证
开发和测试
本地测试 Plugin
# 方法 1: 使用 --plugin-dir
claude --plugin-dir .
# 方法 2: 调试模式
claude --debug --plugin-dir .
# 方法 3: 运行测试脚本
bash test-plugin.sh
安装 Plugin
# 用户级别(推荐)
claude plugin install . --scope user
# 项目级别
claude plugin install . --scope project
# 本地级别
claude plugin install . --scope local
核心脚本说明
approve-compound-bash.sh (PreToolUse Hook)
功能: 在 Bash 命令执行前自动批准
依赖: jq, shfmt
工作流程:
- 解析复合命令为单个子命令
- 检查每个子命令是否在允许列表
- 全部允许 → 自动批准
- 包含拒绝 → 主动拒绝
- 部分未知 → 回退到原生提示
post-process-compound-bash.sh (PostToolUse Hook)
功能: 在 Bash 命令执行后自动学习
依赖: jq, awk, stat, date
工作流程:
- 检测用户批准的新命令
- 分类为安全命令和危险命令
- 自动添加安全命令到允许列表
- 提示手动添加危险命令
command-lists.sh
功能: 共享配置文件
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 5d ago First seen · 219 lines · 1,509 tokens per session scan C 07719a49b2da
claude-code-auto-approve CLAUDE.md is an instructions file published in the GitHub repository maxwzg/claude-code-auto-approve (2 stars, last pushed 5mo ago), licensed MIT. It adds 1,509 tokens to every session, about $0.0075 per session on Opus 5. A static security scan graded it C with 2 findings (asks for root, reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other instructions, from other repositories
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).
spec-kit AGENTS.md
AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.