Token导航 LogoToken导航

Agent Skill · 研究检索

shellcraft(shellcraft 搜索)

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

shellcraft 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为可写文件;许可证信息还不明确,第三方扫描有提醒项,按安装量在研究检索类的 73,675 个 Skill 里排第 62,484。

总安装 333周安装 14GitHub Stars 2下载 116核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/thesmart/shellcraft --skill shellcraft

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

用于查找、检索和筛选相关信息,支持关键词匹配和线索定位。适合在开发中快速获取候选方案或技术资料。shellcraft 属于研究检索类 Skill,可作为该场景下的辅助能力补充。可结合来源仓库和 README 进一步核验具体实现方式。安装前应确认是否会触发联网、命令执行或文件读写操作。

注意权限范围和仓库维护状态,避免误用或安全风险。

来源仓库内路径:skills/shellcraft

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

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

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

    它需要可写文件,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

shellcraft 怎么安装?

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

shellcraft 支持哪些 AI 工具?

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

shellcraft 需要什么权限?

权限级别是可写文件。该 Skill 可能写入或修改本地文件,使用前需要确认目标目录和修改范围。

shellcraft 是免费的吗?

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

shellcraft 用的人多吗?

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

shellcraft 安全吗?

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

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

值得选的地方

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

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

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

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

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

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
shellcraft

shellcraft 搜索 · 本页

3332可写文件未明确有提醒

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

SKILL.md 原文

Agent Skill: Shellcraft

Shell Conventions

Shell scripts and libraries SHALL:

  • target POSIX.1-2017 for maximum compatibility (exception: mktemp is OK)
  • handle errors explicitly; check every command that can fail
  • use built-in utilities
  • source using imports

Shell scripts and libraries SHALL NOT:

  • modify global shell state
  • use set -o pipefail (not POSIX-standard)

Shell scripts SHALL:

  • use #!/bin/sh shebang
  • handle --help before all other args
  • exit 0 on success, 2 on bad arguments, 1 on all other failures
  • use getoptions to declare and validate arguments
  • write error messages to stderr (>&2) — include what failed and how to fix it

Shell scripts SHALL NOT:

  • write to a path that isn't explicit via an argument (use stdout instead)

Shell scripts SHOULD:

  • resolve SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" when sourcing relative files
  • be idempotent where possible

Shell libraries SHALL:

  • use return, not exit — exit terminates the parent shell
  • omit the shebang — libs are sourced, not executed directly

Glossary

TermCanonical nameDefinition
script, executable, utilityshell scriptA directly-executable shell file: no extension, chmod ug+x.
library, lib, sourced fileshell libA .sh file meant to be imported or inlined by other scripts, not executed directly.
flags, options, arguments, parameters, CLI inputsargumentsThe command-line args declared in parser_definition() and parsed by getoptions.
vendor libsvendor libA third-party shell file (.sh) under vendor/, provided as is for use by the skill.
vendor contextvendor context fileA Markdown (.md) file co-located with a vendor lib that documents its API. Read this instead of the lib source.

Naming

  • functions and variables: snake_case
  • constants and env vars: UPPER_SNAKE_CASE
  • file names: kebab-case (lowercase, hyphens)
  • use readonly for constants set once at startup

Exit Codes

CodeMeaning
0Success
1General error
2Usage / invalid arguments
126Command found but not executable
127Command not found
130Interrupted (SIGINT / Ctrl-C)

Best practices:

  • use || die "message" pattern for error propagation
  • use printf '%s\n' "$msg" over echo "$msg" — echo behavior varies across shells
  • use printf '%s' (no newline) when building partial output
  • use trap handlers for cleanup and safety
  • use mktemp for in-progress work (prevents partial artifacts)
  • shell scripts: no file extension, chmod ug+x
  • shell libs: .sh file extension, no execute bit

Argument Conventions

Here is a pseudo-grammar for style of CLI arguments:

args           = [ command , " " , { subcommand , " " } ]
               , { option , " " }
               , { positional , " " }
               , [ separator , " " , { positional } ] ;

option         = short_group | long_option ;

short_group    = "-" , SHORT_CHAR , { SHORT_CHAR }
               , [ " " , value ] ;

long_option    = "--" , LONG_NAME , [ "=" , value | " " , value ] ;

separator      = "--"

command        = TOKEN ;
subcommand     = TOKEN ;
value          = TOKEN ;
positional     = TOKEN ;

