Token导航 LogoToken导航

Agent Skill · 开发

shellflow(shellflow 命令行)

shellflow 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

shellflow 是开发类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证信息还不明确,第三方扫描有提醒项,按安装量在开发类的 21,746 个 Skill 里排第 20,882。

总安装 210周安装 9GitHub Stars 公开资料未说明下载 73核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/longcipher/shellflow --skill shellflow

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

用于处理 GitHub 仓库、Issue 和 Pull Request 协作信息。适合整理代码变更、跟踪任务状态或分析协作流程。可通过 GitHub API 获取仓库元数据和事件历史。安装前需确认账号权限,避免越权访问敏感仓库。shellflow 属于开发类 Skill,可作为该场景下的辅助能力补充。

建议结合原始 README 了解具体命令和数据格式。

来源仓库内路径:skills/shellflow

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/longcipher/shellflow --skill shellflow;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

shellflow 怎么安装?

在终端执行 npx skills add https://github.com/longcipher/shellflow --skill shellflow。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

shellflow 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

shellflow 需要什么权限?

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

shellflow 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

shellflow 用的人多吗?

公开数据是累计安装 210 次,近一周安装 9 次,下载 73 次。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

shellflow 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
skill-vetter

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
shellflow

shellflow 命令行 · 本页

210—接触敏感数据未明确有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Shellflow Playbook Authoring

Overview

Shellflow playbooks are standard bash scripts with comment markers that split execution into sequential local and remote blocks.

The agent should generate normal shell code first, then apply Shellflow-specific rules for block boundaries, shared prelude handling, remote host selection, and cross-block data passing.

When to Use

Use this skill when:

  • Writing a new Shellflow playbook.
  • Refactoring an existing bash script into # @LOCAL and # @REMOTE blocks.
  • Reviewing whether a script actually matches Shellflow's parser and execution model.
  • Explaining why a Shellflow script behaves differently from a single long-running shell session.

Do not use this skill for:

  • Generic bash scripting unrelated to Shellflow.
  • Arbitrary SSH orchestration syntax that Shellflow does not parse.
  • Multi-host fan-out or non-bash execution models.

Core Rules

1. Write a normal bash script

  • Use a regular .sh file.
  • Keep the shebang at the top when it helps editors and humans, for example #!/bin/bash.
  • Put shell options such as set -euo pipefail near the top if every block should inherit them.

2. Use only supported block markers

Shellflow recognizes these standalone marker lines:

  • # @LOCAL
  • # @REMOTE <ssh-host>

Rules:

  • Markers must appear on their own line as comments.
  • @REMOTE must include exactly one host argument.
  • Marker names are uppercase in current Shellflow usage.
  • Unknown markers fail parsing.

Good:

# @LOCAL
echo "build locally"

# @REMOTE staging
uname -a

Bad:

# @remote staging
uname -a

echo "# @LOCAL"

3. Treat everything before the first marker as shared prelude

Lines before the first marker are prepended to every executable block.

This area is appropriate for:

  • Shebangs
  • Shell safety flags such as set -euo pipefail
  • Small helper functions
  • Shared constants that should exist in every block

This area is not appropriate for one-time side effects, because they will run once per block:

  • cd some/dir
  • echo "starting deployment"
  • export BUILD_ID=$(date +%s) when you expect a single shared value
  • Any command that should happen only once

Good:

#!/bin/bash
set -euo pipefail

log() {
  printf '[shellflow] %s\n' "$*"
}

# @LOCAL
log "building"

Bad:

#!/bin/bash
cd /srv/app

# @LOCAL
pwd

# @REMOTE staging
pwd

Why it is bad: the cd /srv/app line becomes part of every block, including remote blocks.

4. Use block directives for timeout, retry, and exports

Block directives must appear immediately after the # @LOCAL or # @REMOTE <host> marker, before any command lines. They configure execution behavior for that specific block.

Timeout Directive

# @TIMEOUT <seconds> - Abort the block if it exceeds the specified duration.

