Token导航 LogoToken导航TokenDH.com
开发敏感数据clawhub未标认证来源可访问clear审计提醒

claude-code-runnerClaude 代码 runner

Agent Skill

claude-code-runner 用于补充开发相关能力,适合在 OpenClaw 中需要让 Agent 承接开发相关任务时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

41,708

周安装

1,671

GitHub Stars

1

下载量

13,502
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:claude-code-runner(Claude 代码 runner)
来源仓库:https://github.com/lhl09120/claude-code-runner
安装命令:
openclaw skills install claude-code-runner
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install claude-code-runner

简介

使用基于 PTY 的调用通过 Claude Code 执行编程任务。处理非 TTY 环境、自动响应提示并管理文件同步。

SKILL.md

name
claude-code-runner
description
Execute programming tasks via Claude Code using PTY-based invocation. Handles non-TTY environments, auto-responds to prompts, and manages file synchronization.

Claude Code Runner

Overview

A wrapper skill for running Claude Code programmatically in non-interactive environments. Uses PTY (pseudo-terminal) to handle TTY-required operations and automatically responds to confirmation prompts.

Features

  • PTY-based execution: Works in non-TTY environments (containers, CI/CD, background processes)
  • Auto-respond to prompts: Automatically answers "Do you want to..." confirmations
  • User switching: Runs as specified non-root user
  • File synchronization: Copies project to temp directory, executes, syncs changes back
  • Timeout handling: Configurable timeout with proper cleanup
  • Output capture: Captures and returns full stdout/stderr

Installation

# Clone the skill
git clone https://github.com/lhl09120/claude-code-runner-en.git

# Make script executable
chmod +x claude-code-runner-en/scripts/run_claude.py

Usage

Basic Usage

from claude_code_runner import run_claude_code

result = run_claude_code(
    workdir='/path/to/project',
    prompt='Refactor the authentication module to use JWT tokens',
    user='lighthouse',
    timeout=300
)

print(result)

Via Command Line

python3 scripts/run_claude.py /path/to/project "Your task description here"

Advanced Options

result = run_claude_code(
    workdir='/root/repo/my-project',
    prompt='''
    1. Review the codebase
    2. Identify security vulnerabilities
    3. Fix any issues found
    4. Add appropriate tests
    ''',
    user='developer',
    timeout=600  # 10 minutes
)

API Reference

run_claude_code(workdir, prompt, user='lighthouse', timeout=300)

Execute a Claude Code task in a PTY environment.

Parameters:

  • workdir (str): Working directory containing the project
  • prompt (str): Natural language task description
  • user (str): User to run as (default: 'lighthouse')
  • timeout (int): Timeout in seconds (default: 300)

Returns:

  • str: Combined stdout and stderr output

Behavior:

  1. Copies project to temporary directory
  2. Changes ownership to specified user
  3. Executes Claude Code via PTY
  4. Auto-responds to confirmation prompts
  5. Syncs changes back to original directory
  6. Cleans up temporary files

Use Cases

1. Automated Code Review

result = run_claude_code(
    workdir='/root/repo/project',
    prompt='Review this codebase and identify potential bugs or improvements'
)

2. Refactoring Tasks

result = run_claude_code(
    workdir='/root/repo/legacy-app',
    prompt='Refactor the database layer to use SQLAlchemy ORM instead of raw SQL'
)

3. Adding Features

result = run_claude_code(
    workdir='/root/repo/api-service',
    prompt='''
    Add a new REST endpoint for user profile management:
    - GET /api/users/{id}/profile
    - PUT /api/users/{id}/profile
    - Include validation and error handling
    - Add unit tests
    '''
)

4. Bug Fixes

result = run_claude_code(
    workdir='/root/repo/web-app',
    prompt='Fix the memory leak in the WebSocket connection handler'
)

Requirements

  • Python 3.8+
  • Claude Code installed and in PATH
  • Unix-like environment (Linux/macOS)
  • Root or sudo access (for user switching)

Configuration

Environment Variables

  • CLAUDE_CODE_USER: Default user to run as (default: 'lighthouse')
  • CLAUDE_CODE_TIMEOUT: Default timeout in seconds (default: 300)

Customization

Edit scripts/run_claude.py to customize:

  • Auto-response keywords
  • Temp directory location
  • Sync behavior
  • Output formatting

Troubleshooting

"Permission denied" errors

Ensure the script is run with sufficient privileges to:

  • Create temporary directories
  • Change file ownership
  • Switch to target user

Claude Code not found

Make sure Claude Code is installed and in the system PATH:

which claude

Task timeout

Increase the timeout for long-running tasks:

run_claude_code(workdir, prompt, timeout=600)  # 10 minutes

Interactive prompts not auto-responded

Add new prompt patterns to the auto-respond logic:

if b'new prompt text' in output:
    os.write(master_fd, b'y\
')

Limitations

  • Requires Unix-like environment (uses PTY)
  • Requires root/sudo for user switching
  • Claude Code must be installed separately
  • May not handle all edge cases of interactive prompts

License

MIT License

Copyright (c) 2026 lhl09120

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

See LICENSE file for full details.

Changelog

v1.0.0 (2026-02-27)

  • Initial release
  • PTY-based Claude Code execution
  • Auto-response to confirmation prompts
  • File synchronization
  • User switching support

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

84.24%
按下载量换算11,374

安全审计

VirusTotal

可疑

ClawScan

可疑

Static analysis

未展示

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills