克劳德代码套件
lean-claude-code-harness
by aznikline
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.
安装
claude skill add --url https://github.com/openclaw/skills文档
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:
- Can you explain config precedence without reading three files?
- Are tool permissions checked before execution?
- Can you list the built-in tools in one screen?
- Are skills discovered from visible files instead of hidden registration?
- Does every run persist a transcript?
- 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:
- defaults
- user config
- project config
- local config
- 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:
defaultandplanexpose read-only tools- write or shell tools require a stronger mode
bypassPermissionsshould 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_filesread_filegrepbash
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:
- receive prompt
- ask provider for next action
- validate tool request
- execute tool
- append tool result to state
- repeat until final response
- 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.mdfiles - 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
相关 Skills
Claude接口
by anthropics
面向接入 Claude API、Anthropic SDK 或 Agent SDK 的开发场景,自动识别项目语言并给出对应示例与默认配置,快速搭建 LLM 应用。
✎ 想把Claude能力接进应用或智能体,用claude-api上手快、兼容Anthropic与Agent SDK,集成路径清晰又省心
RAG架构师
by alirezarezvani
聚焦生产级RAG系统设计与优化,覆盖文档切块、检索链路、索引构建、召回评估等关键环节,适合搭建可扩展、高准确率的知识库问答与检索增强应用。
✎ 面向RAG落地,把知识库、向量检索和生成链路系统串联起来,做架构设计时更清晰,也更少踩坑。
多智能体架构
by alirezarezvani
聚焦多智能体系统架构设计,梳理 Supervisor、Swarm、分层和 Pipeline 等模式,覆盖角色定义、通信协作与性能评估,适合规划稳健可扩展的 AI agent 编排方案。
✎ 帮你系统解决多智能体应用的架构设计与协同编排难题,适合构建复杂 AI 工作流,成熟度高、社区认可也很亮眼。
相关 MCP 服务
知识图谱记忆
编辑精选by Anthropic
Memory 是一个基于本地知识图谱的持久化记忆系统,让 AI 记住长期上下文。
✎ 帮 AI 和智能体补上“记不住”的短板,用本地知识图谱沉淀长期上下文,连续对话更聪明,数据也更可控。
顺序思维
编辑精选by Anthropic
Sequential Thinking 是让 AI 通过动态思维链解决复杂问题的参考服务器。
✎ 这个服务器展示了如何让 Claude 像人类一样逐步推理,适合开发者学习 MCP 的思维链实现。但注意它只是个参考示例,别指望直接用在生产环境里。
by deusdata
持久化的代码库知识图谱,可跨会话保留上下文,在 session 重启或上下文压缩后仍能继续使用。
✎ 专治 AI 编程助手“会话失忆”,把代码库沉淀为持久知识图谱,重启或压缩上下文后也能无缝续上开发状态。