Sandbox
@telagod/code-abyss

Persona, style, and skills bundle for coding agents

Code Abyss installs a layered runtime for coding agents: persona voice cards, output styles, and a routed skill system. It is designed to make replies more consistent, more domain-aware, and less generic across Claude Code, Codex, Gemini CLI, and OpenClaw.

239 stars32 forksJavaScriptUpdated 1mo ago
Who it's for

Builders who want their agent to sound and decide more consistently while they code, review, or handle security work.

What it delivers

You can give your agent a stable voice and reusable skill set instead of re-explaining how you want it to work every session.

What it does

Persona and style mix-and-match

Pairs named personas with output styles so the agent can keep a consistent voice without hard-coding one tone.

Skill routing

Loads domain skills on demand from `skills/`, including security, architecture, frontend, data, and self-evolution flows.

Security skill suite

Ships dedicated skills for defending applications, cloud and supply chain security, detection and response, and security architecture.

Persona voice card spec

Defines a schema-backed persona format with converters and validation so voice stays separate from judgment.

Cross-agent installation

Generates the right files for Claude Code, Codex CLI, Gemini CLI, and OpenClaw from one install flow.

Verification tools

Includes scripts and tests to validate skills, install output, persona behavior, and configuration drift.

How to get it

  1. 1Run
    npx code-abyss                      # Interactive — pick target, persona, style
    npx code-abyss --list-styles        # Browse styles
    npx code-abyss --uninstall claude   # Clean removal, restores user backups

README

Code Abyss — Personality, depth, and a security spine

Composable persona · style · 30 engineering skills · 4 native security domains · self-evolution forge
for Claude Code · Codex CLI · Gemini CLI · OpenClaw

Need code graph intelligence? Use the companion abyss Rust CLI — it auto-attaches its hooks to claude/codex/gemini. The indexing-code skill ships its calling convention; the CLI ships separately.

npm CI MIT Site

Website · Spec · 中文文档 · Changelog · Submit Persona


The problem

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, reviewing architecture, or triaging a P0 incident. They forget your conventions 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 never written 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.

What Code Abyss does

One command installs a layered runtime into your agent:

