Build something like this?

Inside Claude Code: The Claude Code Ecosystem

The open-source repos around Claude Code on one map. Claude Code, Claude Code Action, the Agent SDK for Python and the official plugins are mapped from their public code, with the demos, cookbooks and marketplaces drawn around them. Unofficial, not affiliated with Anthropic.

5 layers40 insightsby Supportv4Published Oct 8, 2026

About this system

The Claude Code ecosystem, left to right

This map covers 11 public repositories in the anthropics GitHub org and how they connect. It was drawn from their public code. It is an unofficial community map and is not affiliated with Anthropic.

  • Learn. Claude Cookbooks, Claude Quickstarts and the Claude Agent SDK Demos teach building on the Claude API and the Agent SDK.
  • Build. The Claude Code CLI is the hub. The Claude Agent SDK for Python drives it from code, with the CLI bundled.
  • Extend. Official Claude Code Plugins, Community Claude Code Plugins and Claude for Legal publish plugins that install into Claude Code.
  • Show up anywhere. The Claude Code GitHub Action runs Claude Code on pull requests and issues. Claude Desktop Buddy is ESP32 firmware that pairs with the Claude desktop app over Bluetooth LE and approves permission prompts from your desk.
  • Built by Claude. Claude's C Compiler is a Rust C compiler whose README says Claude Opus 4.6 wrote its code and docs. The dashed link to the model is build time only.

Outside the groups are the developer, GitHub, the Claude desktop app and the Anthropic API that every repo ultimately calls. Each repo box opens its own board, mapped from that repo's code.

The map

The map · Spine

Architecture

What's on this map
  • Anthropic API · anthropic
  • Agent SDK demos · custom app
  • Agent SDK (Python) · library app
  • Claude C Compiler · cli app
  • Claude Code · cli app
  • Claude Code Action · integration app
  • Claude for Legal · custom app
  • Community plugins · custom app
  • Official plugins · frontend app
  • Quickstarts · custom app
  • Cookbooks · custom app
  • Core runtime · platform foundation
  • Developer · actor
  • GitHub · github
  • Learning resources · bounded context
  • Plugin marketplaces · bounded context

The map · Layers

Layers5

What's on each layer

Agent SDK (Python)

Python SDK for Claude Code: a library that drives the Claude Code CLI as a subprocess, plus the tooling that builds and ships it. Container-grade L0 with 2 drill-downs (the SDK package and its examples).

  • Anthropic API · anthropic
  • GitHub Actions Workflows · infrastructure component
  • Claude Code CLI · cli tool
  • Developer & CI Helper Scripts · cli tool
  • Build, Release & CI Tooling · developer tooling
  • Examples · module
  • GitHub · github
  • MCP Python SDK · library package
  • PyPI · external integration
  • Wheel Build & Version Scripts · cli tool
  • Repo Claude Code Setup · domain group
  • Maintainer Slash Commands · agent command
  • Python Application Developer · actor
  • Slack · slack
  • Claude Agent SDK (Python package) · library package
  • Test Agent · ai agent
  • Verify Skill · agent skill
  • Workflow Hardening Guards · agent guardrail

Examples

Runnable example scripts demonstrating Claude Agent SDK features. Grain: terminal (plan fits, no drill-downs), one node per example script.

  • Agents · module
  • Agents & Extensibility · domain group
  • Filesystem Agents · module
  • Getting Started & Options · domain group
  • Hooks · module
  • Hooks & Permissions · domain group
  • Max Budget USD · module
  • MCP Calculator · module
  • Include Partial Messages · module
  • Plugin Example · module
  • Claude Agent SDK (Python package) · boundary port
  • Postgres Session Store · adapter component
  • Quick Start · module
  • Redis Session Store · adapter component
  • S3 Session Store · adapter component
  • Session Stores · domain group
  • Session Stores Package · module
  • Setting Sources · module
  • Stderr Callback · module
  • Streaming · domain group
  • Streaming Mode · module
  • Streaming Mode (IPython) · module
  • Streaming Mode (Trio) · module
  • System Prompt · module
  • Tool Permission Callback · module
  • Tools Option · module

Claude Agent SDK (Python package)

Python SDK package: public client/query API, runtime core over the Claude Code CLI, MCP bridge and session management. Grain: terminal (plan fits, no drill-downs).

  • ClaudeSDKClient · facade component
  • Control Protocol Query · engine component
  • Errors · schema model
  • Internal Client · engine component
  • MCP Compat · adapter component
  • MCP Integration · domain group
  • Message Parser · adapter component
  • Public API · domain group
  • query() · facade component
  • SDK MCP Bridge · adapter component
  • Package Exports · library package
  • Session Import · service component
  • Session Management · domain group
  • Session Mutations · service component
  • Session Resume · service component
  • Sessions · service component
  • Session Store · repository component
  • Session Store Conformance · developer tooling
  • Session Summary · service component
  • Subprocess CLI Transport · adapter component
  • Task Compat · adapter component
  • Transcript Mirror Batcher · service component
  • Types · schema model
  • Version Info · module

Claude C Compiler

