Token导航 LogoToken导航TokenDH.com
开发执行命令clawhub未标认证来源可访问clear审计提醒

persistent-code-terminal持久代码终端

Agent Skill

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

总安装

59,921

周安装

2,472

GitHub Stars

1

下载量

19,578
OpenClaw

安装说明

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

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

ClawHubOpenClaw
openclaw skills install persistent-code-terminal

简介

每个项目的持久编码终端 (tmux)。在稳定会话中运行 Codex CLI (codex exec);移动/SSH 友好。

SKILL.md

name
persistent-code-terminal
description
Persistent per-project coding terminal (tmux). Run Codex CLI (codex exec) inside a stable session; mobile/SSH friendly.
user-invocable
true
metadata
{"openclaw":{"emoji":"💻","os":["darwin","linux"],"requires":{"bins":["tmux"]},"install":[{"id":"brew","kind":"brew","formula":"tmux","bins":["tmux"],"label":"Install tmux (brew)"},{"id":"apt","kind":"apt","package":"tmux","bins":["tmux"],"label":"Install tmux (apt)"}]}}

persistent-code-terminal

A persistent coding terminal for OpenClaw. It creates a tmux session per project:

<project-name>-code-session

This makes terminal-first AI coding (Codex CLI / Claude Code / any CLI tool) reliable and mobile/SSH friendly:

  • detach/reattach without losing output
  • keep shell state across turns
  • keep long-running tasks alive (dev server, watch mode, etc.)

OpenClaw natural-language routing

When user intent is "use natural language to drive Codex CLI in this repo", route through this skill first.

Intelligent auto-trigger:

  • Routing toggle: openclaw.config.dev.autoCodeRouting (default false).
  • If enabled, route coding workflow messages via:

- {baseDir}/bin/persistent-code-terminal-route.sh "<user message>"

  • The route script applies:

- intent detection (code change / fix / test / build / commit / push / codex phrases) - safety filtering (must be git repo + action verbs; bypass on 不要执行,只分析) - execution chain: - persistent-code-terminal-auto.sh --max-retries 3 --instruction "<message>" - persistent-code-terminal-summary.sh --lines 120 - fallback for missing deps (tmux/codex) with doctor guidance.

Multi-project routing:

  • One message can include multiple project tasks split by newline / / ;
  • Supported patterns:

- 给 <project> 项目 <instruction> - 给<project>项目:<instruction> - 为 <project> 修复/增加/修改 ... - <project> 项目 ...;<project> 项目 ...

  • Execution is serial per project:

- start.sh --project <project> - auto.sh --max-retries 3 --instruction "<instruction>" - summary.sh --lines 120 --json

  • Invalid/unknown project tasks are reported as failed without blocking other tasks.

Trigger shortcuts (recommended):

  • If user message starts with codex , treat the remaining text as instruction.
  • Execute:

- {baseDir}/bin/persistent-code-terminal-codex-exec.sh "<remaining text>"

  • Then report with:

- {baseDir}/bin/persistent-code-terminal-status.sh - {baseDir}/bin/persistent-code-terminal-summary.sh --lines 120

Preferred execution pattern in chat-driven runs:

  • start.sh (or implicit auto-create from send.sh)
  • codex-exec.sh "<instruction>" for Codex-driven work
  • status.sh / summary.sh for concise progress reporting

If user says "检查项目/继续会话/跑测试并总结", use this skill scripts instead of asking user to type long shell commands.

Core model (must follow)

start → send → read → decide

1) Start/ensure session:

  • {baseDir}/bin/persistent-code-terminal-start.sh

2) Send ONE command:

  • {baseDir}/bin/persistent-code-terminal-send.sh "<command>"

- Appends a pane sentinel on completion: __PCT_EXIT_CODE__N - Supports: --timeout <seconds>, --dry-run, --phase <name>

3) Read output:

  • {baseDir}/bin/persistent-code-terminal-read.sh

- Parses the latest sentinel and updates .pct-state.json

4) Check state quickly (optional):

  • {baseDir}/bin/persistent-code-terminal-status.sh
  • {baseDir}/bin/persistent-code-terminal-summary.sh --lines 120
  • {baseDir}/bin/persistent-code-terminal-doctor.sh
  • {baseDir}/bin/persistent-code-terminal-list.sh (list *-code-session)
  • {baseDir}/bin/persistent-code-terminal-switch.sh --project <name>

State file:

  • .pct-state.json (current project directory)
  • Fields: projectDir, session, lastCommand, lastExitCode, phase, updatedAt

Structured output:

  • {baseDir}/bin/persistent-code-terminal-read.sh --json
  • {baseDir}/bin/persistent-code-terminal-summary.sh --json
  • {baseDir}/bin/persistent-code-terminal-auto.sh --json

Codex-first workflow (one-shot)

If Codex CLI is installed as codex, prefer:

  • {baseDir}/bin/persistent-code-terminal-codex-exec.sh "<instruction>"
  • Default behavior uses:

- codex exec --full-auto --sandbox workspace-write --cd <current-dir> "<instruction>"

  • You can pass additional flags before the instruction:

- {baseDir}/bin/persistent-code-terminal-codex-exec.sh --json -o /tmp/codex.json "<instruction>"

  • Set PCT_CODEX_NO_DEFAULT_FLAGS=1 to disable default flags.

Example:

  • {baseDir}/bin/persistent-code-terminal-codex-exec.sh "Implement feature X. Ensure build and tests pass. Commit and push to current branch. Do NOT force push."

Safety

  • Never git push --force unless user explicitly requests.
  • Keep secrets out of terminal output.
  • Prefer feature branches; avoid direct pushes to main/master unless explicitly requested.
  • For network/privileged actions (for example git push), follow active Codex approval/sandbox policy.

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

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

04

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

能力 5

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

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

平台分布

OpenClaw

70.38%
按下载量换算13,779

安全审计

VirusTotal

可疑

ClawScan

通过

Static analysis

未展示

权限和风险

执行命令

安装流程涉及命令执行,可能通过 openclaw skills install persistent-code-terminal 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

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

来源信息

继续浏览同类 Skills