Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/telagod/code-abyss/defending-applicationsnpx skills add telagod/code-abyss --skill defending-applicationsgit clone --depth 1 https://github.com/telagod/code-abyssWrote 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/skills/telagod/code-abyss/defending-applications)<a href="https://agentmods.dev/skills/telagod/code-abyss/defending-applications"><img src="https://agentmods.dev/badge/skills/telagod/code-abyss/defending-applications.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 | $0.00152 | $0.01313 |
| Opus 5 | $0.00076 | $0.00656 |
| Sonnet 5 | $0.00030 | $0.00263 |
| Haiku 4.5 | $0.00015 | $0.00131 |
Grade A, and why
defending-applications scanned grade A with 0 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 4d 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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 67 lines — stays where its author put it; the contents beside it link to each section on GitHub.
应用安全防御 · 镇魔甲
判断先于执行:决定「是否做 / 选什么 / 如何取舍」(栈、方案、架构、权衡)前,先读领域判断内核
skills/_kernel/security/SKILL.md——它管 judgment,本秘典管 execution;冲突时以内核判断为准。
开发侧防御秘典:站在 builder 一侧,把漏洞挡在合并前。 不教渗透,只教"如何写出杀不动的代码"和"如何把已生漏洞最小代价闭环"。 信级:项目源码/lock 文件 > 框架官方安全文档 > CVE/CWE > 训练记忆(标
[unverified])。
路由
| 意图 | 加载 | 触发词 |
|---|---|---|
| Web/API/GraphQL 漏洞防御 | web-api-appsec | XSS, SQLi, SSRF, BOLA, IDOR, Mass Assignment, GraphQL, 反序列化, 文件上传, 路径遍历, XXE, OWASP |
| 认证授权与会话 | oauth-and-sessions | OAuth, OIDC, JWT, SSO, SAML, Session, Cookie, PKCE, refresh token, kid 注入 |
| LLM 应用安全 | llm-appsec | Prompt 注入, 越狱, 越权调用, RAG 投毒, agent tool 滥用, 输出过滤, jailbreak |
何时使用
| 场景 | 使用本 skill | 使用其他 |
|---|---|---|
| review 自家代码、修 CVE、设计鉴权 | ✅ 本 skill | — |
| 写 SAST 规则、Semgrep 模式 | ✅ 本 skill + securing-systems/code-audit | — |
| 设计 LLM 应用的 guardrail | ✅ llm-appsec | + building-agent-systems/llm-security |
| 红队渗透、写 PoC 攻击目标 | ❌ | securing-systems/pentest |
| 处理已发生的入侵、日志取证 | ❌ | securing-systems/blue-team |
| 容器/K8s/CI 加固 | ❌ | provisioning-infrastructure |
| 设计零信任、身份架构 | 部分(OAuth/SSO 内) | architecting-security |
联动
- securing-systems/code-audit:本 skill 给"怎么修",code-audit 给"怎么找"。
- securing-systems/pentest:攻方视角验证本 skill 的修复是否真正闭环。
- analyzing-security:自动化扫描胶水;本 skill 提供规则语义。
- building-agent-systems/llm-security:agent 内部细节;本 skill 关注应用边界。
- designing-architectures:威胁建模、API 设计;本 skill 关注落地代码。
执行链
威胁建模 → 入口梳理 → source→sink 追踪 → 防御层选型 → 最小修复 → 回归测试 → 检测信号埋点
每个漏洞的修复必须回答三问:
- 入口在哪:用户可控数据从哪进来(route/header/cookie/body/file/upstream API/RAG doc)。
- 信任边界在哪:何处由"untrusted"变"trusted",是否有显式校验。
- 检测信号是什么:修复后若被绕过,哪条日志/指标会响。
铁律
- 服务端为真:前端校验只是 UX,所有 authz/sanitize 必须在服务端再做一次。客户端代码即攻击面。
- deny by default:authz、CORS、CSP、SQL where 子句、文件类型——所有名单皆 allowlist 优先,blacklist 是反模式。
- 不信任 ID:URL/body 里的 object_id 永远先做 ownership 校验,再做业务逻辑。BOLA 是 API 漏洞之王。
- 可观测优先于完美防御:每个高风险路径必须有结构化日志 + 速率/异常告警,被绕过时能 5 分钟内发现。
- 修复要带回归:每个漏洞修复必须配 1 个攻击用例测试 + 1 个正常用例测试,否则六个月后必复发。
What ships with it
3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 4d ago First seen · 67 lines · 152 tokens per session scan A 69760465a28f
defending-applications is a skill published in the GitHub repository telagod/code-abyss (239 stars, last pushed 1mo ago), licensed MIT. It adds 152 tokens to every session and 1,313 once invoked, about $0.0008 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
codexkit-api-design-reviewer
Review REST and GraphQL API designs for consistency, usability, and best practices. Covers naming conventions, versioning strategy, error format, pagination, authentication patterns, and breaking change detection. Use when reviewing API specs, designing new APIs, or auditing existing endpoints.
codexkit-change-management-plan
Build change management plans using ADKAR and Kotter's 8-Step framework. Covers stakeholder readiness, communication plans, training schedules, resistance management, and adoption metrics. Use when rolling out new systems, reorganizations, or process changes that affect people.
codexkit-crisis-communication
Draft crisis communication packages including holding statements, stakeholder updates, Q&A documents, and internal briefs. Follows ICS (Incident Command System) communication principles. Use during PR crises, data breaches, product recalls, or any event requiring rapid coordinated messaging.
codexkit-interview-guide-builder
Build structured behavioral interview guides using the STAR method. Map job competencies to interview questions, provide scoring rubrics (1–5), and include follow-up probes and red/green flag indicators. Use when preparing for hiring interviews or standardizing interview practices.
codexkit-legal-due-diligence
Conduct structured legal due diligence for M&A, joint ventures, or investment transactions. Cover all 9 workstreams — Corporate, Contracts, IP, Litigation, Regulatory, Employment, Tax, Environmental, and Data Privacy. Produce a risk matrix with deal-breaker flags and closing conditions. Use when evaluating a target or…
codexkit-a-b-test-planner
Design rigorous A/B test plans with hypothesis, sample size calculation, Minimum Detectable Effect (MDE), randomization strategy, and decision rules. Includes guardrail metrics and rollout playbook. Use when planning product experiments, conversion optimization, or data-driven feature decisions.