CCC (Claude's C Compiler) is a from-scratch C compiler in Rust that targets x86-64, i686, AArch64 and RISC-V 64 and produces Linux ELF executables with its own assembler and linker. This L0 System Context is container-grade with 1 drill-down: the compiler itself, surrounded by the build systems that invoke it, the host sysroot it reads, the optional GCC fallback toolchain and the Linux ELF targets it emits for.

  • Build Systems & Developers · actor
  • GCC Fallback Toolchain · cli tool
  • Host Sysroot (headers + C runtime) · external integration
  • Linux ELF Targets · environment
  • CCC Compiler · cli tool

CCC Compiler

Internals of the CCC compiler package: driver and entrypoints over the frontend, IR, codegen and backend, and linker units, with shared utilities. Grain: container-grade, six pipeline stages are opaque drill-downs while the driver and shared code are inline.

  • Backend · module
  • Codegen · engine component
  • Common Types and Utilities · library package
  • Constant Evaluation · engine component
  • Compiler Driver · service component
  • Binary Entrypoints · cli tool
  • Frontend · module
  • Ir · engine component
  • Linker Common · library package
  • Passes · engine component

Backend

Compiler backend: four per-architecture code generators plus shared framework helpers. Grain: terminal-leaning container-grade; the four architectures are opaque drill-downs and only 3 own files remain here.

  • Arm · module
  • Backend Framework · module
  • I686 · module
  • Numeric Labels · module
  • Peephole Common · module
  • Codegen · boundary port
  • Linker Common · boundary port
  • Riscv · module
  • X86 · module

Arm

AArch64 backend: codegen, built-in assembler and built-in linker. Grain: terminal - no child units; file-level components grouped into assembler and linker. Linker components sit at board root (dense coupling, no container).

  • Assembler Driver · module
  • Assembly Parser · engine component
  • AArch64 Assembler · domain group
  • AArch64 Codegen · engine component
  • FP and NEON Encoders · engine component
  • Integer Encoders · engine component
  • Load/Store Encoders · engine component
  • Encoder Dispatch · engine component
  • Linker Driver · module
  • ELF Emitters · engine component
  • PLT/GOT Builder · engine component
  • Relocation Processing · engine component
  • ARM Peephole Optimizer · engine component
  • Peephole Common · boundary port

I686

i686 backend: codegen, built-in assembler encoder and ELF32 linker. Grain: terminal-ish component grain; plan was over-band (20 vs 15) but folded to 18 nodes with no deeper boards.

  • i686 Codegen Core · engine component
  • Encoder Core · engine component
  • GP Integer Encoder · engine component
  • SSE Encoder · engine component
  • System Encoder · engine component
  • x87 Encoder · engine component
  • i686 Assembler Encoder · domain group
  • i686 Codegen · domain group
  • i686 Linker · domain group
  • Linker Driver · engine component
  • Dynamic Symbols · engine component
  • Executable Emitter · engine component
  • Linker Input · adapter component
  • Object Parser · adapter component
  • Relocation Processor · engine component
  • Section Merger · engine component
  • Shared Library Emitter · engine component
  • Peephole Optimizer · engine component
  • Peephole Common · boundary port
  • X86 · boundary port

Riscv

RISC-V backend leaf files: instruction encoder, native linker and peephole. Grain: terminal - no child units, file-level components inside coupling-derived containers (plan read over-band at 17 files, no drill-downs proposed).

  • Atomics Encoder · engine component
  • Base Integer Encoder · engine component
  • Compressed Encoder · engine component
  • Encoder Dispatch · engine component
  • Floating-Point Encoder · engine component
  • Pseudo-Instruction Expander · engine component
  • System Encoder · engine component
  • Vector Encoder · engine component
  • Linker Driver · module
  • Input Loader · service component
  • Link Orchestrator · engine component
  • Relocation Applier · engine component
  • Relocation Definitions · module
  • Section Merger · engine component
  • Symbol Resolver · engine component
  • Peephole Common · boundary port
  • Codegen Module Root · module
  • RISC-V Instruction Encoder · domain group
  • RISC-V Native Linker · domain group
  • Peephole Optimizer · engine component

X86

x86-64 backend: codegen entry, built-in assembler (parser plus machine-code encoder) and built-in ELF linker. Grain: terminal, component-grade; no child units, files folded into role-level nodes.

  • Assembler Driver · facade component
  • Assembly Parser · engine component
  • Executable Emitter · engine component
  • Shared Object Emitter · engine component
  • Encoder Core · engine component
  • GP Integer Encoder · engine component
  • SSE and AVX Encoder · engine component
  • System and x87 Encoder · engine component
  • Linker Driver · engine component
  • PLT and GOT · engine component
  • Peephole Common · boundary port
  • X86 Assembler · domain group
  • X86 Codegen · engine component

Codegen

Codegen slice of the Rust C compiler: IR, optimization passes and target backends plus shared helpers. Grain: terminal (plan fits/under-band, no drill-downs proposed); the three child units are carried opaque. crate-root is a bootstrap singleton.

  • Backend · module
  • Crate Root · library package
  • Common Helpers · library package
  • IR · module
  • Passes · module
  • Backend · boundary port
  • Common Types and Utilities · boundary port
  • Frontend · boundary port
  • Ir · boundary port
  • Linker Common · boundary port

Backend

Compiler backend: shared core, per-architecture (x86-64, i686, ARM, RISC-V) codegen and stack layout. Grain: container-grade - the plan is over-band, so the three child units are opaque drill-downs and only leftover files are inlined.

  • Generation Dispatch · engine component
  • ARM Codegen · module
  • i686 Codegen Ops · module
  • Crate Root · boundary port
  • Common Helpers · boundary port
  • IR · boundary port
  • RISC-V Codegen Ops · module
  • Backend Core and Arch Glue · module
  • Stack Slot Coalescing · engine component
  • x86-64 Codegen · module

ARM Codegen

AArch64 code generator: ArmCodegen core plus per-operation emission modules. Grain: terminal, plan fits the band with no drill-downs, component grain is correct.

  • ALU Ops · service component
  • Inline Asm and Intrinsics · domain group
  • Atomic Ops · service component
  • Comparison Ops · service component
  • Data Operations · domain group
  • ArmCodegen Core · engine component
  • Frame and ABI · domain group
  • Global Addressing · service component
  • 128-bit Integer Ops · service component
  • Inline Asm Templates · service component
  • NEON Intrinsics · service component
  • Memory Ops · service component
  • Generation Dispatch · boundary port
  • Backend Core and Arch Glue · boundary port
  • Prologue and Epilogue · service component
  • Return Ops · service component
  • Variadic Ops · service component

Backend Core and Arch Glue

Backend code generation for the C compiler (src/backend): the shared ArchCodegen framework, register allocation and stack layout, and the x86-64, i686, AArch64 and RISC-V target backends. Grain: container-grade (plan over-band, 19 predicted vs 5-15), authored at file-family grain with shared infrastructure, allocation and target backends grouped; deeper per-target splits are proposed, not marked.

  • ArchCodegen Trait · class interface
  • AArch64 Backend · adapter component
  • Call ABI Classification · engine component
  • Cast Lowering · module
  • Codegen Common Driver · engine component
  • Codegen State · module
  • F128 Soft-float · module
  • i686 Backend · adapter component
  • Inline Asm Framework · module
  • Liveness Analysis · engine component
  • Generation Dispatch · boundary port
  • ARM Codegen · boundary port
  • Stack Slot Coalescing · boundary port
  • x86-64 Codegen · boundary port
  • Register Allocator · engine component
  • Register Allocation and Stack Layout · domain group
  • RISC-V Backend · adapter component
  • Stack Layout · engine component
  • Target Backends · domain group
  • x86-64 Backend · adapter component
  • x86 Common · module

x86-64 Codegen

x86-64 code generation: per-operation lowering of IR to assembly, plus frame/ABI and memory handling. Grain: terminal (plan fits band, no drill-downs). emit and inline-asm sit at root as the core trait impl and inline-asm adapter.

  • ALU Ops · module
  • Atomics · module
  • Cast Ops · module
  • Comparison · module
  • Emit Core · engine component
  • Float Ops · module
  • Frame and ABI · domain group
  • Globals · module
  • I128 Ops · module
  • Inline Asm · adapter component
  • Instruction Selection · domain group
  • Intrinsics · module
  • Memory · module
  • Memory and Symbols · domain group
  • Generation Dispatch · boundary port
  • Backend Core and Arch Glue · boundary port
  • Prologue · module
  • Returns · module
  • Variadic · module

IR

Core SSA intermediate representation (instructions, modules, ops, intrinsics), CFG analysis, mem2reg promotion, and the builtin/call/switch lowering helpers in src/ir. Grain: terminal, component-grade; the plan proposes no drill-downs and the budget fits.

  • CFG Analysis · engine component
  • FP Classify Builtins · service component
  • Intrinsic Builtins · service component
  • Atomics Lowering · service component
  • Call Lowering · service component
  • Function State · service component
  • Instruction · module
  • Intrinsics · module
  • Lowering Helpers · domain group
  • Mem2reg Promotion · engine component
  • IR Module · module
  • Ops · module
  • Phi Elimination · engine component
  • Backend · boundary port
  • Common Helpers · boundary port
  • Switch Lowering · service component

Passes

IR optimization passes of the C compiler, grouped by scope (scalar, control flow, loops, interprocedural) under a pipeline driver. Grain: terminal - one component per pass file, no drill-downs proposed.

  • Control Flow and Cleanup · domain group
  • CFG Simplification · engine component
  • Constant Folding · engine component
  • Copy Propagation · engine component
  • Dead Code Elimination · engine component
  • Dead Statics Elimination · engine component
  • Division by Constant · engine component
  • Global Value Numbering · engine component
  • If-Conversion · engine component
  • Function Inlining · engine component
  • Interprocedural Optimizations · domain group
  • Interprocedural Constant Propagation · engine component
  • IV Strength Reduction · engine component
  • Loop-Invariant Code Motion · engine component
  • Loop Analysis · library package
  • Loop Optimizations · domain group
  • Integer Narrowing · engine component
  • Pass Pipeline · module
  • Common Helpers · boundary port
  • IR · boundary port
  • Inline Asm Resolution · engine component
  • Scalar Optimizations · domain group
  • Algebraic Simplification · engine component

Frontend

Compiler frontend pipeline: preprocessor, lexer, parser and semantic analysis. Grain: terminal; the plan read over-band on 29 files with no child units, so files are folded into role-level component nodes. Preprocessor stages sit flat at root as peer pipeline stages.

  • AST Definitions · schema model
  • Frontend Module Root · module
  • Lexer · engine component
  • Parser · domain group
  • Parser Core · engine component
  • Declaration Parsing · service component
  • Expression Parsing · service component
  • Statement Parsing · service component
  • Codegen · boundary port
  • Common Types and Utilities · boundary port
  • Constant Evaluation · boundary port
  • Conditionals and Expression Evaluation · engine component
  • Includes and Pragmas · service component
  • Macro Definitions and Expansion · engine component
  • Preprocessing Pipeline · engine component
  • Text Processing Utilities · module
  • Semantic Analysis · domain group
  • Semantic Analyzer · engine component
  • Builtin Functions · module
  • Constant Evaluator · engine component
  • Type Checker · service component
  • Type Context · store component

Ir

AST-to-IR lowering subsystem of the C compiler: expressions, statements, globals, types and constant evaluation. Grain: terminal; the group plan proposed no drill-downs for this unit and I split the single lowering cluster by responsibility into component-grade nodes.

  • Builtins Lowering · engine component
  • Code Lowering · domain group
  • Complex Number Lowering · engine component
  • Constant Evaluation · engine component
  • Data, Types and Analysis · domain group
  • Expression Lowering · engine component
  • Global Declarations and Initializers · engine component
  • IR Constants · module
  • IR Module Root · module
  • Lowering Driver · engine component
  • Pointer Analysis · engine component
  • Backend · boundary port
  • Codegen · boundary port
  • Common Types and Utilities · boundary port
  • Constant Evaluation · boundary port
  • Frontend · boundary port
  • Statement Lowering · engine component
  • Struct Lowering · engine component
  • Type Resolution · engine component

Linker Common

Shared ELF, assembler and linker infrastructure of the compiler backend: the common ELF library, assembler preprocessing/expression helpers, per-architecture ELF writers and linker support, plus the linker_common core. Grain: terminal - the group plan proposes no drill-downs, so component grain is correct; the single plan child (linker_common) is carried as an opaque node.

  • AArch64 ELF Support · module
  • Assembler Text Helpers · module
  • Archive and Linker Symbol Support · module
  • Shared ELF Format Library · module
  • Shared ELF Object Writer · engine component
  • i686 Linker Types and Symbols · module
  • Linker Common Core · module
  • Per-Architecture ELF Support · domain group
  • Backend · boundary port
  • RISC-V Assembler Core · module
  • RISC-V Linker Reader and Emitters · module
  • Shared ELF and Assembler Infrastructure · domain group
  • x86 and i686 ELF Writers · engine component

Linker Common Core

Shared ELF64 linker infrastructure used by the x86, ARM, RISC-V and i686 backends: object/shared-library parsing, symbol resolution, section merging, dynamic linking support and ELF emission. Grain: terminal - the group plan fits the band with no drill-downs, so component grain is correct.

  • Archive Loader · module
  • Linker Args · module
  • Dynamic Symbol Resolver · engine component
  • Dynstr Builder · module
  • EH Frame Header Builder · engine component
  • Section GC · engine component
  • Input Parsing · domain group
  • Layout and Output · domain group
  • Linker Common Facade · facade component
  • Section Merger · engine component
  • Object Parser · module
  • Shared Library Parser · module
  • Shared ELF Format Library · boundary port
  • Symbol Resolution · domain group
  • Symbols and Sections · module
  • ELF Types · schema model

Passes

x86-64 peephole optimizer passes over generated assembly text. Grain: terminal, since the plan fits the band with no drill-downs, so one node per pass is correct component grain.

  • Callee-Save Elimination · engine component
  • Compare-Branch Fusion · engine component
  • Copy Propagation · engine component
  • Dataflow Passes · domain group
  • Dead Code Elimination · engine component
  • Frame Cleanup · domain group
  • Frame Compaction · engine component
  • Pass Helpers · module
  • Local Patterns · engine component
  • Local Rewrites · domain group
  • Loop Trampoline Elimination · engine component
  • Memory Operand Fold · engine component
  • Peephole Orchestrator · facade component
  • Backend · boundary port
  • Push/Pop Elimination · engine component
  • Store Forwarding · engine component
  • Tail Call Optimization · engine component

Claude Code

The public Claude Code repository: the source of the built-in mods, the bundled plugin marketplace, the issue automation that runs the repo, and reference gateway and managed-settings deployments. Container-grade with 1 drill-down (Mods).

  • Anthropic API · anthropic
  • Amazon Bedrock · aws bedrock
  • Bundled Plugin Marketplace · domain group
  • Claude Code (host engine) · ai agent
  • Devcontainer & Firewall · environment
  • Developer / Operator · actor
  • Feature Dev · plugin
  • Claude Apps Gateway Examples · infrastructure component
  • Google Vertex AI (Agent Platform) · gcp vertex ai
  • GitHub · github
  • GitHub Actions Workflows · job worker
  • Git & Review Workflow Plugins · plugin
  • Hook Examples · agent hook
  • Hookify · plugin
  • Issue Automation Scripts · job worker
  • Managed Settings Examples · environment
  • Built-in Mods · plugin
  • Plugin Dev Toolkit · plugin
  • PR Review Toolkit · plugin
  • Reference Configurations & Deployments · domain group
  • Repo Slash Commands · agent command
  • Repository Automation & Dev Environment · domain group
  • Agent SDK & Model Migration Plugins · plugin
  • Security Guidance · plugin
  • Output Style & Design Plugins · plugin

Built-in Mods

Mods of Claude Code: agents-md, sec-default, diff and telemetry hook bundles. Grain: terminal-ish at this scope, own mods inline with the three plan child units carried as opaque drill-downs.

  • AGENTS.md Mod · plugin
  • Columns · plugin
  • Hooks · plugin
  • Default Security Mod · plugin
  • Telemetry Hooks · plugin

Columns

Diff pane hooks for the columns mod: git backend, state, recording and views. Grain: terminal; the plan reads under-band with one cluster and no drill-downs, so component grain is correct.

  • Backend Contract · service component
  • Body and Dialog Views · domain group
  • Detail and Section Views · domain group
  • Git Backend · domain group
  • Git Fetching and Argv · adapter component
  • Git Output Parsing · engine component
  • Git Probes · service component
  • Diff Tiers · engine component
  • Shared Helpers · module
  • Hook Registration · facade component
  • Limits and Names · domain group
  • Column Limits · module
  • Size and Timing Limits · module
  • Names and Texts · module
  • Pane Logic · domain group
  • Pane State · store component
  • Hooks · boundary port
  • Change Recording · handler component
  • Turn Diffs · engine component
  • Body View · ui component
  • Detail View · ui component
  • Dialog and Entries Views · ui component
  • Layout View · layout component
  • Sections View · ui component

Hooks

Hooks of the diff mod: classification, pane state and turn/record hooks, with git and views as drill-downs. Grain: terminal-ish component grain with two opaque child drill-downs (plan fits band at 15 predicted).

  • Ask · hook component
  • Backend · module
  • Classify · engine component
  • Git · module
  • Host · hook component
  • Pane Hooks · domain group
  • Pane State · hook component
  • Pane Toggle · hook component
  • Record · hook component
  • Todos · hook component
  • Turn and Record Hooks · domain group
  • Turns · schema model
  • Views · module

Git

Type definitions of the diff mod's git hook: diff results, git execution, branch base, dating and untracked scoping. Grain: terminal, the 29 files are type modules grouped into five concern nodes with no drill-downs warranted.

  • Branch Base Types · schema model
  • Dating and Walk Types · schema model
  • Diff Data Model · schema model
  • Git Execution Types · schema model
  • Untracked Types · schema model

Views

Type contracts of the diff pane's views: body layout, file detail, list rows, the kit handed to each drawing, pane actions and seat. Grain: terminal (plan fits the band, no drill-downs proposed), component grain. Types are kept as schema_model deliberately: every file is a pure type declaration, not a UI component.

  • Body Types · schema model
  • Detail Types · schema model
  • Kit Types · schema model
  • Message Pane · schema model
  • Pane Actions · schema model
  • Pane Seat · schema model
  • Section Types · schema model

Telemetry Hooks

Hook plugin that gates telemetry.* calls, validates entries, gathers session context, batches rows and sends them to an ingest endpoint. Grain: container-grade by band (over-band plan) but the plan proposes no drill-downs; most files are one-function modules, so nodes are directory-level responsibility areas.

  • Analytics Switch · service component
  • Batching and Retry · service component
  • Context Assembly · service component
  • Environment Fields · service component
  • Identity · service component
  • Machine and OS · service component
  • Process Probe · adapter component
  • Remote Hash · service component
  • Terminal, Shell and VCS · service component
  • Deployment Detection · service component
  • Entry Validation · service component
  • Hook Registration · handler component
  • Runtime Inputs · schema model
  • Session Context · domain group
  • Call Gate · handler component
  • Telemetry Sender · engine component

Claude Code Action

System context for the Claude Code GitHub Action: the action itself, the standalone base action it executes Claude through, the repo's own CI and Claude-powered automation, and the external platforms they talk to. Container-grade with 1 drill-down (the action's src tree).

  • Agent Approval Check · agent guardrail
  • Anthropic API · anthropic
  • Claude Code Base Action · library package
  • CI Workflows · infrastructure component
  • Claude Agent SDK / Claude Code CLI · cli tool
  • Bedrock / Vertex AI / Foundry · external integration
  • Guarded Shell Scripts · cli tool
  • GitHub · github
  • GitHub User · actor
  • PR Stamp Sweep Workflow · agent orchestrator
  • Repo Automation · developer tooling
  • Repo Slash Commands · agent command
  • Review Subagents · ai agent
  • Claude Code Action · service
  • Workflow Hardening Check · agent guardrail

