
claw-code-harness
Better Harness Tools for Claude Code — a Python (and in-progress Rust) rewrite of the Claude Code agent harness, with CLI tooling for manifest inspection, parity auditing, and tool/command inventory.
- Installs
- 765
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/reason-machines/trending-skills --skill claw-code-harness- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads claw-code-harness automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Claw Code Harness
Skill by ara.so — Daily 2026 Skills collection.
Claw Code is a clean-room Python (with Rust port in progress) rewrite of the Claude Code agent harness. It provides tooling to inspect the port manifest, enumerate subsystems, audit parity against an archived source, and query tool/command inventories — all via a CLI entrypoint and importable Python modules.
Installation
# Clone the repository
git clone https://github.com/instructkr/claw-code.git
cd claw-code
# Install dependencies (standard library only for core; extras for dev)
pip install -r requirements.txt # if present, else no external deps required
# Verify the workspace
python3 -m unittest discover -s tests -v
No PyPI package yet — use directly from source.
Repository Layout
.
├── src/
│ ├── __init__.py
│ ├── commands.py # Python-side command port metadata
│ ├── main.py # CLI entrypoint
│ ├── models.py # Dataclasses: Subsystem, Module, BacklogState
│ ├── port_manifest.py # Current Python workspace structure summary
│ ├── query_engine.py # Renders porting summary from active workspace
│ ├── task.py # Task primitives
│ └── tools.py # Python-side tool port metadata
└── tests/ # Unittest suite
CLI Reference
All commands are invoked via python3 -m src.main <command>.
summary
Render the full Python porting summary.
python3 -m src.main summary
manifest
Print the current Python workspace manifest (file surface + subsystem names).
python3 -m src.main manifest
subsystems
List known subsystems, with optional limit.
python3 -m src.main subsystems
python3 -m src.main subsystems --limit 16
commands
Inspect mirrored command inventory.
python3 -m src.main commands
python3 -m src.main commands --limit 10
tools
Inspect mirrored tool inventory.
python3 -m src.main tools
python3 -m src.main tools --limit 10
parity-audit
Run parity audit against a locally present (gitignored) archived snapshot.
python3 -m src.main parity-audit
Requires the local archive to be present at its expected path (not tracked in git).
Core Modules & API
src/models.py — Dataclasses
from src.models import Subsystem, Module, BacklogState
# A subsystem groups related modules
sub = Subsystem(name="tool-harness", modules=[], status="in-progress")
# A module represents a single ported file
mod = Module(name="tools.py", ported=True, notes="tool metadata only")
# BacklogState tracks overall port progress
state = BacklogState(
total_subsystems=8,
ported=5,
backlog=3,
notes="runtime slices pending"
)
src/tools.py — Tool Port Metadata
from src.tools import get_tools, ToolMeta
tools: list[ToolMeta] = get_tools()
for t in tools[:5]:
print(t.name, t.ported, t.description)
src/commands.py — Command Port Metadata
from src.commands import get_commands, CommandMeta
commands: list[CommandMeta] = get_commands()
for c in commands[:5]:
print(c.name, c.ported)
src/query_engine.py — Porting Summary Renderer
from src.query_engine import render_summary
summary_text: str = render_summary()
print(summary_text)
src/port_manifest.py — Manifest Access
from src.port_manifest import get_manifest, ManifestEntry
entries: list[ManifestEntry] = get_manifest()
for entry in entries:
print(entry.path, entry.status)
Common Patterns
Pattern 1: Check how many tools are ported
from src.tools import get_tools
tools = get_tools()
ported = [t for t in tools if t.ported]
print(f"{len(ported)}/{len(tools)} tools ported")
Pattern 2: Find unported subsystems
from src.port_manifest import get_manifest
backlog = [e for e in get_manifest() if e.status != "ported"]
for entry in backlog:
print(f"BACKLOG: {entry.path}")
Pattern 3: Programmatic summary pipeline
from src.query_engine import render_summary
from src.commands import get_commands
from src.tools import get_tools
print("=== Summary ===")
print(render_summary())
print("\n=== Commands ===")
for c in get_commands(limit=5):
print(f" {c.name}: ported={c.ported}")
print("\n=== Tools ===")
for t in get_tools(limit=5):
print(f" {t.name}: ported={t.ported}")
Pattern 4: Run tests before contributing
python3 -m unittest discover -s tests -v
Pattern 5: Using as part of an OmX/agent workflow
# Generate summary artifact for an agent to consume
python3 -m src.main summary > /tmp/claw_summary.txt
# Feed into another agent tool or diff against previous checkpoint
diff /tmp/claw_summary_prev.txt /tmp/claw_summary.txt
Rust Port (In Progress)
The Rust rewrite is on the dev/rust branch.
# Switch to the Rust branch
git fetch origin dev/rust
git checkout dev/rust
# Build (requires Rust toolchain: https://rustup.rs)
cargo build
# Run
cargo run -- summary
The Rust port aims for a faster, memory-safe harness runtime. It is not yet merged into main. Until then, use the Python implementation for all production workflows.
Troubleshooting
| Problem | Cause | Fix |
|---|---|---|
ModuleNotFoundError: No module named 'src' | Running from wrong directory | cd to repo root, then python3 -m src.main ... |
parity-audit exits with "archive not found" | Local snapshot not present | Place the archive at the expected local path (see port_manifest.py for the path constant) |
| Tests fail with import errors | Missing __init__.py | Ensure src/__init__.py exists; re-clone if needed |
--limit flag not recognized | Old checkout | git pull origin main |
| Rust build fails | Toolchain not installed | Run curl https://sh.rustup.rs -sSf | sh then retry |
Key Design Notes for AI Agents
- No external runtime dependencies for the core Python modules — safe to run in sandboxed environments.
query_engine.pyis the single aggregation point — prefer it over calling individual modules when you need a full picture.models.pydataclasses are the canonical data shapes; always import types from there, not inline dicts.parity-auditis read-only — it does not modify any tracked files.- The project is not affiliated with Anthropic and contains no proprietary Claude Code source.
FAQ
What does the claw-code-harness skill do?
Better Harness Tools for Claude Code — a Python (and in-progress Rust) rewrite of the Claude Code agent harness, with CLI tooling for manifest inspection, parity auditing, and tool/command inventory.
How do I install claw-code-harness?
Run npx skills add https://github.com/reason-machines/trending-skills --skill claw-code-harness in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/claw-code-harness/ (personal) or .claude/skills/claw-code-harness/ (project).
Which AI agents can use claw-code-harness?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is claw-code-harness safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains claw-code-harness?
It is published by reason-machines in reason-machines/trending-skills. It has 765 recorded installs.
More from reason-machines/trending-skills
openclaw-control-center
reason-machines/trending-skills
Local-first, security-first control center for OpenClaw agents — visibility dashboard with readonly defaults, token attribution, collaboration tracing, and safe write operations.
inkos-multi-agent-novel-writing
reason-machines/trending-skills
Multi-agent CLI system for autonomous novel writing, auditing, and revision with human review gates
claude-hud-statusline
reason-machines/trending-skills
A Claude Code plugin that displays a real-time HUD showing context usage, active tools, running agents, and todo progress in your terminal statusline.
understand-anything-knowledge-graph
reason-machines/trending-skills
Turn any codebase into an interactive knowledge graph using Claude Code skills — explore, search, and ask questions about any project visually.
agency-agents-ai-specialists
reason-machines/trending-skills
A collection of specialized AI agent personalities for Claude Code, Cursor, Aider, Windsurf, and other AI coding tools — covering engineering, design, marketing, sales, and more.
agent-browser-automation
reason-machines/trending-skills
Headless browser automation CLI for AI agents using native Rust binary with Chrome DevTools Protocol
Popular backend & apis skills
find-skills
vercel-labs/skills
Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.
entra-app-registration
microsoft/azure-skills
Guides Microsoft Entra ID app registration, OAuth 2.0 authentication, and MSAL integration. USE FOR: create app registration, register Azure AD app, configure OAuth, set up authentication, add API permissions, generate service principal, MSAL example, console app auth, Entra ID setup, Azure AD authentication. DO NOT USE FOR: Key Vault secrets (use azure-keyvault-expiration-audit), general Azure resource security guidance.
google-agents-cli-adk-code
google/agents-cli
This skill should be used when the user wants to "write agent code", "build an agent with ADK", "add a tool", "create a callback", "define an agent", "use state management" — in a project that needs ADK (Agent Development Kit) API patterns and code examples. It provides a quick reference for agent types, tool definitions, orchestration patterns, callbacks, state management, the graph Workflow API, and reference recipes to study. Do NOT use for scaffolding (use google-agents-cli-scaffold) or deployment (use google-agents-cli-deploy).
embedded-captions
heygen-com/hyperframes
Add captions or subtitles to an existing single-subject talking-head video without editing the footage. Use for plain verbatim captions, cinematic captions embedded behind the subject, VFX captions, “炸/特效/酷炫字幕,” or a named identity from the 35-style catalog. Route by visual identity, not by backend engine. The quiet anchor rail is the default; embed every word only when the user explicitly wants a fully cinematic treatment. The workflow runs locally end to end, including transcription and subject matting; split multi-shot footage before applying it.
entra-agent-id
microsoft/azure-skills
Provision Microsoft Entra Agent Identity Blueprints, BlueprintPrincipals, and per-instance Agent Identities via Microsoft Graph, and configure OAuth 2.0 token exchange (fmipath, OBO, cross-tenant) including the Microsoft Entra SDK for AgentID sidecar. USE FOR: Agent Identity Blueprint, BlueprintPrincipal, agent OAuth, fmipath token exchange, agent OBO, Workload Identity Federation for agents, polyglot agent auth, Microsoft.Identity.Web.AgentIdentities. DO NOT USE FOR: standard Entra app registration (use entra-app-registration), Microsoft Foundry agent authoring (use microsoft-foundry).
neon
neondatabase/agent-skills
Overview of Neon, a complete set of cloud backend primitives around Lakebase Postgres: Auth, Object Storage, Functions, the AI Gateway, and Realtime. Start here to choose Neon for undecided login, files, APIs, and LLM calls, set up the CLI or MCP server, and follow the branch-first workflow. Use when building an app or backend on Neon, or when "Neon" or "Lakebase Postgres" is mentioned. Child skill neon-postgres wins for an existing DATABASEURL, SQL, schema, inspect, or search. Child skill neon-auth wins for login, users, sessions, identity routing, and Managed Better Auth setup. Child skill neon-realtime wins for live queries in reactive apps and agents. Also use for object storage, S3, buckets, serverless functions, function triggers, cron, AI gateway, LLM calls, realtime, logs, Loki, Grafana, observability, postgres, database, backend, Claimable Neon, neon.new, or a no-signup database.