# @LOCAL
# @TIMEOUT 30
sleep 60

Retry Directive

# @RETRY <count> - Retry the block up to N times on failure (0 means no retry).

# @LOCAL
# @RETRY 3
curl -f https://api.example.com/health

Export Directive

# @EXPORT NAME=source - Capture a value from the block result and pass it to subsequent blocks as an environment variable.

Valid sources:

  • stdout - The block's standard output
  • stderr - The block's standard error
  • output - Combined stdout and stderr
  • exit_code - The block's exit code (as string)
# @LOCAL
# @EXPORT BUILD_ID=stdout
echo "build-$(date +%s)"

# @LOCAL
echo "Building: $BUILD_ID"

You can use multiple exports in a single block:

# @LOCAL
# @EXPORT STATUS_CODE=exit_code
# @EXPORT RESPONSE=stdout
curl -s -w "%{http_code}" -o response.txt https://api.example.com

Shell Directive

# @SHELL <shell> - Specify the shell to use for executing this block.

Use this when targeting remote hosts that use a non-bash default shell (e.g., zsh).

# @REMOTE zsh-server
# @SHELL zsh
# zsh-specific commands now work
reload
compdef

Without @SHELL, Shellflow defaults to bash for all remote blocks.

5. Assume every block runs in a fresh shell

Each block is isolated.

Do not assume these persist into the next block:

  • Current working directory
  • Shell variables
  • export values
  • Aliases
  • Functions defined inside a block
  • Shell options set inside a block

Write each block so it can run independently.

Good:

# @LOCAL
cd /tmp
artifact=$(mktemp)
printf 'ready' > "$artifact"
echo "$artifact"

# @LOCAL
artifact="$SHELLFLOW_LAST_OUTPUT"
test -f "$artifact"
cat "$artifact"

Bad:

# @LOCAL
cd /tmp
artifact=$(mktemp)

# @LOCAL
printf 'ready' > "$artifact"
pwd

Why it is bad: artifact and the working directory do not persist.

6. Use SHELLFLOW_LAST_OUTPUT for explicit handoff

Shellflow passes the previous block's combined output into the next block as SHELLFLOW_LAST_OUTPUT.

Guidelines:

  • Prefer passing a single path, ID, or compact value.
  • Quote it when reading: "$SHELLFLOW_LAST_OUTPUT".
  • If the previous block prints multiple lines, expect a multi-line string.
  • Do not treat it as structured JSON unless you intentionally emitted JSON in the previous block.

Good:

# @LOCAL
echo "/tmp/release.tar.gz"

# @REMOTE staging
tar -tf "$SHELLFLOW_LAST_OUTPUT" >/dev/null

Better for structured data:

# @LOCAL
python - <<'PY'
import json
print(json.dumps({"release": "2026.03.15"}))
PY

# @LOCAL
python - <<'PY'
import json
import os
payload = json.loads(os.environ["SHELLFLOW_LAST_OUTPUT"])
print(payload["release"])
PY

7. Use SSH config host aliases, not ad-hoc targets

# @REMOTE <ssh-host> should point to a host that resolves through SSH config.

Prefer:

  • # @REMOTE staging
  • # @REMOTE production-app

Avoid assuming Shellflow accepts any arbitrary free-form destination unless it is resolvable by the SSH config in use.

If a remote host is unknown, Shellflow fails before execution.

8. Keep blocks self-contained and fail-fast

Shellflow runs blocks in order and stops on the first failure.

Write blocks so that:

  • Preconditions are checked inside the block that needs them.
  • Cleanup is local to the block when necessary.
  • Output is intentional and not noisy when later blocks depend on it.

Prefer this:

# @REMOTE staging
cd /srv/app
test -f docker-compose.yml
docker compose pull
docker compose up -d

Over this:

# @REMOTE staging
cd /srv/app

# @REMOTE staging
docker compose pull
docker compose up -d

Why: the second block cannot rely on the first block's cd.

9. CLI Options and Output Modes

Shellflow provides several CLI options for different use cases:

Basic Options

shellflow run script.sh              # Run a script
shellflow run script.sh -v          # Run with verbose output
shellflow run script.sh --dry-run   # Preview execution plan without running

Structured Output

shellflow run script.sh --json       # Single JSON report
shellflow run script.sh --jsonl       # Streaming JSON Lines events
  • --json: Outputs a single JSON object with the complete run report
  • --jsonl: Outputs one JSON object per event (run_started, block_started, block_finished, run_finished)

Execution Control

shellflow run script.sh --no-input   # Non-interactive mode (stdin closed)
shellflow run script.sh --ssh-config /path/to/config  # Custom SSH config
  • --no-input: Closes stdin before running blocks; useful for automation
  • --ssh-config: Override the default SSH config path (~/.ssh/config)

Audit Logging

shellflow run script.sh --audit-log audit.jsonl --jsonl

The --audit-log option writes redacted JSON Lines events to a file. Secret-like exports (containing TOKEN, SECRET, or PASSWORD in the name) are automatically redacted to [REDACTED].

10. Exit Codes

Shellflow returns distinct exit codes for different failure types:

  • 0: Success
  • 1: General execution failure
  • 2: Parse failure (invalid script syntax)
  • 3: SSH config failure (host not found)
  • 4: Timeout failure (block exceeded timeout)

Authoring Checklist

Before returning a Shellflow playbook, verify that:

  • The script is valid bash without custom DSL syntax.
  • Only # @LOCAL, # @REMOTE <host>, and block directives (# @TIMEOUT, # @RETRY, # @EXPORT, # @SHELL) are used.
  • Block directives appear immediately after the block marker, before any commands.
  • Anything before the first marker is safe to repeat for every block.
  • Every block can run independently in a fresh shell.
  • Cross-block data uses SHELLFLOW_LAST_OUTPUT or @EXPORT explicitly.
  • Remote targets match the intended SSH host aliases.
  • Commands that should happen once are not accidentally placed in the shared prelude.
  • Export sources are valid (stdout, stderr, output, exit_code).

Reference Example

#!/bin/bash
set -euo pipefail

log() {
  printf '[deploy] %s\n' "$*"
}

# @LOCAL
# @EXPORT BUILD_ID=stdout
log "building artifact"
build_id="build-$(date +%Y%m%d%H%M%S)"
echo "$build_id"

# @LOCAL
# @TIMEOUT 60
# @RETRY 2
log "deploying to staging"
echo "Deploying $BUILD_ID to staging"

# @REMOTE staging
# @EXPORT DEPLOYED_HOST=stdout
log "receiving deployment"
hostname

# @LOCAL
log "deployed to: $DEPLOYED_HOST"
log "build $BUILD_ID complete"

Common Mistakes

  • Putting one-time commands before the first marker, then being surprised when they run for every block.
  • Expecting cd, export, or local shell variables from one block to exist in the next block.
  • Using an undefined remote host alias.
  • Placing block directives after commands instead of immediately after the marker.
  • Using invalid export sources (not stdout, stderr, output, or exit_code).
  • Forgetting that @SHELL must be specified before any commands in the block.
  • Forgetting that @RETRY 0 means no retry attempts.
  • Using @TIMEOUT with values too small for normal operation.
  • Printing extra debug output from a block whose output is consumed by the next block via @EXPORT.
  • Forgetting to quote "$SHELLFLOW_LAST_OUTPUT".
  • Treating Shellflow as a persistent session instead of sequential isolated shells.

平台分布

Codex

33.92%
按下载量换算25

Claude

30.01%
按下载量换算22

Cursor

18.29%
按下载量换算13

Gemini CLI

10.17%
按下载量换算7

安全审计

Gen Agent Trust Hub

通过

Socket

可疑

Snyk

通过

权限和风险

接触敏感数据

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

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills