← 返回 Skills 市场
iyang1016

Clawder

作者 iyang1016 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
86
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install clawder-coding
功能描述
Clawder is a production-grade AI coding agent that fully verifies, autonomously fixes, logs mistakes, and runs parallel sub-agents to deliver robust, product...
使用说明 (SKILL.md)

Clawder Skill for ZooClaw/OpenClaw

A production-grade AI coding agent skill that implements JT directives (the same instructions Anthropic uses internally for production outputs).


Overview

Clawder is not just another coding agent - it's a production-grade agent that follows JT directives to override default AI agent laziness.

What Makes Clawder Different

Standard Agent Clawder
Minimal, fast output Verified, production-ready code
Avoids "improvements" Fixes architectural flaws
No verification MUST run type-check, lint, test
Forgets mistakes Logs to gotchas.md
Sequential large tasks Parallel sub-agents
Asks for guidance Autonomous bug fixing

Installation

Option 1: Copy to ZooClaw Skills

# Create skill directory
mkdir -p ~/.openclaw/extra-skills/clawder

# Copy files
cp SKILL.md ~/.openclaw/extra-skills/clawder/
cp memory-extraction.ts ~/.openclaw/extra-skills/clawder/
cp agent.md ~/.openclaw/extra-skills/clawder/

Option 2: Via Clawhub (when published)

clawhub install clawder

Configuration

Add to your ZooClaw config (~/.openclaw/config.yaml):

clawder:
  enabled: true
  
  # Verification requirements (mandatory before "done")
  verification:
    required: true
    typeCheck: true
    lint: true
    test: true
  
  # Sub-agent settings
  subAgents:
    enabled: true
    maxFilesPerAgent: 5-8
    mode: worktree  # worktree, fork, or remote
  
  # Memory system
  memory:
    enabled: true
    autoExtract: true
    gotchasLogging: true
  
  # JT Directives
  directives:
    seniorDevOverride: true
    editIntegrity: true
    contextDecayAwareness: true
    autonomousBugFixing: true
    mistakeLogging: true

JT Directives Implementation

1. Pre-Work

// Delete dead code before refactoring
async function deleteBeforeBuild(files: string[]) {
  for (const file of files) {
    const content = await readFile(file)
    const cleaned = await removeDeadCode(content)
    if (cleaned !== content) {
      await writeFile(file, cleaned)
      await commit("Remove dead code from " + file)
    }
  }
}

2. Forced Verification

// FORBIDDEN to claim "done" without verification
async function verifyWork(projectRoot: string) {
  const checks = []
  
  // Type check
  if (fs.existsSync(path.join(projectRoot, 'tsconfig.json'))) {
    checks.push(runCommand('tsc --noEmit --strict'))
  }
  
  // Lint
  if (fs.existsSync(path.join(projectRoot, '.eslintrc'))) {
    checks.push(runCommand('eslint .'))
  }
  
  // Tests
  if (fs.existsSync(path.join(projectRoot, 'package.json'))) {
    checks.push(runCommand('npm test'))
  }
  
  const results = await Promise.all(checks)
  
  if (results.some(r => r.exitCode !== 0)) {
    throw new Error('Verification failed. Fix errors before claiming done.')
  }
  
  return true
}

3. Sub-Agent Swarming

// MUST spawn parallel agents for >5 files
async function spawnSubAgents(task: Task, affectedFiles: string[]) {
  if (affectedFiles.length \x3C= 5) {
    return executeTask(task, affectedFiles)
  }
  
  // Chunk into 5-8 files per agent
  const chunks = chunkArray(affectedFiles, 6)
  
  const agents = await Promise.all(
    chunks.map(async (files, i) => {
      return spawnAgent({
        prompt: `${task.prompt}\
\
Focus files: ${files.join(', ')}`,
        isolation: 'worktree',
        mode: 'plan',
        inheritMemories: true,
        run_in_background: true
      })
    })
  )
  
  return agents
}

