clawd-code-python-port
БесплатноБез исполняемых скриптовНе проверенPython port of Claude Code agent harness — tools, commands, task orchestration, and CLI entrypoint via oh-my-codex
от reason-machines★ 99 звёзд на GitHubОб этом скилле
clawd-code Python Port
Skill by ara.so — Daily 2026 Skills collection.
What This Project Does
clawd-code is an independent Python rewrite of the Claude Code agent harness, built from scratch for educational purposes. It captures the architectural patterns of Claude Code — tool wiring, command dispatch, task orchestration, and agent runtime context — in clean Python, without copying any proprietary TypeScript source.
The project is orchestrated end-to-end using oh-my-codex (OmX), a workflow layer on top of OpenAI Codex. It is not affiliated with or endorsed by Anthropic.
Installation
# Clone the repository
git clone https://github.com/instructkr/clawd-code.git
cd clawd-code
# (Optional but recommended) Create a virtual environment
python3 -m venv .venv
source .venv/bin/activate
# Install dependencies (if a requirements.txt or pyproject.toml is present)
pip install -r requirements.txt
# or
pip install -e .
No API keys are needed for the manifest/summary/CLI commands. If you extend the query engine to call a live model, set your key via environment variable:
export ANTHROPIC_API_KEY="your-key-here"
export OPENAI_API_KEY="your-key-here"
Repository Layout
.
├── src/
│ ├── __init__.py
│ ├── commands.py # Command port metadata
│ ├── main.py # CLI entrypoint
│ ├── models.py # Dataclasses: subsystems, modules, backlog
│ ├── port_manifest.py # Python workspace structure summary
│ ├── query_engine.py # Renders porting summary from active workspace
│ ├── task.py # Task orchestration primitives
│ └── tools.py # Tool port metadata
├── tests/ # unittest-based verification
└── assets/
Key CLI Commands
All commands run via python3 -m src.main <subcommand>.
# Print a human-readable porting summary
python3 -m src.main summary
# Print the current Python workspace manifest
python3 -m src.main manifest
# List current Python modules/subsystems (paginated)
python3 -m src.main subsystems --limit 16
# Inspect mirrored command inventory
python3 -m src.main commands --limit 10
# Inspect mirrored tool inventory
python3 -m src.main tools --limit 10
# Run parity audit against local ignored archive (when present)
python3 -m src.main parity-audit
# Run the full test suite
python3 -m unittest discover -s tests -v
Core Data Models (src/models.py)
The dataclasses define the shape of the porting workspace:
from dataclasses import dataclass, field
from typing import List, Optional
@dataclass
class Module:
name: str
status: str # e.g. "ported", "stub", "backlog"
source_path: str
notes: Optional[str] = None
@dataclass
class Subsystem:
name: str
modules: List[Module] = field(default_factory=list)
description: Optional[str] = None
@dataclass
class PortManifest:
subsystems: List[Subsystem] = field(default_factory=list)
backlog: List[str] = field(default_factory=list)
version: str = "0.1.0"
Tools System (src/tools.py)
Tools are the callable units in the agent harness. Each tool entry carries metadata for dispatch:
from dataclasses import dataclass
from typing import Callable, Optional, Any, Dict
@dataclass
class Tool:
name: str
description: str
parameters: Dict[str, Any] # JSON-schema style param spec
handler: Optional[Callable] = None # Python callable for this tool
# Example: registering a tool
def read_file_handler(path: str) -> str:
with open(path, "r") as f:
return f.read()
READ_FILE_TOOL = Tool(
name="read_file",
description="Read the contents of a file at the given path.",
parameters={
"path": {"type": "string", "description": "Absolute or relative file path"}
},
handler=read_file_handler,
)
# Tool registry pattern
TOOL_REGISTRY: Dict[str, Tool] = {
READ_FILE_TOOL.name: READ_FILE_TOOL,
}
def dispatch_tool(name: str, **kwargs) -> Any:
tool = TOOL_REGISTRY.get(name)
if tool is None:
raise ValueError(f"Unknown tool: {name}")
if tool.handler is None:
raise NotImplementedError(f"Tool '{name}' has no handler yet.")
return tool.handler(**kwargs)
Commands System (src/commands.py)
Commands are higher-level agent actions, distinct from raw tools:
from dataclasses import dataclass
from typing import Optional, Callable, Any
@dataclass
class Command:
name: str
description: str
aliases: list
handler: Optional[Callable] = None
# Example command
def summarize_handler(context: dict) -> str:
return f"Summarizing {len(context.get('files', []))} files."
SUMMARIZE_COMMAND = Command(
name="summarize",
description="Summarize the current workspace context.",
aliases=["sum", "overview"],
handler=summarize_handler,
)
COMMAND_REGISTRY = {
SUMMARIZE_COMM
Установить clawd-code-python-port в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл clawd-code-python-port?
Python port of Claude Code agent harness — tools, commands, task orchestration, and CLI entrypoint via oh-my-codex
Как установить скилл clawd-code-python-port?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл clawd-code-python-port запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic