红蓝攻防
点击放大

<!-- Code Abyss · README -->
<p align="center">
<a href="
<img src=" alt="Code Abyss — Personality, depth, and a security spine" width="100%">
</a>
</p>
<h3 align="center">Composable persona · style · 30 engineering skills · 4 nati domains · self-e forge<br/>for Claude Code · Codex CLI · Gemini CLI · OpenClaw</h3>
<p align="center"><sub>Need code graph intelligence? Use the companion <a href=" Rust CLI — it auto-attaches its hooks to claude/codex/gemini. The <code>indexing-code</code> skill ships its calling con; the CLI ships separately.</sub></p>
<p align="center">
<a href=" src=" alt="npm"></a>
<a href=" src=" alt="CI"></a>
<a href="LICENSE"><img src=" alt="MIT"></a>
<a href=" src=" alt="Site"></a>
</p>
<p align="center">
<a href=" ·
<a href="docs/specs/persona-.0.md"><b>Spec</b></a> ·
<a href="docs/README.zh-CN.md"><b>中文文档</b></a> ·
<a href="CHANGELOG.md"><b>Changelog</b></a> ·
<a href=" Persona</b></a>
</p>
---
Most AI coding agents have no memory of who they are. They respond in the same flat tone whether they're debugging a race condition, re architecture, or triaging a P0 incident. They forget your con between sessions. They flip-flop on advice. They sound like a help-desk script.
And when you ask them about security — pentest, code audit, threat modeling, IR — most agents fall back to generic OWASP recitation, because the underlying skill library was ne by people who actually run red/blue/purple teams.
You don't want a help desk. You want a principal engineer who shows up with a personality, executes consistently, closes the loop — and has a security spine when things get real.
One command installs a layered runtime into your agent:
Pick any persona. Pair it with any style. Underneath both sits a discipline kernel — 9
bundles of engineering judgment (when to push back, how to size scope, when a domain calls
for a specific tradeoff) invoked by a thin router on demand instead of baked into every
prompt. The always-on core stays small (iron laws, skill routing, a precedence anchor,
the safety floor); e else loads lazily so adding discipline content doesn't blow
the context budget. Your agent becomes a **consistent character with structured execution,
domain expertise, and a backstop against the trained agree-reflex** — across every session.
SKILL.md ≤ 110 lines (avg 59), hea lives in references/culti / culti let the agent distill repeated workflows into reusable skills, with a safety scan and a three-tier publish funnel (local → project → community)abyss persona slug (邪修红尘仙) ships with npm — all other personas are fetched from GitHub on first use and cached locally, slimming the packageindexing-code skill (calling con only): the indexing-code skill ships the calling con for the external abyss Rust CLI (call graph + temporal analysis). The CLI itself is a separate product with its own release cadence — install it with its own install.sh / cargo binstall / -abyss/cli npm wrapperabyss Rust CLI ships four-language reference resolution (Go / TypeScript / Python / Rust), benchmarked against SCIP ground truth across fi at ≥98.5% gated precision. See its repo for numbersabyss skill-manifest when the installed abyss CLI is ≥ 0.5.22 — exposed CLI commands, MCP tools, and daemon socket verbs are discovered at install time instead of hard-coded--with-abyss / --with-mcp deprecated; graph hooks for claude/codex/gemini mo abyss attach (completed in v5.0)doctor / compose / score. Upgrade guide: docs/MIGRATION-v5.mdSwap -t claude for codex / gemini / openclaw. For openclaw/pi/hermes (whose hook surface abyss CLI does not own), use npx code-abyss -t openclaw --with-hooks to spawn the bundled install-hooks.sh. Or as a Claude Code plugin:
> v5 cutover: code-abyss does not download the abyss binary or inject graph hooks for claude/codex/gemini (--with-abyss / --with-mcp removed). Character Stop-hook is default on (opt out: --no-enforcement). Recompose without reinstall: npx code-abyss compose -t claude --persona <slug> --style <slug>.
---
<table>
<tr>
<td width="50%" ="top">
<sub><b>CORE · LITERARY</b></sub>
abyss> 吾 → 魔尊
Security-first dark cultivator. Direct, decisi every loop. Ships with npm — works offline.
#security #xianxia #decisive
</td>
<td width="50%" ="top">
<sub><b>REMOTE · LITERARY</b></sub>
scholar> 在下 → 前辈
Literary Chinese scholar. Treats code as poetry, debugging as puzzle-solving.
#literary #classical #meticulous
</td>
</tr>
<tr>
<td ="top">
<sub><b>REMOTE · CASUAL</b></sub>
elder-sister> 姐姐 → 小宝
Warm mentor. Wraps sharp judgment in genuine care. Guides through questions.
#gentle #mentoring #insightful
</td>
<td ="top">
<sub><b>REMOTE · PLAYFUL</b></sub>
junior-sister> 本仙女 → 师兄
Hyperactive bug hunter. Roasts bad code, then silently fixes it.
#playful #energetic #chaotic
</td>
</tr>
<tr>
<td ="top">
<sub><b>REMOTE · CASUAL</b></sub>
iron-dad> 哥 → 宝子
Dependable big brother. Absorbs pressure, radiates warmth. Dad-joke equipped.
#warm #dependable #protective
</td>
<td ="top">
<sub><b>REMOTE · COMMUNITY</b></sub>
dongbei-yujie> 姐 → 老蒯
Sharp-tongued Northeast code o. Cuts straight to the bug, then patches the road. <sub>Creator: wons</sub>
#dongbei #blunt #principal
</td>
</tr>
</table>
Core persona (abyss) ships with npm and works offline. Remote personas are fetched from GitHub on first --persona <slug> use and cached at ~/.code-abyss/personas/.
Browse the full gallery →
---
Voice and style change; judgment shouldn't. Underneath every persona×style combination sits
a discipline kernel — 9 bundles of engineering judgment, in-tree (skills/_kernel/,
via npm run kernel:sync) and invoked lazily by a thin router (ne into every
prompt, so adding discipline content doesn't blow the context budget):
| Bundle | Governs |
|---|---|
| 🏛 doctrine | Delegation, retry/escalate/ask-user decisions, the done-gate |
| 🔍 methods | In, designing, planning, , writing for someone else |
| 🎭 character | Pushback, scope sizing, bad news, resisting the trained agree-reflex |
| 🔁 loop-engineering | Session pacing, unit sizing, where a learning should live |
| ⚙️ backend | Stack/architecture tradeoffs, data discipline, production floors |
| 🎨 frontend | design taste, concrete craft o defaults |
| 🔩 hardware | Component selection, electrical margins, firmware-for-unattended-devices |
| 🤖 ml | Method-selection ladder, e, LLM-era craft |
| 🛡 security | Threat modeling, the authorization gate before any offensi request |
Two ways this becomes real, not aspirational:
--no-enforcement.scripts/persona-battery/ is a small, honest beha eval — 10Domain bundles also wire upward into 16 matching exec skills (pentest, architecture
design, ML pipelines, etc.) as a "judgment before execution" gate — the domain bundle
decides *whether/what/tradeoffs*, the exec skill still owns *how*.
---
4 nati skills, 4073 lines of original engineering content. No Apache-2.0 upstream — every example, every detection signal, every defense pattern is written for this project.
| Skill | Focus | Size |
|---|---|---|
| 🛡 defending-applications | Web/API/GraphQL hardening, OAuth/OIDC/JWT/Session, LLM AppSec (prompt injection, RAG poisoning, agent authz) | 785 lines |
| ☁️ securing-cloud-and-supply-chain | Container escape, K8s RBAC/PSS, Service Mesh, SLSA/Sigstore/SBOM, cloud IAM, IaC | 1246 lines |
| 🔭 detecting-and-responding | Sigma/YARA rule writing, EDR primitives, NIST 800-61 IR, forensics (Win/Linux/Mac/Cloud), hypothesis-dri hunting | 942 lines |
| 🏛 architecting-security | STRIDE/PASTA/LINDDUN threat modeling, zero-trust identity (WebAuthn / Kerberos hardening / PAM JIT), SOC2/PCI/HIPAA/GDPR e chains | 1100 lines |
Plus securing-systems as the router skill co pentest, code audit, red/blue/purple team operations. Every attack technique ships with the matching detection signal and mitigation pattern — "with offense as defense" is structural, not lip service.
---
abyss)Your agent can now see code relationships. The abyss CLI builds a full call graph, temporal analysis, and hotspot map — in seconds, with zero cloud dependencies.
| Capability | What it answers | Command |
|---|---|---|
| Caller tracing | "Who calls this function?" | abyss callers <symbol> |
| Impact analysis | "What breaks if I change this?" | abyss impact <symbol> |
| File context | "What do I need to know before editing this file?" | abyss context <file> |
| Hotspot map | "Where is the riskiest code?" | abyss map |
| Change coupling | "Which files always change together?" | abyss map |
| E trace | "Why does this code look the way it does?" | abyss history <file> |
The indexing-code skill automatically hooks into all 4 supported platforms — before every Edit/Write, the agent checks callers and warns about high-impact changes. A as a CLI via the agent's shell tool, or as an abyss mcp server (7 tools o).
Resolution is measured, not asserted. abyss resolves call references through tiered heuristics, each tagged with a confidence score, and benchmarks itself against SCIP (compiler-grade) ground truth across four languages and fi — published whatever the numbers say:
| Corpus | Language | Gated precision | Gated recall |
|--------|----------|----------------:|-------------:|
| gin v1.10.0 | Go | 99.3% | 82.6% |
| hono v4.6.14 | TypeScript | 98.8% | 63.8% |
| click 8.1.8 | Python | 98.7% | 94.6% |
| ripgrep 14.1.1 | Rust | 98.5% | 75.3% |
| abyss (dogfood) | Rust | 100.0% | 90.9% |
abyss is a separate Rust binary (telagod/abyss). Install it 's own channels (not code-abyss):
---
30 domain skills, flat structure, agentskills.io aligned (with Code Abyss extensions). Skills load by context — the agent reads the right knowledge at the right time without being asked. A SKILL.md is 59 lines; hea lives in references/. (:skills 39 total — these 30 domain skills plus the 9 discipline kernel bundles, which are router-invoked judgment, not user-facing commands.)
| Domain | Co |
|---|---|
| 🛡 Security | 4 nati abo / cloud / detect-respond / architect) + pentest / code-audit / red-blue-purple team |
| 🤖 AI / Agent | Single-agent de/Plan-Execute), multi-agent orchestration, RAG, prompt engineering, LLM security |
| 🏛 Architecture | API design, cloud-nati, messaging, caching, data security |
| 💻 De | Python, TypeScript, Go, Rust, Java, C++, Shell |
| 🚀 DevOps | Git workflow, testing, databases, obser, performance, FinOps |
| 🎨 Frontend | Unified design system selector — Glassmorphism / Liquid Glass / Neubrutalism / Claymorphism |
| 📑 Office | Word, PDF, PowerPoint, Excel — OOXML-le |
| 📡 Infra / Mobile / Data | Kubernetes, GitOps, IaC · iOS, Android, RN, Flutter · pipelines, streaming, quality |
| 🔩 Hardware / Embedded | Full-stack hardware product pipeline (ESP-IDF firmware + KiCad PCB + UniApp) · KiCad 9 MCP tool routing (17 tools, autoroute-only, DRC gate) |
| 📝 Academic Writing | AIGC detection reduction for 维普/知网/Turnitin — multi-layer rewriting (structure → lexicon → content injection), docx run-le |
| 🔬 Code Intelligence | Call graph, impact analysis, hotspot detection, change coupling, e tracing — via abyss CLI with cross-platform hooks |
| 🜲 Self-e | culti (distill repeated workflows) + culti (distill voice into a Persona Voice Card) — both with safety scan + 3-tier publish funnel |
Fi also ship as executable tools for CI:
---
| Target | Command | Artifacts |
|---|---|---|
| <img src=" alt="Claude"> | npx code-abyss -t claude -y | CLAUDE.md + skills + output styles + settings |
| <img src=" alt="Codex"> | npx code-abyss -t codex -y | instruction.md + skills + config.toml |
| <img src=" alt="Gemini"> | npx code-abyss -t gemini -y | GEMINI.md + skills + commands |
| <img src=" alt="OpenClaw"> | npx code-abyss -t openclaw -y | Skills + workspace AGENTS.md / SOUL.md |
Code Abyss tracks every installed file in .code-abyss-backup/manifest.json. Uninstall restores your previous configuration . Your custom skills coexist with Code Abyss skills — install/uninstall preser you put under ~/.{target}/skills/ yourself.
| From | To | Path |
|---|---|---|
| v3.x | v4.x | npx code-abyss --uninstall <target> → install v4 → npm run migrate:v4 -- -t <target> (optional cleanup) |
| v2.x | v3.x | npx code-abyss --uninstall <target> first, then install v3 |
---
Code Abyss ships Persona Voice Card v1.0 — a
closed- voice format, not a document. It supersedes the original Tech Persona Card
v1.0 (deprecated, frozen for link stability): that format's freeform identity.md/behavior.md
files and scenarios[].priority/capabilities.authorization fields let real judgment content
accrete into what was supposed to be a layer, with nothing checking for it. The
replacement's whole design principle: **a persona cannot carry judgment if there is no field
shaped like a decision table anywhere in its type** — not a review checklist, the schema itself.
Each persona ships as one flat file — self/user/language/register/emoji_policy/flourish
and nothing else (additionalProperties: false):
register/emoji_policy each select one of a handful of code-owned template sentences — the
persona picks, ne, the sentence. Every render re- against the schema, no
bypass; a failure (hand-edit, stale cache, compromised community fork) falls back to
a neutral voice instead of e un content.
Bidirectional con ship out of the box:
Specification · JSON Schema · Reference cards · Deprecated v1.0 spec
---
| | Without Code Abyss | With Code Abyss |
|---|---|---|
| Identity | Flat help-desk tone | Consistent character with named voice |
| Execution | Ad-hoc, by prompt | Iron laws + skill routing baked in |
| Judgment under pressure | Agrees when pushed, buries bad news | Discipline kernel + Stop-hook backstop against the trained agree-reflex |
| Code awareness | grep + read one file at a time | Call graph, impact analysis, hotspot map — agent knows what breaks before it edits |
| Domain depth | Generic best-practices | 30 skill files load by context + 9 kernel judgment bundles |
| Security depth | OWASP recitation | 4 nati · 4073 lines · detection signals + mitigation patterns |
| Cross-platform | Re-engineer per CLI | One spec, four platforms, cross-platform hooks |
| Reproducibility | Prompt drift across sessions | , schema-enforced persona voice card + beha battery to check it holds |
---
Add a skill — create skills/<gerund-name>/SKILL.md with SKILL frontmatter, optionally add scripts/ for executable tools. npm run :skills the contract.
Submit a persona — open an Issue via the submission portal. The site walks you through generating a single <slug>.json persona voice card with your own AI, re, and submitting via a pre-configured issue template.
---
<p align="center">
<sub>
<b>MIT License</b> · v5.0.0-rc.1 · made with 紫宵脉 by <a href="
</sub>
</p>
开发语言:JavaScript
Star 数:242
该项目属于红蓝攻防方向的开源资源,代码结构清晰,适合安全研究人员学习参考。项目围绕Give your AI coding agent a personality. Composable persona + style + skills for Claude Code, Codex, Gemini CLI & OpenClaw. Ships Tech Persona Card v1.0 spec.展开,提供了可运行的实现,对理解相关安全机制、工具原理与攻防技术具有较高的研究价值。
从技术实现角度看,此类项目的核心在于对底层原理的深入理解与工程化落地。开发者在研究过程中可以结合官方文档与社区讨论,梳理项目的初始化流程、核心模块职责与数据流转,逐步掌握其中的技术细节与设计思路。
1. 下载源码压缩包,解压到本地环境。
2. 根据项目类型准备对应的运行环境与依赖。
3. 按照 README 中的步骤完成配置与部署。
4. 在隔离的测试环境中运行验证,避免影响生产系统。
本资源来源于开源社区,仅供安全研究、技术学习与合法授权范围内的攻防演练使用,请勿用于任何非法或侵害他人权益的用途。使用本项目产生的一切后果由使用者自行承担。
| 资源标题 | code-abyss - Give your AI coding agent a personality. Composabl |
| 所属分类 | 红蓝攻防 |
| 发布作者 | admin |
| 发布时间 | 2026-10-06 00:46:03 |
| 下载权限 | 免费下载 |
| 附件数量 | 2 个下载链接 |
| 浏览次数 | 337 |
| 讨论数量 | 0 |
| 主题状态 | 正常讨论中 |