4. Edit Integrity

// Re-read before AND after every edit
async function safeEditFile(filePath: string, oldString: string, newString: string) {
  // Before edit: re-read
  const beforeContent = await readFile(filePath)
  
  // Perform edit
  const result = await editTool(filePath, oldString, newString)
  
  // After edit: verify
  const afterContent = await readFile(filePath)
  
  if (!afterContent.includes(newString)) {
    throw new Error('Edit failed silently. File content does not match expected change.')
  }
  
  return result
}

5. Mistake Logging

// Log corrections to gotchas.md
async function logMistake(correction: string) {
  const gotchasPath = path.join(projectRoot, 'gotchas.md')
  
  const mistake = {
    pattern: extractPattern(correction),
    timestamp: new Date().toISOString(),
    context: correction,
    prevention: generatePreventionRule(correction)
  }
  
  await appendToMarkdown(gotchasPath, `
## ${mistake.pattern}

**When**: ${mistake.context}

**Prevention**: ${mistake.prevention}

*Logged: ${mistake.timestamp}*
`)
}

// Load gotchas at session start
async function loadGotchas(): Promise\x3Cstring> {
  const gotchasPath = path.join(projectRoot, 'gotchas.md')
  
  if (!fs.existsSync(gotchasPath)) {
    return ''
  }
  
  const content = await readFile(gotchasPath, 'utf-8')
  
  return `## Lessons Learned

Review these patterns before starting new work:

${content}
`
}

Memory System Integration

Memory Types

type MemoryType = 'user' | 'feedback' | 'project' | 'reference'

// Feedback memories for JT directives
const jtFeedbackMemories = [
  {
    type: 'feedback' as const,
    scope: 'team' as const,
    description: 'Must run type-checker before claiming "done"',
    content: `
**Rule**: Never report task complete without running:
- Type-checker (tsc --strict)
- Linter (eslint)
- Test suite (npm test)

**Why**: Internal tools mark writes as successful when bytes hit disk, not when code compiles.

**How to apply**: Before any "Done!" response, run verification tools and report results.
`
  },
  {
    type: 'feedback' as const,
    scope: 'team' as const,
    description: 'Re-read files before and after every edit',
    content: `
**Rule**: Before EVERY file edit, re-read the file. After editing, read again to confirm.

**Why**: Edit tool fails silently when old_string doesn't match due to stale context.

**How to apply**: Never batch more than 3 edits to same file without verification read.
`
  }
]

Memory Extraction

// Extract JT directive adherence as feedback memories
async function extractJTMemories(transcript: Message[]) {
  const memories = []
  
  // Check for verification patterns
  if (transcript.some(m => m.content.includes('type-check') || m.content.includes('lint'))) {
    memories.push({
      type: 'feedback' as const,
      scope: 'team' as const,
      description: 'Agent verified work with type-checker and linter',
      content: 'Agent ran verification tools before claiming done.'
    })
  }
  
  // Check for mistake logging
  if (transcript.some(m => m.content.includes('gotchas.md'))) {
    memories.push({
      type: 'feedback' as const,
      scope: 'team' as const,
      description: 'Agent logged mistake to gotchas.md',
      content: 'Agent converted correction into prevention rule.'
    })
  }
  
  return memories
}

Usage Examples

Example 1: Bug Fix

# User pastes error
clawder --prompt "Fix this bug: TypeError: Cannot read property 'user' of undefined"

# Clawder:
# 1. Reads error logs, traces root cause
# 2. Identifies missing null check in auth.ts
# 3. Implements structural fix (not just band-aid)
# 4. Re-reads file before/after edit
# 5. Runs type-checker: passes
# 6. Runs tests: all pass
# 7. Logs pattern to gotchas.md
# 8. Reports: "Fixed. Root cause was X. Added test Y. All verifications pass."

Example 2: Large Refactor

# User requests refactor
clawder --prompt "Refactor the authentication module"

# Clawder:
# 1. Enters plan mode, interviews user
# 2. Writes spec, gets approval
# 3. Splits into 4 phases (max 5 files each)
# 4. Launches 3 parallel sub-agents
# 5. Phase 1: completes, verifies, waits for approval
# 6. Phase 2: completes, verifies, waits for approval
# 7. ...
# 8. Reports: "Complete. All tests passing. Documentation updated."

Example 3: Autonomous Bug Fixing

# User provides CI failure
clawder --prompt "Fix failing CI: [paste CI output]"

# Clawder:
# 1. Reads CI logs, traces errors
# 2. Identifies root cause (no hand-holding needed)
# 3. Implements fix
# 4. Runs same CI commands locally to verify
# 5. Reports: "Fixed. Root cause was X. CI now passes."

Testing Clawder

Test Case 1: Verification Enforcement

// Test that Clawder verifies before claiming "done"
it('should run type-checker before claiming done', async () => {
  const result = await clawder.execute('Add new type signature')
  
  expect(result.verification).toEqual({
    typeCheck: true,
    lint: true,
    test: true
  })
  
  expect(result.status).toBe('verified')
})

Test Case 2: Sub-Agent Swarming

// Test that Clawder spawns sub-agents for >5 files
it('should spawn parallel agents for large refactors', async () => {
  const files = Array(20).fill('file.ts').map((f, i) => `src/${f.replace('ts', i + '.ts')}`)
  
  const result = await clawder.execute(`Refactor ${files.length} files`)
  
  expect(result.subAgents.length).toBeGreaterThanOrEqual(3)
  expect(result.subAgents.every(a => a.files.length \x3C= 8)).toBe(true)
})

Test Case 3: Mistake Logging

// Test that Clawder logs mistakes to gotchas.md
it('should log corrections to gotchas.md', async () => {
  await clawder.execute('Fix bug')
  
  // User corrects agent
  await clawder.receiveCorrection('You missed edge case X')
  
  const gotchas = await readFile('gotchas.md', 'utf-8')
  expect(gotchas).toContain('edge case X')
  expect(gotchas).toContain('Prevention:')
})

Integration with ZooClaw

sessions_spawn Integration

// Spawn Clawder via OpenClaw's sessions_spawn
const session = await sessions_spawn({
  runtime: 'acp',
  agentId: 'clawder',
  task: 'Refactor authentication module',
  mode: 'session',
  cwd: '/path/to/project',
  model: 'claude-opus-4-6',
  attachments: [
    {
      name: 'gotchas.md',
      content: await readFile('gotchas.md', 'utf-8')
    }
  ]
})

Memory System Integration

// Inject JT directive memories into system prompt
const systemPrompt = await buildSystemPrompt({
  basePrompt: 'You are Clawder, a production-grade AI coding agent...',
  memories: await scanMemoryFiles(memoryDir),
  gotchas: await loadGotchas(),
  jtDirectives: true // Include all 9 JT directives
})

Troubleshooting

Verification failing?

# Check if verification tools exist
ls -la node_modules/.bin/tsc node_modules/.bin/eslint

# If missing, configure project first
npx tsc --init
npx eslint --init

Sub-agents not spawning?

# Check config
grep "subAgents:" ~/.openclaw/config.yaml

# Ensure task touches >5 files
clawder --dry-run --prompt "Count files to modify"

Memory not working?

# Run memory scan
clawder --memory-scan

# Check memory directory
ls -la ~/.openclaw/memory/

Future Enhancements

Short Term

  • Automated sub-agent swarming
  • Gotchas.md auto-loading
  • Proactive compaction
  • Two-perspective review

Medium Term

  • Fresh eyes testing
  • Parallel batch changes
  • Cross-session memory sharing
  • Analytics dashboard

Long Term

  • Self-improving directives
  • Community gotchas sharing
  • Multi-modal memories
  • Real-time collaboration

License

Clawder skill for ZooClaw/OpenClaw. JT directives based on patterns discovered in Claude Code codebase.