(* The "--" is optional and rare. When present, it
   terminates option parsing — everything after it
   is collected as positional arguments in `$@`. *)
File Argument Validation

ALWAYS, EXPLICITLY validate file/directory args early with die, before real work. Skip emptiness, symlinks, and extensions — focus on safety not business logic.

File input:

[ -e "$FILE" ] || die "file not found: $FILE"
[ -f "$FILE" ] || die "not a regular file: $FILE"
[ -r "$FILE" ] || die "file not readable: $FILE"

Directory input:

[ -e "$DIR" ] || die "directory not found: $DIR"
[ -d "$DIR" ] || die "not a directory: $DIR"
[ -r "$DIR" ] || die "directory not readable: $DIR"
[ -x "$DIR" ] || die "directory not traversable: $DIR"

File output:

_outdir="$(dirname "$FILE")"
[ -d "$_outdir" ] || die "parent directory not found: $_outdir"
[ -w "$_outdir" ] || die "parent directory not writable: $_outdir"
if [ -e "$FILE" ]; then
  [ -f "$FILE" ] || die "not a regular file: $FILE"
  [ -w "$FILE" ] || die "file not writable: $FILE"
fi

Directory output:

[ -e "$DIR" ] || die "directory not found: $DIR"
[ -d "$DIR" ] || die "not a directory: $DIR"
[ -w "$DIR" ] || die "directory not writable: $DIR"

POSIX Utilities

External utilities from POSIX.1-2017 (IEEE Std 1003.1-2017), Shell & Utilities volume, Chapter 4. These are assumed to be present on the system and may be used freely without a command -v guard.

  • awk: pattern scanning and text processing
  • basename: return non-directory portion of pathname
  • bc: arbitrary precision calculator language
  • cat: concatenate and print files
  • chgrp: change file group ownership
  • chmod: change file modes
  • chown: change file ownership
  • cksum: write file checksums and sizes
  • cmp: compare two files byte-by-byte
  • comm: select or reject lines common to two sorted files
  • command: identify a command type
  • cp: copy files
  • csplit: split files based on context
  • cut: extract fields/columns from lines
  • date: print or set the system date and time
  • dd: convert and copy a file
  • df: report free disk space
  • diff: compare files line by line
  • dirname: return directory portion of pathname
  • du: estimate file space usage
  • env: set environment and execute a command
  • expand: convert tabs to spaces
  • expr: evaluate expressions (prefer $(()) for arithmetic)
  • false: return false value (exit 1)
  • file: determine file type
  • find: find files
  • fold: fold long lines for finite width output
  • getconf: get system configuration values
  • grep: search file contents for patterns
  • head: output first part of files
  • iconv: codeset conversion
  • id: print user and group IDs
  • join: relational join of two sorted files
  • kill: terminate or signal a process
  • link: create a hard link to a file
  • ln: link files
  • locale: get locale-specific information
  • logger: log messages to the system log
  • logname: return the user's login name
  • ls: list directory contents
  • mkdir: make directories
  • mkfifo: make FIFO special files (named pipes)
  • mktemp: create a temporary file or directory (not POSIX — see notes below)
  • mv: move files
  • nice: invoke a utility with an altered nice value
  • nl: line numbering filter
  • nohup: invoke a utility immune to hangups
  • od: dump files in various formats
  • paste: merge corresponding lines of files
  • patch: apply changes to files
  • pathchk: check pathnames
  • printf: format and print data
  • ps: report process status
  • renice: set nice values of running processes
  • rm: remove directory entries
  • rmdir: remove directories
  • sed: stream editor
  • sh: shell, the standard command language interpreter
  • sleep: suspend execution for an interval
  • sort: sort lines of text
  • split: split files into pieces
  • strings: find printable strings in files
  • stty: set the options for a terminal
  • tail: output last part of files
  • tee: duplicate stdin to stdout and a file
  • touch: change file access and modification times
  • tput: terminal capability queries (colors, cursor)
  • tr: translate or delete characters
  • true: return true value (exit 0)
  • tsort: topological sort
  • tty: return user's terminal name
  • type: check how a name would be interpreted
  • uname: print system information
  • unexpand: convert spaces to tabs
  • uniq: report or filter out repeated lines
  • unlink: call the unlink function
  • wc: count lines, words, and bytes
  • xargs: build and execute commands from stdin

ALWAYS verify non-standard utilities (not on the list above) before using:

command -v jq >/dev/null || die "jq is required but not found"

Portability Notes

Utilities with common non-portable pitfalls:

date

+%s (epoch seconds) is not POSIX. GNU uses -d, BSD uses -j -f for date parsing. Stick to format strings like +%Y-%m-%d or +%H:%M:%S.

echo

Behavior of echo varies across shells and platforms — backslash interpretation and -n flag handling are not standardized. Prefer printf '%s\n' for reliable output:

# bad: may interpret escapes or not, depending on platform
echo "value is\t$val"

# good: consistent everywhere
printf 'value is\t%s\n' "$val"

find

POSIX-safe primaries: -name, -type, -exec {} \;, -newer, -perm, -print.

Not POSIX: -maxdepth, -mindepth, -print0, -regex, -delete. Use -prune to limit depth:

# equivalent to -maxdepth 1
find . ! -name . -prune -type f

grep

BRE (basic regular expressions) by default. Use -E for extended regex. No -P (Perl regex) in POSIX. Use -q for silent match testing:

echo "$line" | grep -qE '^[0-9]+$' || die "not a number"

ls

Never parse ls output — filenames with spaces, newlines, or special characters will break it. Use find or shell glob patterns instead:

# bad: parsing ls
for f in $(ls *.txt); do ...

# good: glob
for f in *.txt; do
    [ -f "$f" ] || continue
    ...
done

mktemp

Not in any POSIX spec but ubiquitous across GNU coreutils, BSD, and BusyBox. mktemp and mktemp -d work on all major implementations. Avoid -t with a template — the syntax differs between GNU and BSD. Assumed available because there is no portable alternative for safe temp file creation.

read

Only -r is POSIX (disable backslash escaping). Always use read -r.

Not portable: -n, -t, -p, -a, -s, -d.

sed

BRE by default. Use -E for extended regex (POSIX 2024, widely supported).

-i (in-place) is not POSIX. Use a temp file:

sed 's/old/new/g' "$file" > "$file.tmp" && mv "$file.tmp" "$file"

sleep

Fractional seconds (sleep 0.5) are not POSIX — only integer seconds are guaranteed.

sort

POSIX-safe flags: -n, -r, -k, -t, -u, -f, -b.

Not POSIX: -V (version sort), -z (null delimiter), -h (human numeric).

test / []

Use = not == for string comparison. -a (and) and -o (or) are obsolescent — chain separate tests instead:

# bad
[ -f "$f" -a -r "$f" ]

# good
[ -f "$f" ] && [ -r "$f" ]

tr

Use POSIX character classes: [:upper:], [:lower:], [:digit:], [:alpha:], [:space:].

echo "$val" | tr '[:lower:]' '[:upper:]'

xargs

-0 (null delimiter) is not POSIX. Use newline-delimited input or find -exec instead.

Read these additional references only when the script requires them:

  • Arguments Parsing
  • Bashisms to Avoid — porting a bash script to POSIX, or reviewing existing code for portability
  • Logging & Verbosity — script needs --verbose, --quiet, timestamped logs, or structured stderr output
  • Trap & Cleanup — script creates resources that must be cleaned up on exit, error, or interrupt
  • Input Validation — script validates files, paths, numbers, or enum values beyond what getoptions handles
  • Temp Files & Atomic Writes — script uses mktemp, writes intermediate files, or must write output atomically
  • Pipelines & Line Processing — script reads lines from files or commands, chains filters, or uses xargs/FIFOs
  • Strings & Pattern Matching — script manipulates strings (prefix/suffix stripping, case patterns, regex, here-docs)
  • Imports — sourcing libraries, resolving paths relative to SCRIPT_DIR
  • Capturing stderr — capturing error output from a failing command while checking its exit status
  • Locked Execution — exclusive locking when only one instance of a script should run at a time
  • Retry Loops — retrying transient failures (network calls, lock contention)
  • Rollback — undo-on-failure for scripts that make multiple changes that should be all-or-nothing
  • Advanced getoptions — less common getoptions features (read only when the specific feature is needed)

Script Authoring Procedure

All conventions and utilities target POSIX.1-2017 (IEEE Std 1003.1-2017), Shell & Utilities volume.

Follow these steps to author the target script.

Step 1: Make a Plan

  1. Define the goal clearly

1. Write one-sentence summary: what the target script does. - If not succinctly clear, maybe script is too complex? 2. Use the summary to name the script file

  1. Identify the target script's arguments and outputs.
  2. Consider edge cases and failure modes.
  3. Outline the control flow.

