Claude Code Harness
Every engineer gets style enforcement, language-aware context, and automated quality gates out of the box.
Source Tweet Artifacts
The .claude/ directory configures Claude Code for the Dedalus monorepo. Auto mode is default; a classifier reviews each action and blocks anything risky.
Claude Tag is the team-surface extension of the Claude Code direction: Claude moves into Slack channels as a shared teammate with scoped memory, tools, data, codebases, and future-task planning. Keep it distinct from terminal-first Claude Code setup; the useful connection is the same harness moving from private repo sessions into multiplayer org work. Source: Anthropic, 2026-06-23; Source: X/@karpathy, 2026-06-23
How It Works
System Prompts Itself
The June 2026 Google Cloud talk reframed effective Claude Code work as system design, not better one-off prompts: put the recurring judgement in files, hooks, skills, subagents, and verification loops, then let that system keep prompting Claude with the right context. The local video artifact is only the conference-stage clip; the durable source is the YouTube transcript and self-thread. This supports the same operating model as Kevin's wiki harness: CLAUDE.md/AGENTS.md should be routing indexes, not giant context dumps, and repeated workflows should become skills or doctors. Source: YouTube "Building with Claude on Google Cloud", 2026-06-06 Source: X/@eng_khairallah1, 2026-06-06
Rules (Automatic)
Rules in .claude/rules/ load based on what files are being edited. Touch a .py file and the Python style guide appears. Touch .rs and the Rust guide appears. The ethos.md rule loads on every session. After context compaction, a SessionStart hook re-injects core ethos.
Hooks (Enforcement)
- PreToolUse (
pre-format.py): Before any Write/Edit to.py, runsruff formatandruff check --fix. - PostToolUse (
check-style.py): After Write/Edit, checks function length >70 lines, file length >500, nesting >3, args >5, bare exceptions, forbidden types. - Stop (agent hook): A haiku-model agent reviews the diff against STYLE.md for taste-based issues.
Skills (On-Demand)
Skills load when relevant. Claude sees descriptions at session start (low context cost) and loads full content only when needed. Invoked manually (/style-guide) or auto-detected from task context.
Subagents
The style-reviewer runs Sonnet with the style-guide skill, reviewing for taste-based issues. The code-reviewer hunts for bugs with confidence scoring (only reports >= 80% confidence).
Auto Mode
Local operations auto-approved. Risky operations (prod deploys, force pushes) blocked or prompt for confirmation. Trusted infrastructure: GitHub dedalus-labs, AWS 089042446622 (dev/preview only), ghcr.io/dedalus-labs.
Power Skills
/simplify: Dispatches parallel agents to review for quality, efficiency, and compliance. /batch: Dispatches isolated worktree agents for parallel migrations, each producing its own PR under 200 LOC.
Memory Architecture
Claude Code maintains persistent memory through three layers, confirmed by reverse-engineering of the source code (March 2026):
Three-layer design (bandwidth-aware):
- Index (always loaded): CLAUDE.md is pointers (~150 chars/line), not storage. Always in context.
- Topic files (on-demand): Skills and domain knowledge fetched only when needed.
- Transcripts (never read, only grep'd): Session history searched but never loaded wholesale.
Key architectural decisions:
- Write discipline: Write to file → then update index. Never dump content into the index. Prevents entropy and context pollution.
- Background memory rewriting (
autoDream): Runs in a forked subagent with limited tools. Merges, dedupes, removes contradictions, converts vague → absolute, aggressively prunes. Memory is continuously edited, not appended. - Staleness is first-class: If memory ≠ reality, memory is wrong. Code-derived facts are never stored. If it's derivable, don't persist it.
- Retrieval is skeptical: Memory is a hint, not truth. The model must verify before using.
Auto-compaction (autoCompact.ts): Triggers at ~167K tokens. Keeps 5 files (capped at 5K tokens each), compresses everything else into a single 50K-token summary, discards all intermediate reasoning. Override: keep each phase under 5 files, commit separately, delete dead code before starting.
Leaked-Source Checklist, Not A Bypass
The March 2026 leaked-source analyses are useful as a harness-audit checklist, but not as a runtime bypass. The viral employee-mode thread should be read through Claude Code Source Leak: USER_TYPE === 'ant' is a build-time constant in distributed builds, so a local CLAUDE.md cannot activate internal branches that are absent from the package. The practical lesson is to add explicit verification, chunked reads, scoped searches, and stable memory files to your own harness. Source: X/@iamfakeguru, 2026-03-31; Source: Claude Code Source Leak, 2026-06-30
- Post-edit verification: The relevant invariant is "did the edit compile and pass checks?", not only "did bytes hit disk?" Override: add project-specific verification to CLAUDE.md/AGENTS.md, hooks, or doctors, for example
npx tsc --noEmit && npx eslint . --quietin the right package. - Brevity mandate: Directives in
constants/prompts.ts- "Try the simplest approach first," "Three similar lines of code is better than a premature abstraction." Override: "What would a senior, experienced, perfectionist dev reject in code review? Fix all of it." - 2,000-line blind spot: Each file read is hard-capped at 2,000 lines / 25K tokens. Everything past that is silently truncated. Override: Read files over 500 LOC in chunks using offset and limit parameters.
- Tool result truncation: Results exceeding 50K characters get replaced with a 2K-byte preview. The agent doesn't know results were truncated. Override: Scope searches narrowly, re-run by directory if results look suspiciously small.
- No semantic code understanding: GrepTool is raw text pattern matching, not AST-aware. Override: On any rename, force separate searches for direct calls, type references, string literals, dynamic imports, require() calls, re-exports, barrel files, and test mocks.
Token Optimization
The "caveman" pattern (compressed output style that preserves technical accuracy) reportedly cuts large amounts of output tokens. Three intensity levels: lite (drops filler, keeps grammar), full (drops articles, full grunt mode), ultra (maximum compression, telegraphic). The current reference implementation is Caveman Token Skill (JuliusBrussee/caveman): multi-harness install paths, latest release v1.9.0, pinned/integrity-checked installer artifacts, and Brin caution verdicts pending deep scan. Evaluate for long sessions where context window pressure is high, but do not default-install until the supply-chain scan clears. Source: X/@om_patel5, 2026-04-06; Source: GitHub and Brin API, 2026-07-03
Community Skills Ecosystem
Beyond project-level skills, a growing ecosystem exists at Skills.sh - Agent Skills Registry:
- Anthropic/Claude Code skill portfolio: library and API reference, product verification, data fetching and analysis, business process and team automation, code scaffolding and templates, code quality and review, CI/CD and deployment, runbooks, and infrastructure operations. Treat this as a bundle coverage checklist, not as package/version authority; the official docs establish the runtime shape as on-demand folders of instructions, scripts, templates, and resources. See Agent Skill Bundles. Source: X/@om_patel5, 2026-03-18; Source: Anthropic Agent Skills docs, 2026-07-04
- Superpowers plugin (obra/superpowers): meta-skill system that adds brainstorming, TDD, debugging, code review, and parallel dispatch skills - activated via a
using-superpowersbootstrap skill - UI Skills (ui-skills.com): pre-built component generation skills by @ibelick
- Token compression skills: caveman-style output compression for long sessions
- Hermes Agent (NousResearch): packages Karpathy's LLM-Wiki pattern for creating knowledge bases and research vaults with Obsidian. Command:
hermes update→/llm-wiki
Defensive security context
Anthropic Project Glasswing (Project Glasswing) deploys Claude Mythos Preview for vulnerability discovery in critical software, with up to $100M usage credits for partners. Not a Claude Code harness feature, but sets the bar for agent-assisted security reviews that complement Security and Review Skills and local harness hooks. Source: anthropic.com/glasswing, 2026-04-07
- NickSpisak "Second Brain" recipe: raw/ + wiki/ + outputs/ folders,
qmdfor search,agent-browserfor source collection, monthly health checks. Free skill available.
Adding a New Language
- Create
.claude/rules/<language>.mdwithpathsfrontmatter. - If the guide exceeds ~500 lines, create a skill instead.
- Add language-specific checks to
hooks/checkers/. - Update
hooks/check-style.py'sCHECKER_MAP.
Timeline
- 2026-07-04 | Corrected the stale "9 skill types" bullet in the community skills ecosystem. The useful Claude Code taxonomy is a portfolio audit across reference, verification, data, team automation, scaffolding, review, CI/CD, runbooks, and infra ops, with official docs as runtime mechanics authority. Source: X/@om_patel5, 2026-03-18; Source: Anthropic Agent Skills docs, 2026-07-04
- 2026-07-04 | Added Claude Tag as the Slack/team-surface extension of Claude Code: same delegation/harness direction, but multiplayer, channel-scoped, and enterprise-controlled rather than terminal-first. Source: Anthropic, 2026-06-23; Source: X/@karpathy, 2026-06-23
- 2026-07-03 | Refreshed Claude Code Setup from official source and local video review. The useful harness lesson is scope-aware setup: the plugin recommends MCP servers, skills, hooks, subagents, and slash commands, then lets the user choose user-scope or project-scope installation before reloading plugins. Source: X/@Suryanshti777, 2026-05-17; Source: GitHub
anthropics/claude-plugins-official, 2026-07-03 - 2026-07-03 | Deep-reviewed @himanshustwts' memory-architecture diagram and linked the local visual artifact. The important harness rule is three-temperature context: always-injected index, on-demand topic files, and grep-only transcripts. Source: X/@himanshustwts, 2026-03-31; Source: local image artifact, 2026-07-03
- 2026-06-30 | Deep-reviewed the Google Cloud talk bookmark, local thumbnail/video frames, transcript, and self-thread. Added the "system prompts itself" section: durable Claude Code quality comes from harness files, hooks, skills, and verification loops, not one-shot prompt phrasing. Source: X/@eng_khairallah1, 2026-06-06
- 2026-06-30 | Re-reviewed the employee-gate thread artifact and aligned this page with Claude Code Source Leak: the source-leak lesson is to build local verification/checklist behavior, not to import a claimed employee-mode bypass. Source: X bookmark artifact audit, 2026-06-30
- 2026-06-02 | @trq212: Claude Code Workflows as biggest upgrade since skills/subagents; deep dive with @sidbid, Claude Blog post in thread. 8,217 bookmarks. Source: X/@trq212, 2026-06-02
- 2026-06-12 | Vercel AI SDK 7
HarnessAgentships@ai-sdk/harness-claude-codeadapter — embed Claude Code in apps with sandboxed sessions + AI SDK streams. See AI SDK HarnessAgent. Source: Vercel changelog, 2026-06-12 - 2026-06-06 | @eng_khairallah1 viral clip: "build a system that prompts itself" vs one-shot prompting; 20,287 bookmarks. Source: X/@eng_khairallah1, 2026-06-06
- 2026-03-31 | @iamfakeguru reverse-engineering thread popularized the employee-gate framing (16,507 bookmarks); retained here as a harness-audit source after the bypass claim was debunked in Claude Code Source Leak. Source: X/@iamfakeguru, 2026-03-31
- 2026-05-17 | Anthropic's official claude-code-setup plugin surfaced (@Suryanshti777, 4,564 likes, 13,851 bookmarks): scans a project and recommends hooks/skills/config, turning Claude Code into a more complete dev environment. Source: X/@Suryanshti777, 2026-05-17