k8e CLAUDE.md

k8e CLAUDE.md is an instructions file for coding agents from xiaods/k8e. It costs 1,676 tokens per session, scanned A, a copy of k8e AGENTS.md, Apache-2.0.

Repository instructions for K8E, a small Kubernetes distribution designed to run AI agents in isolated sandboxes. The file explains the project's structure, architecture, important flows, and build process.

In plain words
What is it for?
Use it when exploring K8E, planning a change, tracing how sandbox operations work, or building and testing the project. It also identifies the main directories and entry points.
Why use it?
It gives coding agents the project context they need before changing code. This reduces the risk of misunderstanding how the Go, Zig, command-line, gateway, and client-library parts fit together.

Instructions file

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/xiaods/k8e/claude-md
Clone the repo
git clone --depth 1 https://github.com/xiaods/k8e
Per session 1,676 This file is loaded in full into every session.
When invoked 1,676 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin 97% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.01676 $0.01676
Opus 5 $0.00838 $0.00838
Sonnet 5 $0.00335 $0.00335
Haiku 4.5 $0.00168 $0.00168

Measured 3d ago against content hash 524f86d1c5f8, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

k8e CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

97% identical to k8e AGENTS.md — 7 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

CLAUDE.md · 141 lines

How it starts

The opening of the file, as written. The whole thing — 141 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project Overview

K8E is a CNCF-conformant Kubernetes distribution packaged as a single binary under 100MB, purpose-built for secure, isolated AI agent execution at scale. It provides built-in sandbox orchestration (warm pools, session management), a gRPC gateway for sandbox operations, a CLI command group (k8e sandbox) bridging AI agents to sandbox infrastructure, and client SDKs in Python and TypeScript.

Architecture (Big Picture)

The repository is organized as a Zig-based Go project:

.
├── build.zig                      # Zig build definitions (Go compilation, cross-compilation)
├── main.go                        # CLI entry point — registers all commands
├── cmd/                           # Individual command entry points
│   ├── server/                    # Control plane + optional agent
│   ├── agent/                     # Agent-only (kubelet + containerd)
│   ├── kubectl/                   # kubectl wrapper
│   └── sandbox-gateway.go         # Sandbox gRPC gateway (cli/cmds)
├── pkg/
│   ├── cli/cmds/                  # CLI flag definitions + command wiring
│   │   ├── root.go                # App setup, global flags
│   │   ├── server.go              # Server struct + all server flags
│   │   ├── agent.go               # Agent struct + all agent flags
│   │   └── sandbox_gateway.go     # sandbox-gateway command
│   ├── server/                    # Server daemon orchestration
│   ├── agent/                     # Agent daemon orchestration
│   ├── daemons/                   # Individual daemon implementations
│   ├── sandboxmatrix/             # Core sandbox orchestration
│   │   ├── controller.go          # Warm pool reconciler, session GC
│   │   ├── api/v1alpha1/          # CRD types (SandboxMatrix, SandboxWarmPool, SandboxSession)
│   │   └── grpc/
│   │       ├── server.go          # gRPC SandboxService (create/destroy/exec sessions)
│   │       ├── orchestrator.go    # Orchestration logic (sub-agents, confirm actions)
│   │       └── pb/                # Generated protobuf Go code
│   ├── sandbox/client/           # gRPC client + skill installation
│   │   ├── client.go              # gRPC client with TLS auto-discovery
│   │   └── install.go             # Skill installation for claude code/codex/pi
│   ├── sandboxcli/                # CLI command handlers for k8e sandbox
│   │   ├── commands.go            # 10 sandbox command handlers
│   │   ├── session.go             # Session state persistence + flock locking
│   │   ├── snapshot.go            # Workspace snapshot save/restore
│   │   └── manifest.go            # Declarative workspace manifest
│   ├── sandboxmatrix/grpc/        # gRPC gateway — proxies exec/file ops to sandboxd pods
│   ├── configfilearg/             # Config file argument parsing
│   ├── deploy/                    # Kubernetes manifests and Helm charts
│   ├── apis/                      # Internal API types
│   ├── bootstrap/                 # Cluster bootstrap (token generation)
│   ├── token/                     # Token management
│   └── ...                        # certmonitor, secretsencrypt, cgroups, vpn, etc.
├── proto/sandbox/v1/              # Protobuf definitions for sandbox gRPC service
├── sandbox/                       # Sandbox container runtime shim (sandboxd)
├── sandboxd/                      # Runtime daemon in Zig (exec, files, networking)
├── pkg/sandboxcli/skills/k8e-sandbox/  # Embedded SKILL.md (installed via connect)
└── tests/unit.go                  # Test helper utilities

Read the full file on GitHub · 141 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 141 lines · 1,676 tokens per session scan A 524f86d1c5f8

Subscribe to this mod's changes

k8e CLAUDE.md is an instructions file published in the GitHub repository xiaods/k8e (481 stars, last pushed 8d ago), licensed Apache-2.0. It adds 1,676 tokens to every session, about $0.0084 per session on Opus 5. A static security scan graded it A with 0 findings. It is 97% identical to k8e AGENTS.md, differing in 7 lines, and is treated as a copy.