┌───────────────────────────────────────────────────────────┐
│  Voice      who it sounds like  →  config/personas/*.json │
│  Judgment    how it decides      →  skills/_kernel/*      │ ← lazy, router-invoked
│  Style       how it sounds       →  output-styles/*.md    │
└───────────────────────────────────────────────────────────┘

  6 personas  ×  6 styles  =  36 validated combinations

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); everything 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.

What's new in v4

  • 4 native security domains — 4073 lines of original defense engineering (no Apache-2.0 upstream)
  • 30 skills total, all SKILL.md ≤ 110 lines (avg 59), heavy content lives in references/
  • 5 verify skills rewritten as judgment-type knowledge (when to use, how to interpret output, exemption rules)
  • Office skills slim to under 100 lines each; 4 design systems consolidated into one selector skill
  • v4.1 — self-evolution forge: cultivating-skills / cultivating-personas let the agent distill repeated workflows into reusable skills, with a safety scan and a three-tier publish funnel (local → project → community)
  • v4.4 — hardware + academic writing: 3 new domain skills (KiCad EDA, hardware product pipeline, AIGC detection reduction) + prompt injection defense + execution-drive shared behavior
  • v4.5 — dynamic persona loading: only the abyss persona slug (邪修红尘仙) ships with npm — all other personas are fetched from GitHub on first use and cached locally, slimming the package
  • v4.6 — indexing-code skill (calling convention only): the indexing-code skill ships the calling convention 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 / @code-abyss/cli npm wrapper
  • v4.7 — measured resolution (abyss CLI): the companion abyss Rust CLI ships four-language reference resolution (Go / TypeScript / Python / Rust), benchmarked against SCIP ground truth across five corpora at ≥98.5% gated precision. See its repo for numbers
  • v4.8 — dynamic capability discovery: code-abyss reads abyss 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
  • v4.9 — hybrid split deprecation period: --with-abyss / --with-mcp deprecated; graph hooks for claude/codex/gemini move toward abyss attach (completed in v5.0)
  • v4.10 — mythos discipline kernel + Persona Voice Card: lazy kernel, voice-only personas — see Discipline kernel and Persona Voice Card
  • v5.0.0-rc.1 — Agent OS (RC): kill foyer (no binary/MCP/graph inject in code-abyss), default character enforcement, inject plane, doctor / compose / score. Upgrade guide: docs/MIGRATION-v5.md
npx code-abyss@5.0.0-rc.1 -t claude -y                     # persona / skills / style + default enforcement + inject map
curl -fsSL https://raw.githubusercontent.com/telagod/abyss/main/install.sh | bash   # abyss CLI (separate product)
abyss attach claude                               # code-graph hooks (idempotent)
npx code-abyss doctor                             # health + migration hints

Swap -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:

claude plugin install code-abyss

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>.


Personas

CORE · LITERARY

邪修红尘仙 · abyss

吾 → 魔尊

Security-first dark cultivator. Direct, decisive, closes every loop. Ships with npm — works offline.

#security #xianxia #decisive

REMOTE · LITERARY

文言小生 · scholar

在下 → 前辈

Literary Chinese scholar. Treats code as poetry, debugging as puzzle-solving.

#literary #classical #meticulous

REMOTE · CASUAL

知性大姐姐 · elder-sister

姐姐 → 小宝

Warm mentor. Wraps sharp judgment in genuine care. Guides through questions.

#gentle #mentoring #insightful

REMOTE · PLAYFUL

古怪精灵小师妹 · junior-sister

本仙女 → 师兄

Hyperactive bug hunter. Roasts bad code, then silently fixes it.

#playful #energetic #chaotic

REMOTE · CASUAL

铁壁暖阳 · iron-dad

哥 → 宝子

Dependable big brother. Absorbs pressure, radiates warmth. Dad-joke equipped.

#warm #dependable #protective

REMOTE · COMMUNITY

东北魅影·雨姐 · dongbei-yujie

姐 → 老蒯

Sharp-tongued Northeast code overseer. Cuts straight to the bug, then patches the road. Creator: wons

#dongbei #blunt #principal

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/.

# Mix freely — any persona × any style
npx code-abyss -t claude --persona elder-sister --style abyss-cultivator -y
# → fetches elder-sister on first run, cached thereafter

Browse the full gallery →


Discipline kernel

Voice and style change; judgment shouldn't. Underneath every persona×style combination sits a discipline kernel — 9 bundles of engineering judgment, vendored in-tree (skills/_kernel/, via npm run kernel:sync) and invoked lazily by a thin router (never baked into every prompt, so adding discipline content doesn't blow the context budget):

BundleGoverns
🏛 doctrineDelegation, retry/escalate/ask-user decisions, the done-gate
🔍 methodsInvestigating, designing, planning, verifying, writing for someone else
🎭 characterPushback, scope sizing, bad news, resisting the trained agree-reflex
🔁 loop-engineeringSession pacing, unit sizing, where a learning should live
⚙️ backendStack/architecture tradeoffs, data discipline, production floors
🎨 frontendVisual design taste, concrete craft over generic defaults
🔩 hardwareComponent selection, electrical margins, firmware-for-unattended-devices
🤖 mlMethod-selection ladder, eval-as-spec, LLM-era craft
🛡 securityThreat modeling, the authorization gate before any offensive-flavored request

Two ways this becomes real, not aspirational:

  • Enforcement (default on claude/codex): install injects a character Stop-hook backstop that forces one revision turn if a reply opens with a banned capitulation phrase ("you're absolutely right", "good catch", …). Opt out with --no-enforcement.
  • Measurement: scripts/persona-battery/ is a small, honest behavioral eval — 10 probes (does the persona hold correctness over agreeableness? lead with bad news? refuse to fake a "done"?) scored by an LLM judge, never faked as a pass when unscored. See CLAUDE.md's persona behavioral battery section to run it (costs real API calls, not part of default CI).

Domain 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.


Security suite (v4 highlight)

4 native security 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.

SkillFocusSize
🛡 defending-applicationsWeb/API/GraphQL hardening, OAuth/OIDC/JWT/Session, LLM AppSec (prompt injection, RAG poisoning, agent authz)785 lines
☁️ securing-cloud-and-supply-chainContainer escape, K8s RBAC/PSS, Service Mesh, SLSA/Sigstore/SBOM, cloud IAM, IaC1246 lines
🔭 detecting-and-respondingSigma/YARA rule writing, EDR primitives, NIST 800-61 IR, forensics (Win/Linux/Mac/Cloud), hypothesis-driven threat hunting942 lines
🏛 architecting-securitySTRIDE/PASTA/LINDDUN threat modeling, zero-trust identity (WebAuthn / Kerberos hardening / PAM JIT), SOC2/PCI/HIPAA/GDPR evidence chains1100 lines

Plus securing-systems as the router skill covering 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.


Code graph intelligence (powered by 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.

CapabilityWhat it answersCommand
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
Evolution 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. Available as a CLI via the agent's shell tool, or as an abyss mcp server (7 tools over stdio).

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 five corpora — published whatever the numbers say:

CorpusLanguageGated precisionGated recall
gin v1.10.0Go99.3%82.6%
hono v4.6.14TypeScript98.8%63.8%
click 8.1.8Python98.7%94.6%
ripgrep 14.1.1Rust98.5%75.3%
abyss (dogfood)Rust100.0%90.9%
# Real output from a 1862-file Go project (seconds to index):

$ abyss impact SetError
impact: SetError  direct=17  transitive=521  tests=469  uncovered=319  risk=10.0/10
  ⚠ high blast radius (17 direct callers)
  ⚠ deep dependency chain (521 transitive)
  ⚠ 319 call paths without test coverage

abyss is a separate Rust binary (telagod/abyss). Install it via abyss's own channels (not code-abyss):

npm install -g @code-abyss/cli   # prebuilt binary, all platforms
cargo binstall code-abyss        # or: cargo install code-abyss

Skills

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. Average SKILL.md is 59 lines; heavy content lives in references/. (verify:skills validates 39 total — these 30 domain skills plus the 9 discipline kernel bundles, which are router-invoked judgment, not user-facing commands.)

DomainCoverage
🛡 Security4 native suites above (defending / cloud / detect-respond / architect) + pentest / code-audit / red-blue-purple team
🤖 AI / AgentSingle-agent dev (ReAct/Plan-Execute), multi-agent orchestration, RAG, prompt engineering, LLM security
🏛 ArchitectureAPI design, cloud-native patterns, messaging, caching, data security
💻 DevelopmentPython, TypeScript, Go, Rust, Java, C++, Shell
🚀 DevOpsGit workflow, testing, databases, observability, performance, FinOps
🎨 FrontendUnified design system selector — Glassmorphism / Liquid Glass / Neubrutalism / Claymorphism
📑 OfficeWord, PDF, PowerPoint, Excel — OOXML-level automation
📡 Infra / Mobile / DataKubernetes, GitOps, IaC · iOS, Android, RN, Flutter · pipelines, streaming, quality
🔩 Hardware / EmbeddedFull-stack hardware product pipeline (ESP-IDF firmware + KiCad PCB + UniApp) · KiCad 9 MCP tool routing (17 tools, autoroute-only, DRC gate)
📝 Academic WritingAIGC detection reduction for 维普/知网/Turnitin — multi-layer rewriting (structure → lexicon → content injection), docx run-level editing
🔬 Code IntelligenceCall graph, impact analysis, hotspot detection, change coupling, evolution tracing — via abyss CLI with cross-platform hooks
🜲 Self-evolutioncultivating-skills (distill repeated workflows) + cultivating-personas (distill voice into a Persona Voice Card) — both with safety scan + 3-tier publish funnel

Five skills also ship as executable verification tools for CI:

node skills/analyzing-security/scripts/security_scanner.js .       # OWASP / injection / secrets
node skills/checking-code-quality/scripts/quality_checker.js .     # Complexity, dupes, naming
node skills/analyzing-changes/scripts/change_analyzer.js --mode staged
node skills/verifying-modules/scripts/module_scanner.js <path>
node skills/generating-docs/scripts/doc_generator.js <path>

Install

TargetCommandArtifacts
Claudenpx code-abyss -t claude -yCLAUDE.md + skills + output styles + settings
Codexnpx code-abyss -t codex -yinstruction.md + skills + config.toml
Gemininpx code-abyss -t gemini -yGEMINI.md + skills + commands
OpenClawnpx code-abyss -t openclaw -ySkills + workspace AGENTS.md / SOUL.md
npx code-abyss                      # Interactive — pick target, persona, style
npx code-abyss --list-styles        # Browse styles
npx code-abyss --uninstall claude   # Clean removal, restores user backups

Code Abyss tracks every installed file in .code-abyss-backup/manifest.json. Uninstall restores your previous configuration verbatim. Your custom skills coexist with Code Abyss skills — install/uninstall preserves anything you put under ~/.{target}/skills/ yourself.

Upgrading

FromToPath
v3.xv4.xnpx code-abyss --uninstall <target> → install v4 → npm run migrate:v4 -- -t <target> (optional cleanup)
v2.xv3.xnpx code-abyss --uninstall <target> first, then install v3

Persona Voice Card · open standard

Code Abyss ships Persona Voice Card v1.0 — a closed-vocabulary 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 voice-only 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):

{
  "spec": "persona-voice-card",
  "spec_version": "1.0",
  "slug": "stoic-architect",
  "label": "Stoic Architect",
  "self": "I", "user": "colleague",
  "language": "English, technical terms preserved",
  "register": "formal", "emoji_policy": "none",
  "flourish": ["Let's look at the constraints first"]
}

register/emoji_policy each select one of a handful of code-owned template sentences — the persona picks, never writes, the sentence. Every render re-validates against the schema, no bypass; a validation failure (hand-edit, stale cache, compromised community fork) falls back to a neutral voice instead of ever rendering unvalidated content.

Bidirectional converters ship out of the box:

const { toCharaCardV2, toGPTInstructions, fromCharaCardV2 } =
  require('code-abyss/bin/lib/persona-converter');

const cc  = toCharaCardV2(card);   // → SillyTavern / Chub.ai
const gpt = toGPTInstructions(card); // → OpenAI Custom GPT

Specification · JSON Schema · Reference cards · Deprecated v1.0 spec


Why Code Abyss

Without Code AbyssWith Code Abyss
IdentityFlat help-desk toneConsistent character with named voice
ExecutionAd-hoc, varies by promptIron laws + skill routing baked in
Judgment under pressureAgrees when pushed, buries bad newsDiscipline kernel + Stop-hook backstop against the trained agree-reflex
Code awarenessgrep + read one file at a timeCall graph, impact analysis, hotspot map — agent knows what breaks before it edits
Domain depthGeneric best-practices30 skill files load by context + 9 kernel judgment bundles
Security depthOWASP recitation4 native suites · 4073 lines · detection signals + mitigation patterns
Cross-platformRe-engineer per CLIOne spec, four platforms, cross-platform hooks
ReproducibilityPrompt drift across sessionsVersioned, schema-enforced persona voice card + behavioral battery to check it holds

Contributing

git clone https://github.com/telagod/code-abyss && cd code-abyss
npm install
npm test                    # full Jest suite (see suite summary on run)
npm run verify:skills       # Validate 39 skill contracts (30 domain + 9 kernel)

Add a skill — create skills/<gerund-name>/SKILL.md with SKILL frontmatter, optionally add scripts/ for executable tools. npm run verify:skills validates 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, reviewing, and submitting via a pre-configured issue template.


MIT License · v5.0.0-rc.1 · made with 紫宵脉 by @telagod

Files in the repo

Repository payload22 top-level entries
  • .claude-plugin
  • .code-abyss
  • .github
  • assets
  • bin
  • config
  • docs
  • output-styles
  • packs
  • scripts
  • site
  • skills
  • test
  • .gitignore
  • .npmignore
  • CHANGELOG.md
  • CLAUDE.md
  • DESIGN.md
  • LICENSE
  • package-lock.json
  • package.json
  • README.md

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More plugins

Makes your AI agent think like the laziest senior dev in the room. The best code is the code you never wrote.

138k
1 add

Graphs that teach > graphs that impress. Turn any code into an interactive knowledge graph you can explore, search, and ask questions about. Works with Claude Code, Codex, Cursor, Copilot, Gemini CLI, and more.

82k
code-yeongyu/
oh-my-openagent

OmO: Just type "mass ulw" keyword with your prompt. Now you are the master of graph engineering.

69k

Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More

94k

Opinionated Oxlint rules for rejecting low-evidence TypeScript and JavaScript patterns

4.3k