Claude Code Action

Inside the Claude Code Action: entrypoints, mode lifecycle, prompt construction, access control, GitHub operations and the MCP servers it gives Claude. Terminal: no drill-downs.

  • Access Control · security zone
  • Actor and Permission Checks · agent guardrail
  • Agent Mode · service component
  • Branch Operations · service component
  • Sensitive Config Restore · agent guardrail
  • Content Sanitizer · agent guardrail
  • Context Formatter · engine component
  • Entrypoints · domain group
  • Git Auth and Signing · adapter component
  • GitHub Actions Server · mcp server
  • GitHub Client · adapter component
  • GitHub Comment Server · mcp server
  • GitHub Context · schema model
  • GitHub Data Fetcher · repository component
  • GitHub File Ops Server · mcp server
  • GitHub Inline Comment Server · mcp server
  • GitHub Operations · domain group
  • GitHub Token Setup · adapter component
  • Comment Image Downloader · adapter component
  • MCP Config Installer · service component
  • MCP Servers · domain group
  • Mode Detector · engine component
  • Modes · bounded context
  • Claude Code Base Action · boundary port
  • Post-run Reporting · handler component
  • Prepare Step · handler component
  • Prompt Builder · engine component
  • Prompt Construction · domain group
  • Run Orchestrator · agent orchestrator
  • Tag Mode · service component
  • Tracking Comment · service component
  • Trigger Check · engine component

