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

long-context-shell长上下文 shell

Agent Skill

long-context-shell 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

3,672

周安装

153

GitHub Stars

1

下载量

1,224
OpenClaw

安装说明

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

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

ClawHubOpenClaw
openclaw skills install long-context-shell

简介

使用文件支持的日志、截断的预览和快速日志扫描运行长或连续的 shell 命令。当 shell 输出可能很大、正在进行或很小时时调用

SKILL.md

name
long-context-shell
description
Runs long or continuous shell commands with file-backed logs, truncated previews, and fast log scanning. Invoke when shell output may be large, ongoing, or hard to inspect directly.

Long Context Shell

Use this skill when a shell command is likely to produce long output, keep running, refresh continuously, or require structured monitoring instead of raw stdout.

Invoke When

  • The command may print more than a small screen of output
  • The command may run for a long time
  • The command may stream continuously, such as watch, top, tail -f, ping, or log followers
  • The command fails and you need a lightweight scan instead of manually reviewing a large log

Core Behavior

  • Always write stdout and stderr to a timestamped log file
  • Return a compact status card instead of raw full output
  • Truncate long previews by default and point to the log file for deeper inspection
  • Preserve timestamps so you can inspect the latest state or a specific time window
  • Offer a lightweight scan step for locating likely errors, warnings, and failures

Tools

long_context_shell_run

Run a shell command in a detached process with file-backed logging.

Inputs

  • command (string, required): shell command to run
  • waitMs (number, optional): how long to wait before returning an initial status card
  • background (boolean, optional): force monitor-first mode and return quickly for later peeks
  • headLines (number, optional): lines to show from the beginning of the log
  • tailLines (number, optional): lines to show from the end of the log

Behavior

  1. Start the command through the platform shell
  2. Write stdout and stderr to a log file with timestamps
  3. If background is true, prefer a short initial wait and return control quickly
  4. Return a status card with session id, log path, line count, byte count, status, background mode, and truncated preview
  5. If the command still runs, use long_context_shell_peek later instead of rerunning the command

long_context_shell_peek

Read the latest state of an existing session or log file.

Inputs

  • sessionId (string, optional): previously returned session id
  • logPath (string, optional): direct path to a log file if session id is unavailable
  • headLines (number, optional): lines to show from the beginning
  • tailLines (number, optional): lines to show from the end
  • timeQuery (string, optional): timestamp fragment to filter lines, such as 2026-03-24T10:15

Behavior

  1. Resolve the session or log file
  2. Detect whether the process is still running or already exited
  3. Return a compact status card with truncated preview
  4. If timeQuery is present, return matching lines for that timestamp fragment

long_context_shell_scan

Scan a large log for likely failures instead of manually reading the full file.

Inputs

  • sessionId (string, optional): previously returned session id
  • logPath (string, optional): direct path to a log file
  • patterns (array of strings, optional): custom match patterns
  • contextLines (number, optional): surrounding lines to include around each match
  • limit (number, optional): maximum number of matches to return

Behavior

  1. Search the log for strong failure signals such as error, exception, failed, fatal, and timeout
  2. Rank matches by severity so likely root-cause lines appear before generic warnings
  3. Return the strongest matches with line numbers, severity, and short context
  4. Prefer this tool over manual full-log inspection when output is large

long_context_shell_stop

Stop a running session when monitoring is no longer needed.

Inputs

  • sessionId (string, required): session to stop

Recommended Workflow

  1. Use long_context_shell_run for long or continuous commands
  2. If status is running, use long_context_shell_peek to monitor progress
  3. If status is failed or the preview is too short to explain the problem, use long_context_shell_scan
  4. Only read the full log manually when the scan still leaves important ambiguity

Debug Tips

  • Start with a small waitMs and inspect the first status card before increasing complexity
  • If a command is expected to keep running, set background: true and observe with repeated long_context_shell_peek
  • Use timeQuery with the startedAt timestamp prefix to zoom into a suspicious time slice without reading the whole log
  • If preview is truncated, treat logPath as the source of truth and use scan before opening the whole file
  • If scan misses the real issue, retry with custom patterns that match the toolchain, framework, or service you are debugging
  • When shell quoting gets tricky, first validate the raw command directly in the terminal, then move the exact command string into long_context_shell_run
  • Prefer short self-contained repro commands such as node -e or a tiny script file when debugging behavior across shells
  • Remember that shell syntax can differ across Unix and Windows, so commands using pipes, redirects, or quoting may need platform-specific forms
  • For continuous commands, always finish the debug loop with long_context_shell_stop so old sessions do not keep running in the background
  • To review a human-readable end-to-end scenario, run node manual-flow-test.js and inspect the printed status cards and scan output

Safety

  • Do not run destructive commands without explicit user approval
  • Ask before using commands that delete files, reformat disks, reboot the machine, or escalate privileges
  • Prefer long_context_shell_scan over full-log manual review when output is large
  • Use long_context_shell_stop when a continuous command is no longer needed, especially for tail -f, watch, or similar monitoring sessions

Examples

  • Long build:

- long_context_shell_run({ command: "npm run build", waitMs: 1500 })

  • Continuous output:

- long_context_shell_run({ command: "tail -f app.log", background: true, waitMs: 500 })

  • Check latest state:

- long_context_shell_peek({ sessionId: "..." })

  • Check a specific timestamp:

- long_context_shell_peek({ sessionId: "...", timeQuery: "2026-03-24T10:15" })

  • Scan failures:

- long_context_shell_scan({ sessionId: "..." })

  • Human-readable flow test:

- node manual-flow-test.js

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

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

04

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

能力 5

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

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

平台分布

OpenClaw

90.5%
按下载量换算1,108

安全审计

VirusTotal

可疑

ClawScan

通过

Static analysis

可疑

权限和风险

执行命令

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

安装前确认

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

来源信息

继续浏览同类 Skills