Borrowing it
Nothing to install: this file belongs to lm203688/aishield. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/lm203688/aishield/main/AGENTS.mdgit clone --depth 1 https://github.com/lm203688/aishieldWrote 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/lm203688/aishield/agents-md)<a href="https://agentmods.dev/instructions/lm203688/aishield/agents-md"><img src="https://agentmods.dev/badge/instructions/lm203688/aishield/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/lm203688/aishield/agents-md"><img src="https://agentmods.dev/badge/instructions/lm203688/aishield/agents-md.svg" alt="Reviewed on agentmods" width="80" 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.01308 | $0.01308 |
| Opus 5 | $0.00654 | $0.00654 |
| Sonnet 5 | $0.00262 | $0.00262 |
| Haiku 4.5 | $0.00131 | $0.00131 |
Grade A, and why
aishield AGENTS.md scanned grade A with 1 finding 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 yesterday.
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.
Runs shell commandslowCapability
Expected in a hook, worth knowing in a rule or an instructions file.
匹配,绝不 `exec` / `os.system` / `subprocess` 被扫配置中的任何指令。 How it starts
The opening of the file, as written. The whole thing — 80 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md — Agent 原生项目手册(AIShield)
本文件供 AI 编码 agent(Claude Code / Codex / Cursor / AIShield 自身)直接读取。 目标:让 agent 在 不询问 的情况下理解架构、不变量与贡献约定。 借鉴自 heyclicky(
farzaa/clicky)的AGENTS.md增长飞轮——早期 MIT 开源 + agent 可读文档,3 周冲到 7.5k stars。
这是什么
AIShield 是 Agent 原生 AI 工具安全扫描器:扫描 MCP server / skill / GPTs / prompt,对齐 OWASP MCP Top 10 (2025) 与 OWASP Agentic AI Top 10 (ASI01–ASI10), 零第三方依赖、可 100% 离线运行。
- 仓库入口:
lm203688/aishield(public) - npm 包:
aishield-mcp-server(v4.3.0,238 条规则 = 静态 210 + 情报 9 + 雷达 19) - 线上站:
aishield.tools(Cloudflare Named Tunnel → VPS:8450→api/server.py) - 后端 API 前缀:
/api/v1(注意:/api/health会 404)
核心不变量(违背即 bug)
- 绝不 spawn 被扫配置里的命令。 扫描器把被扫内容当字符串读取、做正则/语义
匹配,绝不
exec/os.system/subprocess被扫配置中的任何指令。 自证:python scripts/prove_isolation.py(拦截 subprocess/os.system,断言 0 次 spawn)。 - 代码与配置绝不上传云端。 本地优先、零依赖、可离线。
- 绝不引用过期规则计数。 真值以
/api/v1/health的rules_breakdown为准; 改规则数必须同步mcp-server/README.md逐类表 + 跑scripts/sync_readme_counts()。 勿引用 227/215/133/228 等历史数字。 - 本地测试绿 ≠ CI 绿。 推送走
scripts/_push_batch.py(Contents API,单提交), 推完必须 API 复验。 - 事件型告警必须能销案。 "本轮新增 N 条漏洞" 类告警不会自动恢复,零新增即 resolve;
不要把它当健康型告警只在恢复时
--resolve。
架构速览
| 目录 / 文件 | 职责 |
|---|---|
api/server.py |
后端 FastAPI 服务(/api/v1/audit、/api/v1/handshake 等) |
scanner/ |
扫描引擎(engine.py 主入口 scan();rules.py 规则库;baseline_scan.py 基线漂移) |
mcp-server/src/index.ts |
MCP server(调后端 API,渲染结果给 agent) |
scripts/ |
运维脚本:tech_radar.py(雷达)、promote_rule.py(规则晋升)、radar_effect.py(效果度量)、_push_batch.py(推送) |
data/state/ |
运行时状态(tech_radar.json、radar_effect.json) |
.github/workflows/ |
CI/CD + 守夜 spine(cron 03:17)+ 独立 cron(self-heal/meta-monitor/stale) |
tests/ |
Python 测试套件(tests/run_all.py 统一入口) |
闭环四环节(落地必查)
检测 → 动作 → 验证 → 告警。任何新能力都要问:它在哪一步闭环?否则只是半成品。
一键启动(给 agent / 贡献者)
# 1. 克隆并准备
git clone https://github.com/lm203688/aishield.git && cd aishield
python -m venv .venv && source .venv/bin/activate && pip install pytest
# 2. 跑全量测试
python tests/run_all.py
# 3. 自证隔离不变量
python scripts/prove_isolation.py
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.
- yesterday Changed 0f22623c60f2
- 2d ago First seen · 80 lines · 1,308 tokens per session scan A 1798a801edb6
aishield AGENTS.md is an instructions file published in the GitHub repository lm203688/aishield (2 stars, last pushed yesterday), licensed MIT. It adds 1,308 tokens to every session, about $0.0065 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-14.
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).
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.
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.
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.
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).