lean-claude-code-harness
Use when building, auditing, or simplifying an AI coding-agent harness, especially when the current runtime has unclear config precedence, weak tool permissions, hidden product-only behavior, or poor transcriptability.
Best use case
lean-claude-code-harness is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Use when building, auditing, or simplifying an AI coding-agent harness, especially when the current runtime has unclear config precedence, weak tool permissions, hidden product-only behavior, or poor transcriptability.
Teams using lean-claude-code-harness should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/lean-claude-code-harness/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How lean-claude-code-harness Compares
| Feature / Agent | lean-claude-code-harness | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Use when building, auditing, or simplifying an AI coding-agent harness, especially when the current runtime has unclear config precedence, weak tool permissions, hidden product-only behavior, or poor transcriptability.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
Best AI Skills for Claude
Explore the best AI skills for Claude and Claude Code across coding, research, workflow automation, documentation, and agent operations.
AI Agents for Coding
Browse AI agent skills for coding, debugging, testing, refactoring, code review, and developer workflows across Claude, Cursor, and Codex.
ChatGPT vs Claude for Agent Skills
Compare ChatGPT and Claude for AI agent skills across coding, writing, research, and reusable workflow execution.
SKILL.md Source
# Lean Claude Code Harness Distill the durable parts of Claude Code into a smaller, auditable harness. The goal is not feature parity. The goal is a runtime another engineer can understand, extend, and verify without reverse-engineering hidden behavior. ## When to Use Use this skill when a coding-agent runtime shows any of these symptoms: - config values are hard to trace - tool permissions are implicit or inconsistent - the tool surface keeps growing without clear ownership - session history disappears after a run - the main loop is hard to sketch from memory - product-only logic is mixed into the harness core ## Keep These Primitives - layered configuration - permission-aware tool execution - a small explicit tool registry - markdown skill discovery - transcript persistence - a visible query loop ## Remove These By Default - telemetry - remote-managed settings - hidden kill-switches - private feature flags - branding-specific branches - heavyweight UI layers Only add them back when the user explicitly asks for them and can explain the operational need. ## Quick Audit If you need a fast harness review, answer these six questions first: 1. Can you explain config precedence without reading three files? 2. Are tool permissions checked before execution? 3. Can you list the built-in tools in one screen? 4. Are skills discovered from visible files instead of hidden registration? 5. Does every run persist a transcript? 6. Can you trace the query loop from prompt to final response? If two or more answers are "no", the harness is already too opaque. ## Apply This Order ### 1. Freeze the Runtime Boundary Keep the entrypoint thin. It should only: - parse commands - load merged config - wire services - print results Do not hide business logic in the CLI layer. ### 2. Make Config Precedence Explicit Use a predictable merge order: 1. defaults 2. user config 3. project config 4. local config 5. environment overrides If a runtime value cannot be traced back to one of these sources, the harness is already drifting into opacity. ### 3. Gate Tools Before Execution Define permission policy before the query loop runs tools. Minimum pattern: - `default` and `plan` expose read-only tools - write or shell tools require a stronger mode - `bypassPermissions` should be explicit and rare Permission checks belong before tool execution, not after damage is already possible. ### 4. Start with a Tiny Tool Surface Default tool set should be boring and legible: - `list_files` - `read_file` - `grep` - `bash` Do not add tools because the upstream product has them. Add tools only when they expand capability without making the harness harder to reason about. ### 5. Keep Skills File-Backed Discover skills from `SKILL.md` files with frontmatter metadata. Avoid hidden registration layers, magic imports, or remote skill switches. The discovery rule should be explainable in one sentence: scan configured directories, parse frontmatter, expose name, description, and path. ### 6. Persist Every Session Save transcripts to disk. Each transcript should include: - session id - timestamp - prompt - tool steps - final response If an agent run cannot be inspected afterward, debugging and trust both degrade. ### 7. Keep the Query Loop Visible The harness should make this loop easy to trace: 1. receive prompt 2. ask provider for next action 3. validate tool request 4. execute tool 5. append tool result to state 6. repeat until final response 7. persist transcript If you cannot sketch the loop from memory, the runtime is already too opaque. ## Anti-Patterns - cloning upstream complexity without upstream context - mixing config loading, permission logic, and tool execution in one file - treating remote flags as architecture instead of distribution policy - adding analytics before the harness can explain itself locally - claiming a harness is complete without transcript and permission tests ## Minimal Verification Before calling the harness usable, verify: - config precedence behaves as documented - permission modes actually filter tools - skill discovery finds real `SKILL.md` files - session persistence writes and reloads transcripts - the full query loop works with a deterministic provider The verification standard is simple: no claims about the harness until the config, permission, skills, session, and loop seams are each exercised once. ## Use This Skill To - design a fresh coding-agent harness - simplify a bloated Claude Code-style runtime - review an existing agent runtime for opacity and unnecessary layers - extract reusable harness patterns from a larger codebase ## Do Not Use This Skill To - recreate the full Claude Code product surface - justify hidden behavior with “that is how the upstream does it” - add cloud control planes, telemetry, or feature flags without a concrete requirement ## Output Standard When applying this skill, produce: - the minimal harness shape - the layers kept vs removed - the exact config precedence - the permission model - the smallest verification plan that proves the harness is real
Related Skills
Cleaning Business Operations
Commercial and residential cleaning business operations agent. Covers pricing, bidding, staffing, supply costs, insurance, OSHA compliance, quality control, and growth from solo operator to multi-crew company.
afrexai-claude-code-production
Complete Claude Code productivity system — project setup, prompting patterns, sub-agent orchestration, context management, debugging, refactoring, TDD, and shipping 10X faster. Zero scripts needed.
ask-claude
Delegate a task to Claude Code CLI and immediately report the result back in chat. Supports persistent sessions with full context memory. Safe execution: no data exfiltration, no external calls, file operations confined to workspace. Use when the user asks to run Claude, delegate a coding task, continue a previous Claude session, or any task benefiting from Claude Code's tools (file editing, code analysis, bash, etc.).
Claude Code Memory Kit
Stop Claude Code from repeating mistakes — enforce guardrails, preserve context, maintain consistency across sessions
claude-code-mastery
Complete guide to mastering Claude Code CLI — installation to production workflows
diskclean
AI-assisted disk space scanner and cleaner. Finds reclaimable space (node_modules, build caches, package caches, downloads, Docker, Xcode, logs) and intelligently cleans safe items with strict guardrails.
claude-audit
Full project audit — launches 5 parallel AI agents (security, bugs, dead code, architecture, performance) to scan your codebase read-only, then compiles a unified report with health grade (A+ to F) and offers surgical fixes. Language-agnostic. Zero config.
openmath-lean-theorem
Configures Lean environments, installs external proof skills, runs preflight checks, and guides the workflow for proving downloaded OpenMath Lean theorems locally.
Claude Skills 开发框架架构指导手册
## 1. 项目概述 (Overview)
claude-code-usage
Check Claude Code OAuth usage limits (session & weekly quotas). Use when user asks about Claude Code usage, remaining limits, rate limits, or how much Claude usage they have left. Includes automated session refresh reminders and reset detection monitoring.
ClaudeHemat
# Introduction
claude-code-cli
Delegate coding tasks to Claude Code CLI via background process. Use when: building features, reviewing PRs, refactoring codebases, or iterative coding that needs file exploration. Supports interactive PTY mode for confirmations/permissions and headless pipe mode for automation. NOT for: simple one-liner fixes (just edit), reading code (use read tool), or any work in ~/.openclaw/ workspace.