1. major steps in plain language and/or pseudocode 2. consider loops, pipelines, subshells, tmp files, traps, cleanup 3. choose external utilities if needed, try to stick w/ built-ins

  1. Decide if the target script needs parameter parsing:

- Yes — script has flags, named params, or subcommands: use getoptions-3.3.2.sh - No — script only takes positional arguments: skip getoptions, define usage() manually

  1. Decide the dependency bundling strategy (when using vendor libs): Infer the right strategy automatically: portability/distribution → inlined; project repo → bundled; minimal options → none. If genuinely unclear, ask the end-user.

- bundled (default) — copy getoptions-3.3.2.sh + getoptions-3.3.2.md to shell_modules/ alongside the script. Add to VCS; shared by all scripts in that directory. - inlined — embed the lib directly into the script via vendor/inline. Use when the script must be self-contained (distributed binary, curl | sh, CI without a repo). - none — no vendor libs; parse manually. Use when named options are trivial or absent.

  1. Write an example of how an end-user would use the target script to accomplish the goal.

Evaluate the plan and ensure the it aligns with end-user's stated intent.

Step 2: Write the Script

Follow the plan and write the script using the appropriate template. Make the script executable (chmod ug+x) if needed.

With Option Parsing

Target script has flags, named params, or subcommands — use getoptions-3.3.2.sh (vendor context file: vendor/getoptions-3.3.2.md):

#!/bin/sh

# --- helpers ---

die() { printf '%s\n' "error: $*" >&2; exit 1; }

# --- imports (see: reference/imports.md) ---

SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
. "${SCRIPT_DIR}/shell_modules/getoptions-3.3.2.sh" # @inline getoptions

# --- getoptions ---

parser_definition() {
   # Replace {{SCRIPT_NAME}} with the script's file name
   setup REST help:usage -- "Usage: {{SCRIPT_NAME}} [options] [arguments]"
   msg -- 'Options:'
   disp :usage -h --help
}

# If script requires arguments, uncomment next line:
# [ $# -eq 0 ] && set -- --help

eval "$(getoptions parser_definition - "$0") die 'failed to parse arguments'"

# --- script ---

# WRITE SCRIPT HERE
Without Option Parsing

Script takes only positional arguments — no import needed, define help manually:

#!/bin/sh

# --- helpers ---

die() { printf '%s\n' "error: $*" >&2; exit 1; }

usage() {
   printf 'Usage: {{SCRIPT_NAME}} <arg1> [arg2]\n'
   printf '\n'
   printf 'Description of what the script does.\n'
}

case ${1-} in --help|-h) usage; exit 0 ;; esac

# --- script ---

# WRITE SCRIPT HERE

Step 3: Verification

  1. Validate syntax: sh -n script-name
  2. Verify --help output is clear and complete.
  3. Test the script using the example from the plan:

- Create a random tmp directory using mktemp. - Generate necessary input files to the random tmp directory. - Direct any output to the random tmp directory.

Fix any issues encountered and try again.

Step 4: Bundle Dependencies

Skip this step for shell libs. Execute the strategy chosen in Step 1:

bundled — copy vendor libs and their context files to shell_modules/:

cp vendor/getoptions-3.3.2.sh  shell_modules/
cp vendor/getoptions-3.3.2.md  shell_modules/

The shell_modules/ directory is a sibling of the target script. The .md context file is essential — it lets future agents understand the dependency without access to the shellcraft skill. Commit shell_modules/ to VCS alongside the script.

inlined — embed all @inline-tagged imports into a distributable single-file build:

vendor/inline --target path/to/script --inline path/to/lib.sh --key <key> --overwrite

none — no build step needed.

Step 5: Install

Read $PATH and $HOME. Select two or three of the most suitable locations for potentially installing the script. Prefer at least one path in $HOME. Ask the end-user if they would like to install the script, provide options with rationale for why that might be a good location.

平台分布

Codex

34.3%
按下载量换算40

Claude

27.54%
按下载量换算32

Cursor

20.71%
按下载量换算24

Gemini CLI

10.31%
按下载量换算12

安全审计

Gen Agent Trust Hub

通过

Socket

可疑

Snyk

可疑

权限和风险

可写文件

该 Skill 可能写入或修改本地文件,使用前需要确认目标目录和修改范围。

安装前确认

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

继续浏览同类 Skills