Clawder - Production-grade AI coding for everyone

安全使用建议
This skill is plausible for a coding assistant, but exercise caution before enabling it on real projects: 1) Run it in a sandbox or test repository first—do not point it at production repos. 2) Disable autonomous execution or require explicit user approval for destructive actions (avoid 'bypass'/'yolo' modes). 3) Check platform protections: ensure skills cannot modify global/system prompts. 4) Inspect and control where memory/gotchas files are written (they may contain private info); restrict directories and rotate access. 5) If you plan to allow sub-agent spawning, limit their permissions and run in 'plan' mode so human approval is required before commits. 6) Review the memory-extraction.ts and other code for unexpected network calls (none are present now) before trusting the skill. If you need higher assurance, ask the publisher for source hosting and a security review or run the skill under monitored, least-privilege conditions.
功能分析
Type: OpenClaw Skill Name: clawder-coding Version: 1.0.0 The Clawder skill bundle is a sophisticated coding assistant framework designed to enforce high-quality development practices through 'JT directives'. It implements features such as mandatory code verification (running tsc, eslint, and npm test), sub-agent orchestration for large-scale refactors, and a structured memory system that logs mistakes to a 'gotchas.md' file. While the skill utilizes powerful capabilities like shell command execution and autonomous file modification, these actions are strictly scoped to the stated purpose of a production-grade coding agent, and there is no evidence of malicious intent, data exfiltration, or unauthorized persistence across the provided files (SKILL.md, memory-extraction.ts, agent.md).
能力评估
Purpose & Capability
The files, code examples, and instructions (running tsc/eslint/tests, editing files, spawning sub-agents, writing gotchas.md/memory files) align with the stated purpose of a 'production-grade AI coding agent'. There are no requested unrelated credentials or external binaries that would be unexpected for such a tool.
Instruction Scope
SKILL.md and supporting docs include directives that go beyond simple assistance: they instruct deleting dead code, committing changes, re-reading files before/after edits, spawning background sub-agents, and running shell commands automatically. The docs explicitly state 'JT directives in system prompt' and 'ant-only directives' which suggests the skill expects or attempts to set system-level agent directives (prompt override). Combined with one-word confirmation modes (e.g., 'yes' = execute) and permission modes including 'bypass'/'yolo', this is scope creep that could cause the agent to perform destructive or broad actions with minimal confirmation.
Install Mechanism
This is instruction-only with a single TypeScript helper file; there is no install spec or external download. Nothing in the manifest installs arbitrary binaries or fetches code from remote URLs, so installation risk is low.
Credentials
The skill declares no required environment variables, credentials, or config paths. The behaviors that access filesystem and run local tools are proportionate to a coding agent and do not request unrelated secrets. However, the memory extraction and auto-writing behavior can store user/project content to disk—this is not a credential leak but is a privacy/storage concern to consider.
Persistence & Privilege
always is false (good). The skill is allowed to invoke autonomously (platform default) and the skill advocates autonomous bug-fixing and background sub-agents. That combination increases blast radius (ability to make codebase changes, spawn agents, write memory files). No evidence it modifies other skills or system files beyond project directories, but the autonomy + destructive/edit operations warrants restricting or reviewing runtime permissions and default modes.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install clawder-coding
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /clawder-coding 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release: Production-grade AI coding agent with JT directives, forced verification, and autonomous bug fixing
元数据
Slug clawder-coding
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Clawder 是什么?

Clawder is a production-grade AI coding agent that fully verifies, autonomously fixes, logs mistakes, and runs parallel sub-agents to deliver robust, product... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 86 次。

如何安装 Clawder?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install clawder-coding」即可一键安装,无需额外配置。

Clawder 是免费的吗?

是的,Clawder 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Clawder 支持哪些平台?

Clawder 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Clawder?

由 iyang1016(@iyang1016)开发并维护,当前版本 v1.0.0。

💬 留言讨论