Official plugins

Anthropic's official Claude Code plugin marketplace: the marketplace.json catalog, first-party plugins, partner MCP integrations, chat-channel MCP servers, and the CI that validates and bumps listed plugins. Container-grade System Context with 1 drill-down (plugins).

  • macOS Messages · plugin
  • Channel Plugins · domain group
  • Claude Code · ai agent
  • claude-plugins-community Actions · plugin
  • Discord · plugin
  • Discord Channel · mcp server
  • External PR Scope Guard · agent guardrail
  • Fakechat Channel · mcp server
  • Frontmatter Validator · cli tool
  • GitHub · github
  • iMessage Channel · mcp server
  • Marketplace Catalog · data store
  • Marketplace CI · developer tooling
  • MCP Integration Plugins · plugin
  • First-party Plugins · plugin
  • Plugin Validation Workflows · cli tool
  • Plugin SHA Bumper · job worker
  • Telegram Bot API · plugin
  • Telegram Channel · mcp server
  • Vendor MCP Servers · mcp server

First-party Plugins

Catalogue of independent Claude Code plugins, one node per plugin; five plugins drill down. Grain: container-grade (each plugin is a container-level unit; the plan's over-band verdict reflects component-level counts inside plugins, which stay behind the 5 child boards or inside single plugin nodes).

  • Agent SDK Dev · plugin
  • Artifacts, Design & Reports · domain group
  • Authoring & Extension Tooling · domain group
  • Claude Code Setup · plugin
  • CLAUDE.md Management · plugin
  • Claude Security · plugin
  • Code Modernization · plugin
  • Code Review · plugin
  • Code Simplifier · plugin
  • Commit Commands · plugin
  • CWC Makers · plugin
  • Example Plugin · plugin
  • Feature Dev · plugin
  • Frontend Design · plugin
  • Git Workflow & Loops · domain group
  • Hardware & Integrations · domain group
  • Hookify · plugin
  • Math Reasoning · domain group
  • Math Olympiad · plugin
  • Math Proof · plugin
  • MCP Server Dev · plugin
  • MCP Tunnels · plugin
  • Code Modernization Suite · domain group
  • Playground · plugin
  • Plugin Dev · plugin
  • Project Artifact · plugin
  • PR Review Toolkit · plugin
  • Ralph Loop · plugin
  • Reader · plugin
  • Receipts · plugin
  • Review, Quality & Security · domain group
  • Security Guidance · plugin
  • Session Report · plugin
  • Skill Creator · plugin

Claude Security

Claude Security plugin: orchestrator, skill, scan workflow, nine scan and patch agents, hooks, and the scripts drill-down. Grain: terminal (plan fits the band, no drill-downs proposed; scripts is the only planned child board).

  • Security Lead · agent orchestrator
  • Front-Desk Skill · agent skill
  • Explore · ai agent
  • Plugin Hooks · agent hook
  • Patch Agents · domain group
  • Patch Generator · ai agent
  • Patch Verifier · ai agent
  • Scan Agents · domain group
  • Scan Inventory · ai agent
  • Scan Loader · ai agent
  • Scan Redactor · ai agent
  • Scan Researcher · ai agent
  • Scan Verifier · ai agent
  • Scan Workflow · agent orchestrator
  • Scripts · module

Scripts

Python stdlib scripts for the claude-security plugin: four entry-point CLIs (scan meta, result recording, report rendering, patch artifacts) over a shared lib of finding, SARIF, CWE and path utilities. Grain: terminal (budget fits, no drill-downs proposed), component grain.

  • Chain State · module
  • Console Output · module
  • CWE Catalog · module
  • Entry-point Scripts · domain group
  • Finding Model · module
  • Findings and Products · domain group
  • Patch Artifacts · cli tool
  • Path Utilities · module
  • Plugin Constants · module
  • Render Report · cli tool
  • Revision Range · module
  • Run Support · domain group
  • SARIF Encoder · module
  • Save Result · cli tool
  • Secret Redaction · module
  • Source Locator · module
  • Strict JSON · module
  • Write Scan Meta · cli tool

Code Modernization

Code Modernization plugin: slash commands, specialist subagents, multi-agent workflows and Python evidence/report scripts for legacy modernization. Grain: container-grade for the commands drill-down (the only child board); the over-band plan reading came from the 36-file directory fallback, and the remaining own nodes are component-grain.

  • Architecture Critic · agent skill
  • Business Rules Extractor · agent skill
  • Commands · agent command
  • Extract Rules Workflow · agent orchestrator
  • Harden Scan Workflow · agent orchestrator
  • Legacy Analyst · agent skill
  • Portfolio Assess Workflow · agent orchestrator
  • Proof Evidence Scripts · module
  • Reimagine Scaffold Workflow · agent orchestrator
  • Reporting Scripts · module
  • Rule Tooling Scripts · module
  • Scaffolder · agent skill
  • Security Auditor · agent skill
  • Specialist Agents · domain group
  • Test Engineer · agent skill
  • Uplift Deltas Workflow · agent orchestrator
  • Uplift Migrate Workflow · agent orchestrator
  • Uplift Migrator · agent skill
  • Version Delta Analyst · agent skill
  • Workflows · domain group

Commands

The 13 slash-command prompts that drive each modernization phase, from the start-here front door through assess, map, rules, brief, build, verify. Grain: terminal, the plan fits the band with no drill-downs proposed. Edges are the recommended sequencing between commands; modernize is the bootstrap entry at board root. (Terminal grain: budgetVerdict fits, no drill-downs.)

  • Build · domain group
  • Discover and Plan · domain group
  • Modernize (Start Here) · agent command
  • Assess · agent command
  • Brief · agent command
  • Extract Rules · agent command
  • Harden · agent command
  • Map · agent command
  • Preflight · agent command
  • Reimagine · agent command
  • Review Rules · agent command
  • Status · agent command
  • Transform · agent command
  • Uplift · agent command
  • Verify · agent command
  • Prove and Track · domain group

Hookify

Hookify plugin: markdown-defined rules enforced by Python hook entrypoints, plus authoring commands, agent and skill. Grain: terminal, the plan fits the band with no drill-downs.

  • Rule Config Loader · service component
  • /hookify:configure Command · agent command
  • Conversation Analyzer · ai agent
  • /hookify:help Command · agent command
  • /hookify Command · agent command
  • Hook Runtime · domain group
  • /hookify:list Command · agent command
  • PostToolUse Hook · agent hook
  • PreToolUse Hook · agent hook
  • Rule Authoring · domain group
  • Rule Engine · engine component
  • Stop Hook · agent hook
  • UserPromptSubmit Hook · agent hook
  • Writing Rules Skill · agent skill

Plugin Dev

Plugin Dev: toolkit plugin with skills, agents and a guided command for building Claude Code plugins. Grain: terminal (plan fits the L2 band, no drill-downs proposed). The create-plugin command is a board-root singleton, the workflow entry point.

  • Agent Creator · ai agent
  • Agent Development · agent skill
  • Authoring Skills · domain group
  • Command Development · agent skill
  • Create Plugin Command · agent command
  • Hook Development · agent skill
  • MCP Integration · agent skill
  • Plugin Settings · agent skill
  • Plugin Structure · agent skill
  • Plugin Validator · ai agent
  • Review and Generation Agents · domain group
  • Skill Development · agent skill
  • Skill Reviewer · ai agent

Reader

Hooks of the code-modernization plugin: read-only parsers of modernization artifacts, estate treemap, rule review deck and live pane views. Grain: terminal, since the plan fits the band with no drill-downs.

  • Artifact Readers · domain group
  • Brief Reader · adapter component
  • Deck View · ui component
  • Estate Discovery · engine component
  • Estate Map · domain group
  • Estate Model · engine component
  • Estate Tiles · engine component
  • Fleet Registry · store component
  • Hook Registration · facade component
  • Hook Runtime · domain group
  • Live Pane Views · domain group
  • Modernized Reader · adapter component
  • Pane View · ui component
  • Progress Snapshot · facade component
  • Review Deck · engine component
  • Rule Review · domain group
  • Rules Reader · adapter component
  • Session State · store component
  • Shared Helpers · library package
  • Topology Reader · adapter component
  • Treemap Layout · engine component
  • Uplift Reader · adapter component
  • Verification Reader · adapter component
  • X-Ray Context · handler component

What to notice

Inbound · Signals

Insights21 analyses

40Insights
2Critical
risk13strength14observation13
  • +35 more
Read all 40

Session Store is a single point of failure for 7 modules, from the clients to the package exports

risk · critical · inferred

Seven modules depend directly on Session Store, with no fallback: ClaudeSDKClient, the Internal Client, Package Exports, Session Mutations, Session Resume, Sessions and the Transcript Mirror Batcher. Both clients call validate_session_store_options, Session Resume and Session Mutations call _store_implements, and Package Exports re-exports InMemorySessionStore. Package Exports also depends on ClaudeSDKClient, so a failure reaches the public entry point twice.

Impact: A defect in Session Store breaks both the interactive and one-shot clients and every session read, write and resume, and shows up at the public package surface.

Session Store is the hub of session management: 12 of the 23 other elements in this package depend on it, directly or indirectly. Treat changes to session_store.py and session_store_validation.py as changes to the whole session feature, and cover them with tests that go through both clients.

  1. Types
  2. Session Store
  3. ClaudeSDKClient
  4. Package Exports
  5. Internal Client
  6. Package Exports
  7. Session Mutations
  8. Session Resume

Optional SessionStore methods raise instead of being absent, so a change in Types reaches 13 modules

risk · critical · verified

Types defines the SessionStore protocol, whose optional methods have default bodies that raise NotImplementedError. Support is detected by checking whether the adapter's class overrides the default (_store_implements), and continue_conversation is refused up front when list_sessions is not overridden. That contract lives in types.py, which 13 of 23 modules on the board depend on, only 3 directly: Control Protocol Query, Session Store and ClaudeSDKClient.

Impact: Changing which SessionStore methods are required, or what their defaults do, silently changes the override check that session validation and resume rely on.

Treat the raising defaults in SessionStore as the definition of 'optional'. Add a new optional method as a raising default, and cover it in session_store_validation so unsupported combinations fail before the subprocess starts.

  1. Types
  2. Control Protocol Query
  3. ClaudeSDKClient
  4. Session Store
  5. ClaudeSDKClient

Every defence against hidden instructions rests on one small sanitizer

risk · high · verified

sanitizer.ts is imported by 8 files across 7 modules: the prompt builder, the context formatter, the tracking comment, the comment and inline comment MCP servers, post-run reporting and the run orchestrator. It is a list of regexes with no other layer behind it, so a regression silently reopens every inbound and outbound path at once.

Impact: A missed pattern, such as a new Unicode tag block or an HTML construct, lets hidden instructions reach Claude everywhere at once.

Recommendation (small effort): Add a shared fixture test of known hiding tricks that runs against sanitizeContent and against each caller's output, so a gap fails CI at every entry point.

  1. Content Sanitizer
  2. Prompt Builder
  3. Context Formatter
  4. GitHub Comment Server

Interrupt and other control calls stall when nobody is reading messages

risk · high · verified

Control Protocol Query routes control responses and conversation messages through one reader task. That task awaits a send into a 100-message buffer (query.py:229, 506), so when the caller is not iterating receive_messages and the buffer fills, the control_response for interrupt(), set_model() or get_mcp_status() is never routed and the call fails after 60 seconds with Control request timeout. Only an example script warns that interrupts require active consumption.

Impact: The escape hatch fails exactly when it is needed: a runaway turn with partial messages enabled fills the buffer in seconds, and interrupt() then times out instead of stopping it.

Recommendation (small effort): Route control_response frames before any await on the message buffer, or give control responses their own path that never waits on the consumer. Document the consumption requirement on interrupt() itself.

  1. ClaudeSDKClient
  2. Control Protocol Query
  3. Subprocess CLI Transport

Day 1: start with marketplace.json, the contract everything else serves

observation · high · verified

The Marketplace Catalog is the most connected part of the system. Claude Code installs from it, it lists every first-party, channel and integration plugin by source path or pinned git SHA, and three of the four CI jobs read or rewrite it. Reading .claude-plugin/marketplace.json first explains why the rest of the repo exists.

Look at one local entry (./plugins/...), one external entry (git-subdir with ref and sha), and the renames map. Those three shapes cover how every plugin reaches users.

  1. Marketplace Catalog
  2. First-party Plugins
  3. Channel Plugins
  4. MCP Integration Plugins

Day 2: follow the install path from Claude Code into one plugin

observation · high · likely

The core flow is install and load: Claude Code reads the catalogue, fetches a plugin, then loads its commands, agents, skills and hooks. Pick one rich plugin such as Hookify or Code Modernization and trace one command to the agents and scripts it drives; the plugin-dev plugin documents the same structure as skills.

Every first-party plugin is self-contained, so understanding one deeply transfers to the rest; there is no shared framework to learn first.

  1. Claude Code
  2. Marketplace Catalog
  3. First-party Plugins

Session Store is shared by three groups of code, so a change to it reaches all of them

risk · high · inferred

Session Store holds the SessionStore protocol, the in-memory store and the option validation. Seven parts of the SDK depend on it: both clients and the package exports (public API and internal client), the session mutations, resume, listing and reading modules, and the transcript mirror batcher that appends entries. A change to the protocol or its validation lands in all three groups at once.

Impact: Changing a store method or the validation rules forces coordinated edits across the public API, session management and the one-shot query path.

Recommendation (medium effort): Treat the SessionStore protocol as a stable contract: add methods only with defaults, and keep validate_session_store_options and _store_implements as the single place that checks what a store supports.

  1. ClaudeSDKClient
  2. Session Store
  3. Internal Client
  4. Package Exports
  5. Session Mutations
  6. Session Resume

Every SDK module imports its exceptions from one file, _errors.py

risk · high · verified

The exception hierarchy in _errors.py (ClaudeSDKError, CLIConnectionError, CLINotFoundError, ProcessError, ResultError, CLIJSONDecodeError, MessageParseError) is imported directly by the CLI transport, ClaudeSDKClient, the control protocol query, the message parser and the package entry point. None has a fallback. A breaking change to this file reaches all five, and through the transport it reaches the internal client that drives one-shot queries.

Impact: Renaming or reshaping an exception breaks the public exports and every place that catches or raises it, so callers lose their error handling at once.

Recommendation (small effort): Treat _errors.py as a frozen public contract: add new exception classes as subclasses and keep existing names and constructor arguments stable. Cover the hierarchy with a test that imports every name the package entry point re-exports.

  1. Errors
  2. Subprocess CLI Transport
  3. Internal Client
  4. ClaudeSDKClient
  5. Control Protocol Query
  6. Message Parser
  7. Package Exports

can_use_tool is a ready gate seam with subagent provenance

strength · medium · verified

Every tool call the CLI wants approved arrives at Control Protocol Query as a can_use_tool request carrying tool name, input, tool_use_id, agent_id, blocked_path, decision_reason and suggested permission updates. The developer's callback can allow, rewrite the input, add permission rules, or deny with interrupt. Missing callbacks fail closed. Gaps: the context's abort signal is always None, and a CLI cancel kills the callback task without telling it.

Recommendation (small effort): Wire the CLI's control_cancel_request into ToolPermissionContext.signal and the hook context signal, so an approval waiting on a human can be withdrawn cleanly instead of being cancelled mid-await.

  1. Subprocess CLI Transport
  2. Control Protocol Query
  3. ClaudeSDKClient

PR-controlled agent config is restored from the base branch before Claude starts

strength · medium · verified

On pull requests run.ts calls restoreConfigFromBase, which replaces .claude, .mcp.json, .claude.json, CLAUDE.md, CLAUDE.local.md, .gitmodules, .ripgreprc and .husky with the base branch versions. A PR therefore cannot add hooks, MCP servers or instructions to the agent that reviews it.

SENSITIVE_PATHS in src/github/operations/restore-config.ts must grow whenever Claude Code starts reading a new file from the working directory at startup.

  1. Run Orchestrator
  2. Sensitive Config Restore

Start with the gate order in the Run Orchestrator

observation · medium · verified

run.ts decides whether untrusted input reaches Claude at all. It checks the trigger, then the actor and write permission, then on PRs restores config from the base branch, and only then prepares tag or agent mode. Reading these calls in order explains most of the action's security model before any prompt code.

Learn the GitHubContext union in src/github/context.ts next: every gate branches on isEntityContext and the event type.

  1. Run Orchestrator
  2. Trigger Check
  3. Actor and Permission Checks
  4. Sensitive Config Restore
  5. Tag Mode

Then follow untrusted text from GitHub into the prompt

observation · medium · verified

Issue and PR text arrives through the GitHub Data Fetcher, which keeps only comments from before the trigger time and applies the actor filters. The Context Formatter sanitizes every title, body, comment and diff hunk, and the Prompt Builder assembles the result with the trigger comment. This is the core path to understand before changing what Claude sees.

The trigger-time filter in fetcher.ts stops edits made after the trigger from being read; keep it in mind when changing how comments are fetched.

  1. GitHub
  2. Claude Code Action
  3. GitHub Data Fetcher
  4. Context Formatter
  5. Content Sanitizer
  6. Prompt Builder

The action and the base action share an untyped prompt-file contract

risk · medium · verified

src/create-prompt/index.ts and base-action/src/run-claude-sdk.ts each declare their own USER_REQUEST_FILENAME constant and agree only by convention on claude-prompt.txt sitting beside it. The base action is published standalone, so renaming the file in either package silently drops the user's request, and the multi-block slash-command path along with it.

Recommendation (trivial effort): Export the prompt and user-request file names from base-action and import them in src, or pass the user-request path explicitly as an input.

  1. Claude Code Action
  2. Claude Code Base Action

The transport is the only translator from options to Claude Code CLI flags

risk · medium · verified

Subprocess CLI Transport is used by query(), the Internal Client, ClaudeSDKClient, Package Exports and Control Protocol Query, and is the sole path to the Claude Code CLI. _build_command reads 39 distinct ClaudeAgentOptions fields from Types and maps each to a CLI flag, yet the transport-to-Types dependency is not drawn. The CLI version check only logs a warning below 2.0.0.

Impact: Every new option or renamed CLI flag lands in one 1,228-line file, and a bundled or user-installed CLI that rejects a flag fails only at spawn time, in every entry point at once.

Recommendation (medium effort): Extract command building into a pure options-to-argv function with table-driven contract tests per CLI version, and move flag-only settings into the initialize request where the CLI can report unknown fields.

  1. Subprocess CLI Transport
  2. Types
  3. Claude Agent SDK (Python package)
  4. Claude Code CLI

Both public entry points share one control-protocol engine

observation · medium · verified

query() reaches Control Protocol Query through the Internal Client and ClaudeSDKClient uses it directly; the engine in turn depends on the transport, Message Parser, SDK MCP Bridge, Transcript Mirror Batcher, Task Compat, Errors and Types. Its run-end logic (session state, in-flight task ledger, a 10-minute ceiling) decides when stdin closes for both.

Impact: A change to when stdin closes, or to how a control request is answered, alters hooks, permissions and in-process MCP tools for every SDK user at once.

The engine is well commented with issue references (#1088, #1190), and test_run_end_subprocess.py exercises the run-end paths against a subprocess; keep changes here behind those tests.

  1. Control Protocol Query
  2. Internal Client
  3. query()
  4. ClaudeSDKClient
  5. SDK MCP Bridge

Learn issue automation as one loop from GitHub event back to GitHub

observation · medium · verified

Start with claude-issue-triage.yml and claude-dedupe-issues.yml, which turn every issue event into a Claude run. Then read .claude/commands/triage-issue.md and dedupe.md, the actual instructions the agent follows. Then scripts/gh.sh and the two write scripts, and finally issue-lifecycle.ts with sweep.ts and auto-close-duplicates.ts, which turn labels and comments into closures.

Key vocabulary: triage, dedupe, lifecycle labels (invalid, needs-repro, needs-info, stale, autoclose), sweep, egress firewall, auto permission mode, workload identity federation.

  1. GitHub
  2. GitHub Actions Workflows
  3. Repo Slash Commands
  4. Issue Automation Scripts
  5. GitHub

The gh.sh wrapper is the safety contract both Claude jobs rest on

risk · medium · verified

Triage and dedupe prompts, the egress allow list and the workflow comments all assume scripts/gh.sh only exposes read subcommands and four flags. It is a 100-line shell script with no tests in the repo; one new allowed subcommand or flag silently widens what an agent fed untrusted issue text can do in both jobs.

Impact: A small, innocent-looking edit to the wrapper changes the blast radius of every Claude run on issues.

Recommendation (small effort): Add a test that asserts the wrapper rejects edit, comment, close, api and repo: queries, and route changes to scripts/gh.sh and the two write scripts through CODEOWNERS review.

  1. GitHub Actions Workflows
  2. Repo Slash Commands
  3. Issue Automation Scripts

The triage and dedupe agents are boxed in identity, tools and network

strength · medium · verified

Both Claude jobs authenticate with a short-lived token from workload identity federation instead of a stored key, hold only issues: write, run in auto permission mode with Write, Edit, WebFetch and WebSearch disallowed, call GitHub only through the wrapper scripts, and run on a runner whose egress is limited to an explicit host list.

Impact: A compromised run can at most mislabel or comment on the one issue that triggered it.

This is a strong template for any further agent in this repo: per-job token, script-mediated writes, explicit egress list and per-script call caps.

  1. GitHub Actions Workflows
  2. Anthropic API
  3. Issue Automation Scripts

Claude jobs reach GitHub only through a read-only wrapper and event-bound writes

strength · medium · verified

scripts/gh.sh allows only issue view, issue list, search issues and label list, rejects repo:, org: and user: qualifiers, and requires numeric issue numbers. Writes go through edit-issue-labels.sh and comment-on-duplicates.sh, which read the issue number from GITHUB_EVENT_PATH, drop unknown labels and cap duplicates at three existing issues. Write, Edit, WebFetch and WebSearch are disallowed and the runner egress is allow-listed.

Impact: A prompt-injected agent cannot touch other issues, other repositories, code, or arbitrary hosts.

CLAUDE_CODE_SCRIPT_CAPS further limits triage to two label edits and dedupe to one duplicate comment per run.

  1. GitHub Actions Workflows
  2. Issue Automation Scripts
  3. GitHub

Day 3: the chat-channel flow shows the only long-running code

observation · medium · verified

Most of the repo is prompt files. The channel servers are the exception: long-running Bun MCP processes that poll a chat platform, filter senders through an allowlist, push messages into the session and relay permission prompts back. Telegram is the most complete of the three, and Fakechat is a local harness for experimenting with the protocol safely.

Read the pairing and gate functions before anything else in these files; they decide who can drive a session.

  1. Telegram Channel
  2. Telegram Bot API
  3. Claude Code

Day 4: CI keeps the catalogue honest and current

observation · medium · verified

Once the catalogue makes sense, the CI explains its upkeep. The SHA bumper moves pinned third-party plugins forward daily through the GitHub API, the scope guard limits what outside contributors may add, and the validation workflows lint manifests, frontmatter, licenses and MCP URLs.

Most of the review logic lives in the shared claude-plugins-community actions, not in this repo; read their inputs here and their code there.

  1. Plugin SHA Bumper
  2. GitHub
  3. Marketplace Catalog

Public API code reaches straight into Session Store instead of going through a session entry point

risk · medium · inferred

Session Store, the SessionStore protocol and in-memory store with validation, is imported directly by the public API. ClaudeSDKClient calls validate_session_store_options, and the package exports file pulls in InMemorySessionStore and project_key_for_directory. Internal Client and Session Resume use the same validation. So the session boundary is crossed at the storage layer, not at one session-level entry point.

Impact: A change to store validation or to the in-memory store's signature has to be followed in the client and the package exports, not only inside session management.

Recommendation (small effort): Expose store validation and the in-memory store through one session-management entry point, and have ClaudeSDKClient and the package exports import from that instead of from Session Store.

  1. Session Store
  2. ClaudeSDKClient
  3. Package Exports

A failed SessionStore append is retried, then dropped; mirror_error is the only signal

observation · medium · verified

The CLI streams transcript_mirror frames on stdout. The read loop in Control Protocol Query hides them from callers and hands them to the Transcript Mirror Batcher, which flushes to SessionStore.append before each result is yielded. A failed append is retried up to 3 times; a 60s timeout is not retried. Then the batch is dropped, and the only signal is a system message with subtype mirror_error. 7 parts of the system depend on Session Store, none with an alternative.

Impact: A custom store that fails persistently loses transcript entries silently unless the caller watches for mirror_error; the local-disk transcript stays intact and the session carries on.

Recommendation (small effort): Handle system messages with subtype mirror_error in your consumer and alert on them. Make custom SessionStore.append idempotent by deduplicating on entry uuid, since a retried batch may overlap an earlier partial write.

  1. ClaudeSDKClient
  2. Session Store
  3. Internal Client
  4. Package Exports
  5. Session Mutations
  6. Session Resume

Channel messages carry sender identity, giving the session provenance

strength · medium · verified

Each channel notification wraps the text in a channel tag naming the source and carries meta with chat_id, message_id, user, user_id and a timestamp (telegram/server.ts around line 974). The session can therefore tell chat input from terminal input, and tell one sender from another. It cannot yet tell a human sender from an automated one.

This covers the actor.id part of provenance. Adding an explicit actor type (human, bot or relay) and the pairing date to meta would complete it for audit.

  1. Telegram Channel
  2. Claude Code

CI already gates external plugins with an agent and reverts on failure

strength · medium · inferred

Scan Plugins runs the Claude CLI through the community scan action to review changed external marketplace entries, and comments the result on the PR. When a scan of the automated SHA bump fails, Revert Failed Bumps rolls the offending entries back. That deterministic fallback is the escape hatch an agent gate needs. The scan runs the latest CLI, so its behaviour can change between runs without a code change here.

Pinning claude-cli-version for the scan would make a change in review behaviour show up as a reviewed diff rather than a silent drift.

  1. Plugin Validation Workflows
  2. claude-plugins-community Actions

Sessions copies the CLI's folder-naming hash, and 6 modules depend on that copy

risk · medium · verified

Session listing reads the CLI's own ~/.claude/projects folders directly, so sessions.py ports the CLI's JavaScript path sanitising and 32-bit string hash (base36, used for long paths) to rebuild the same folder names. Six modules import from it: the package exports, session import, mutations, resume, and the store. 12 of the 23 elements on the board depend on it, directly or indirectly. If the CLI changes how it names those folders, listing and resume find nothing, and no error says why.

Impact: A silent CLI naming change would make listing, resume, rename and import look empty or fail to find sessions that exist on disk.

Recommendation (medium effort): Cover the sanitising and hash with tests against known CLI folder names, so a CLI bump that changes them fails loudly. Longer term, ask the CLI to expose the session directory instead of re-deriving it.

  1. Package Exports
  2. Sessions
  3. Session Import
  4. Session Mutations
  5. Session Resume
  6. Session Store

Spend and run length are bounded at the transport

strength · low · verified

max_budget_usd, task_budget and max_turns are passed to the CLI as flags, and Control Protocol Query bounds how long stdin stays open between turns with a 10-minute ceiling (CLAUDE_CODE_PRINT_BG_WAIT_CEILING_MS), so a background agent that never reports idle cannot hold a session open indefinitely.

These limits are enforced by the CLI, so they hold even when the embedding code forgets to stop iterating. The SDK does not check them itself.

  1. Subprocess CLI Transport
  2. Control Protocol Query

Tag mode gives Claude a narrow, workspace-bound tool list

strength · low · verified

prepareTagMode allows only comment updates, git add, commit and rm, a push wrapper, and the GitHub MCP tools the installer registers. Edits run under acceptEdits, which allows files inside the workspace only, and there is no general Bash.

Impact: A prompt-injected run is limited to its own branch and Claude's own comments.

User-supplied claude_args can widen this list, so the narrow default holds only for workflows that do not pass extra allowedTools.

  1. Tag Mode
  2. MCP Config Installer
  3. GitHub Comment Server

Skip post-run reporting and branch plumbing at first

observation · low · likely

Post-run Reporting, Branch Operations, Git Auth and Signing, the Comment Image Downloader and the GitHub Actions Server touch GitHub heavily but sit outside the untrusted-input path. They decide where results land, not what Claude is allowed to read.

Come back to Post-run Reporting when working on inline review comments: it posts buffered comments after a Haiku check filters out test calls.

Command-line construction is hardened against argument injection

strength · low · verified

The transport passes resume, session_id, resume_session_at and resume_drops_turn as --flag=value so a dash-leading value cannot become a new flag, applies the same rule to extra_args, refuses .bat/.cmd CLIs on Windows (the BatBadBut class, CVE-2024-27980), rejects cmd.exe metacharacters in session values, and validates skill names before formatting them into --allowedTools rules.

Session titles and IDs are often taken from end users, so these guards are what keeps a hostile resume value from rewriting the CLI's permission flags. New options that take untrusted strings should use the same equals form.

Tool permission requests fail closed

strength · low · verified

Control Protocol Query answers a can_use_tool request with an error when no callback is registered, an unknown hook callback ID with an error, and any unsupported request subtype with an error, rather than a default allow. A callback that returns anything other than PermissionResultAllow or PermissionResultDeny is also turned into an error response.

_configure_can_use_tool also routes permission prompts to stdio and refuses to combine can_use_tool with permission_prompt_tool_name, so one gate decides each tool call.

  1. Subprocess CLI Transport
  2. Control Protocol Query
  3. ClaudeSDKClient

Skip the engine, mods and examples when the goal is issue automation

observation · low · verified

Claude Code (host engine) is the most depended-on part of this repo, used by every plugin, mod and example, but issue automation never touches it: the workflows run the published Claude Code Action. Mods, the plugin marketplace and the gateway examples can wait.

The only shared piece is the Anthropic API, reached by both the workflows and the security-guidance plugin.

Lifecycle timeouts are restated outside their single source of truth

risk · low · verified

scripts/issue-lifecycle.ts declares itself the single source for lifecycle labels and timeouts and is used by sweep.ts and lifecycle-comment.ts. The triage prompt separately says needs-repro and needs-info time out after 7 days, and the dedupe comment and auto-close-duplicates.ts each hardcode 3 days.

Impact: Changing a timeout in issue-lifecycle.ts leaves the agent and the posted comments promising the old schedule.

Recommendation (small effort): Generate the timeout text in the prompt and comment from issue-lifecycle.ts, or move the duplicate window into it and import it in auto-close-duplicates.ts.

  1. Issue Automation Scripts
  2. Repo Slash Commands

The duplicate comment script is pinned to the upstream repository

risk · low · verified

comment-on-duplicates.sh sets REPO to anthropics/claude-code, while gh.sh uses the workflow repository. In any fork or mirror running these workflows, dedupe searches the fork but validates and comments against upstream issues with the fork issue numbers.

Impact: Forks get failed runs or comments that point at unrelated upstream issues.

Recommendation (trivial effort): Read the repository from GH_REPO or GITHUB_REPOSITORY in comment-on-duplicates.sh, as gh.sh does.

  1. Issue Automation Scripts
  2. GitHub

Every agent-driven closure has a human override before it happens

strength · low · verified

Duplicate comments say the issue closes in 3 days, and auto-close-duplicates skips any issue whose author reacted thumbs-down. The sweep skips lifecycle closures when a human commented after the label, triage removes stale and autoclose on new human comments, and remove-autoclose-label clears autoclose on any comment.

Impact: Authors can stop a wrong closure with one reaction or comment.

The escape hatch depends on the author noticing within 3 to 7 days; it does not cover issues whose author has gone quiet.

  1. GitHub
  2. GitHub Actions Workflows
  3. Issue Automation Scripts

Skip for now: config-only integrations, CI plumbing and single-file plugins

observation · low · verified

Newcomers can safely ignore the MCP Integration Plugins (each is a few lines of .mcp.json), the shared community actions and the vendor servers, which live outside this repo. Of the 27 first-party plugins, 22 are prompt-only command or skill bundles with no code paths worth tracing.

Return to these only when touching that specific plugin or integration; none of them affects how the others work.

  1. MCP Integration Plugins
  2. Vendor MCP Servers

Key vocabulary: marketplace entry, plugin, channel, pairing, permission relay, SHA bump

observation · low · verified

Six terms recur everywhere: a marketplace entry (one plugin's record in marketplace.json), a plugin (bundle of commands, agents, skills, hooks, MCP servers), a channel (an MCP server feeding chat into a session), pairing and the allowlist (how a chat sender is trusted), permission relay (approving tool calls from chat) and a SHA bump (moving an external plugin's pinned commit).

Hooks, skills and agents follow Claude Code's own plugin model; the plugin-dev plugin's skills are the best in-repo explanation of each.

Plugins are fully independent and deploy on their own

strength · low · verified

No first-party plugin imports another; every import resolves within a plugin's own directory. Each plugin ships as its own marketplace entry, so any plugin can change, version and release without coordinating with the others.

The marketplace entry is the only shared contract. Keeping cross-plugin reuse out (or in an explicitly versioned package) preserves this.

External-PR workflows never execute contributor code

strength · low · verified

Both pull_request_target workflows check out only the base repository and read the head marketplace.json as data through the GitHub API. External-pr-scope.js trusts the source repo rather than the submitter: a PR is in scope only if it adds entries pinned to a commit in a repo that already backs a live entry.

This avoids the classic pull_request_target pitfall of checking out and running head code with a write token. Keep that invariant explicit in review, since one added checkout of the PR ref would undo it.

  1. External PR Scope Guard
  2. Marketplace Catalog

Channel servers keep bot tokens owner-only and refuse injected pairing requests

strength · low · verified

The Telegram server writes its .env and access.json with mode 0600 inside a 0700 state directory, defaults new chats to pairing mode, and instructs the session never to approve pairings or edit the allowlist because a channel message asked. Senders not on the allowlist are dropped before their text reaches the session.

Access changes happen only through the access skill run in the user's terminal, which keeps chat input from widening its own privileges.

In the code

Database 1 · Endpoints 4 · AuthZ 17 · Clients 13

Inbound · From code

Database

1table

No primary key
0
Partitioned
0
Deprecated
0
Tables per schema
  • public1

Tables

Inbound · From code

Endpoints

4endpoints

Public
4
Deprecated
0
Rate-limited
0
By method
  • GET2
  • POST1
  • WEBSOCKET1

Endpoints

Inbound · From code

AuthZ

17roles

1 role grants nothing

Permissions
26
Policies
6
Resource types
15
Permissions per role
  • User tier (plugins a person installs)8
  • Append tier (organization, innermost)2
  • AWS gateway task role2
  • GCP gateway service account2
  • Prepend tier (organization, outermost)2

+12 more

Needs a look

Inbound · From code

Clients

13clients

HTTP
13
gRPC
0
Calls
63
Calls by target
  • api.github.com45
  • api.telegram.org9
  • api.anthropic.com8
  • pypi.org1
  • discord.com0

Clients

+9 more