Token导航 LogoToken导航

Agent Skill · 研究检索

cli-ops(CLI OPS 搜索)

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

cli-ops 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 65,351。

总安装 282周安装 12GitHub Stars 17下载 99核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/0xdarkmatter/claude-mods --skill cli-ops

这个 Skill 是做什么的

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

cli-ops 提供面向代理工作流的 CLI 模式指南,强调自文档化与可组合性。适合构建可被 AI 助手链式调用与程序化解析输出的工具。核心原则包括统一模式、单一职责与可预测行为。安装前应确认输出格式标准化,便于后续脚本处理。cli-ops 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/cli-ops

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

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

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

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

常见问题

6 条

cli-ops 怎么安装?

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

cli-ops 支持哪些 AI 工具?

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

cli-ops 需要什么权限?

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

cli-ops 是免费的吗?

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

cli-ops 用的人多吗?

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

cli-ops 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

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

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

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

适不适合你

更适合

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

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 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调用外部服务未明确有提醒
cli-ops

CLI OPS 搜索 · 本页

28217接触敏感数据未明确通过

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

SKILL.md 原文

CLI Patterns for Agentic Workflows

Patterns for building CLI tools that AI assistants and power users can chain, parse, and rely on.

Philosophy

Build CLIs for agentic workflows - AI assistants and power users who chain commands, parse output programmatically, and expect predictable behavior.

Core Principles

PrincipleMeaningWhy It Matters
Self-documenting--help is comprehensive and always currentLLMs discover capabilities without external docs
PredictableSame patterns across all commandsLearn once, use everywhere
ComposableUnix philosophy - do one thing wellTools chain together naturally
Parseable--json always available, always validMachine consumption without parsing hacks
Quiet by defaultData only, no decoration unless requestedScripts don't break on unexpected output
Fail fastInvalid input = immediate errorNo silent failures or partial results

Design Axioms

  1. stdout is sacred - Only data. Never progress, never logging, never decoration.
  2. stderr is for humans - Progress bars, colors, tables, warnings live here.
  3. Exit codes have meaning - Scripts can branch on failure mode.
  4. Help includes examples - The fastest path to understanding.
  5. JSON shape is predictable - Same structure across all commands.

Command Architecture

Structural Pattern

<tool> [global-options] <resource> <action> [options] [arguments]

Every CLI follows this hierarchy:

<tool>
├── --version, --help              # Global flags
├── auth                           # Authentication (if required)
│   ├── login
│   ├── status
│   └── logout
└── <resource>                     # Domain resources (plural nouns)
    ├── list                       # Get many
    ├── get <id>                   # Get one by ID
    ├── create                     # Make new (if supported)
    ├── update <id>                # Modify existing (if supported)
    ├── delete <id>                # Remove (if supported)
    └── <custom-action>            # Domain-specific verbs

Naming Conventions

ElementConventionValid ExamplesInvalid Examples
Tool namelowercase, 2-12 charsmytool, datactlMyTool, my-tool-cli
Resourceplural noun, lowercaseinvoices, usersInvoice, user
Actionverb, lowercaselist, get, synclisting, getter
Long flagskebab-case--dry-run, --output-format--dryRun, --output_format
Short flagssingle letter-n, -q, -v-num, -quiet

Standard Resource Actions

ActionHTTP EquivReturnsIdempotent
listGET /resourcesArrayYes
get <id>GET /resources/:idObjectYes
createPOST /resourcesCreated objectNo
update <id>PATCH /resources/:idUpdated objectYes
delete <id>DELETE /resources/:idConfirmationYes
searchGET /resources?q=ArrayYes

Flags & Options

Mandatory Flags

Every command MUST support:

FlagShortBehaviorOutput
--help-hShow help with examplesHelp text to stdout, exit 0
--jsonMachine-readable outputJSON to stdout

Root command MUST additionally support:

FlagShortBehaviorOutput
--version-VShow version<tool> <version> to stdout, exit 0

Recommended Flags

FlagShortTypePurposeDefault
--quiet-qboolSuppress non-essential stderrfalse
--verbose-vboolIncrease detail levelfalse
--dry-runboolPreview without executingfalse
--limit-nintMax results to return20
--output-opathWrite output to filestdout
--format-fenumOutput formatvaries

Flag Behavior Rules

  1. Boolean flags take no value: --json not --json=true
  2. Short flags can combine: -vq equals -v -q
  3. Unknown flags are errors: Never silently ignore
  4. Repeated flags: Last value wins (or error if inappropriate)

Output Specification

Stream Separation

This is the most critical rule:

StreamContentWhen
stdoutData onlyAlways
stderrEverything elseInteractive mode

stdout receives:

  • JSON when --json is set
  • Minimal text output when interactive
  • Nothing else. Ever.

stderr receives:

  • Progress indicators (spinners, bars)
  • Status messages ("Fetching...", "Done")
  • Warnings
  • Rich formatted tables
  • Colors and decoration
  • Debug information (--verbose)

Interactive Detection

import sys

def is_interactive() -> bool:
    """True if connected to a terminal, not piped."""
    return sys.stdout.isatty() and sys.stderr.isatty()
Contextstdout.isatty()Behavior
TerminalTrueRich output to stderr, summary to stdout
Piped (`\jq`)FalseMinimal/JSON to stdout
Redirected (> file)FalseMinimal to stdout
--json flagAnyJSON to stdout, suppress stderr noise

JSON Output Schema

See references/json-schemas.md for complete JSON response patterns.

Key conventions:

  • List responses: {"data": [...], "meta": {...}}
  • Single item: {"data": {...}}
  • Errors: {"error": {"code": "...", "message": "..."}}
  • ISO 8601 dates, decimal money, string IDs

Exit Codes

Semantic exit codes that scripts can rely on:

CodeNameMeaningWhen
0SUCCESSOperation completedEverything worked
1ERRORGeneral/unknown errorUnexpected failures
2AUTH_REQUIREDNot authenticatedNo token, token expired
3NOT_FOUNDResource missingID doesn't exist
4VALIDATIONInvalid inputBad arguments, failed validation
5FORBIDDENPermission deniedAuthenticated but not authorized
6RATE_LIMITEDToo many requestsAPI throttling
7CONFLICTState conflictConcurrent modification, duplicate

Usage

# Script can branch on exit code
mytool items get item-001 --json
case $? in
  0) echo "Success" ;;
  2) echo "Need to authenticate" && mytool auth login ;;
  3) echo "Item not found" ;;
  *) echo "Error occurred" ;;
esac

Implementation

# Constants
EXIT_SUCCESS = 0
EXIT_ERROR = 1
EXIT_AUTH_REQUIRED = 2
EXIT_NOT_FOUND = 3
EXIT_VALIDATION = 4
EXIT_FORBIDDEN = 5
EXIT_RATE_LIMITED = 6
EXIT_CONFLICT = 7

# Usage
raise typer.Exit(EXIT_NOT_FOUND)

Error Handling

Error Output Format

With --json, errors output structured JSON to stdout AND a message to stderr:

stderr:

Error: Item not found

stdout:

{
  "error": {
    "code": "NOT_FOUND",
    "message": "Item not found",
    "details": {
      "item_id": "bad-id"
    }
  }
}

Error Codes

CodeExitMeaning
AUTH_REQUIRED2Must authenticate first
TOKEN_EXPIRED2Token needs refresh
FORBIDDEN5Insufficient permissions
NOT_FOUND3Resource doesn't exist
VALIDATION_ERROR4Invalid input
INVALID_ARGUMENT4Bad argument value
MISSING_ARGUMENT4Required argument missing
RATE_LIMITED6Too many requests
CONFLICT7State conflict
ALREADY_EXISTS7Duplicate resource
INTERNAL_ERROR1Unexpected error
API_ERROR1Upstream API failed
NETWORK_ERROR1Connection failed

Implementation Pattern

def _error(
    message: str,
    code: str = "ERROR",
    exit_code: int = EXIT_ERROR,
    details: dict = None,
    as_json: bool = False,
):
    """Output error and exit."""
    error_obj = {"error": {"code": code, "message": message}}
    if details:
        error_obj["error"]["details"] = details

    if as_json:
        print(json.dumps(error_obj, indent=2))

    # Always print human message to stderr
    console.print(f"[red]Error:[/red] {message}")
    raise typer.Exit(exit_code)

Help System

Help Requirements

Every --help output MUST include:

  1. Brief description (one line)
  2. Usage syntax
  3. Options with descriptions
  4. Examples (critical for discovery)

Help Format Template

<one-line description>

Usage: <tool> <resource> <action> [OPTIONS] [ARGS]

Arguments:
  <arg>          Description of positional argument

Options:
  -s, --status TEXT    Filter by status
  -n, --limit INTEGER  Max results [default: 20]
  --json               Output as JSON
  -h, --help           Show this help

Examples:
  <tool> <resource> <action>
  <tool> <resource> <action> --status active
  <tool> <resource> <action> --json | jq '.[0]'

Examples Are Critical

Examples should show:

  1. Basic usage - Simplest invocation
  2. Common filters - Most-used options
  3. JSON piping - How to chain with jq
  4. Real-world scenarios - Actual use cases

Authentication

Auth Commands

Tools requiring authentication MUST implement:

<tool> auth login      # Interactive authentication
<tool> auth status     # Check current state
<tool> auth logout     # Clear credentials

Credential Storage Priority

Recommended: OS keyring with fallbacks for maximum security

  1. Environment variable (CI/CD, testing)

- MYTOOL_API_TOKEN or similar - Highest priority, overrides all other sources

  1. OS Keyring (primary storage - secure)

- Windows: Credential Manager - macOS: Keychain - Linux: Secret Service (GNOME Keyring, KWallet) - Encrypted at rest, per-user isolation

  1. .env file (development fallback)

- Plain text in current directory - Convenient for local development - Must be in .gitignore

Dependencies:

dependencies = [
    "keyring>=24.0.0",      # OS keyring access
    "python-dotenv>=1.0.0", # .env file support
]

Simple alternative: Just config file in ~/.config/<tool>/

  • Good for tools without sensitive credentials
  • Or when OS keyring adds too much complexity

See references/implementation.md for complete credential storage implementations.

Unauthenticated Behavior

When auth is required but missing:

$ mytool items list
Error: Not authenticated. Run: mytool auth login
# exit code: 2
$ mytool items list --json
# stderr: Error: Not authenticated. Run: mytool auth login
{"error": {"code": "AUTH_REQUIRED", "message": "Not authenticated. Run: mytool auth login"}}
# exit code: 2

Data Conventions

Date Handling

Input (Flexible): Accept multiple formats for user convenience

FormatExampleInterpretation
ISO date2025-01-15Exact date
ISO datetime2025-01-15T10:30:00ZExact datetime
Relativetoday, yesterday, tomorrowCurrent/previous/next day
Relativelast, this (with context)Previous/current period

Output (Strict): Always output ISO 8601

{
  "created_at": "2025-01-15T10:30:00Z",
  "due_date": "2025-02-15",
  "month": "2025-01"
}

Money

  • Store as decimal number, not cents
  • Include currency when ambiguous
  • Never format (no "$" or "," in JSON)
{
  "total": 1250.50,
  "currency": "USD"
}

IDs

  • Always strings (even if numeric)
  • Preserve exact format from source
{
  "id": "abc_123",
  "legacy_id": "12345"
}

Enums

  • UPPER_SNAKE_CASE in JSON
  • Case-insensitive input
# All equivalent
--status DRAFT
--status draft
--status Draft
{"status": "IN_PROGRESS"}

Filtering & Pagination

Common Filter Patterns

# By status
--status DRAFT
--status active,pending    # Multiple values

# By date range
--from 2025-01-01 --to 2025-01-31
--month 2025-01
--month last

# By related entity
--user "Alice"
--project "Project X"

# Text search
--search "keyword"
-q "keyword"

# Boolean filters
--archived
--no-archived
--include-deleted

Pagination

# Limit results
--limit 50
-n 50

# Offset-based
--page 2
--offset 20

# Cursor-based
--cursor "eyJpZCI6MTIzfQ=="
--after "item_123"

Implementation

See references/implementation.md for complete Python implementation templates including:

  • CLI skeleton with Typer
  • Client pattern with httpx
  • Error handling
  • Authentication flows
  • Testing patterns

Anti-Patterns

❌ Output Pollution

# BAD: Progress to stdout
$ bad-tool items list --json
Fetching items...
[{"id": "1"}]
Done!

# GOOD: Only JSON to stdout
$ good-tool items list --json
[{"id": "1"}]

❌ Interactive Prompts

# BAD: Prompts in non-interactive context
$ bad-tool items create
Enter name: _

# GOOD: Fail fast with required flags
$ good-tool items create
Error: --name is required

❌ Inconsistent Flags

# BAD: Different flags for same concept
$ tool1 list -j
$ tool2 list --format=json

# GOOD: Same flags everywhere
$ tool1 list --json
$ tool2 list --json

❌ Silent Failures

# BAD: Success exit code on failure
$ bad-tool items delete bad-id
Item not found
$ echo $?
0

# GOOD: Semantic exit code
$ good-tool items delete bad-id
Error: Item not found: bad-id
$ echo $?
3

Quick Reference

Must-Have Checklist

  • <tool> --version
  • <tool> --help with examples
  • <tool> <resource> list [--json]
  • <tool> <resource> get <id> [--json]
  • Semantic exit codes (0, 1, 2, 3, 4, 5, 6, 7)
  • Errors to stderr, data to stdout
  • Valid JSON on --json
  • Stream separation (stdout = data, stderr = UI)

Recommended Additions

  • Authentication commands (auth login, auth status, auth logout)
  • Create/Update/Delete operations
  • --quiet and --verbose modes
  • --dry-run for mutations
  • Pagination (--limit, --page)
  • Filtering (status, date range, search)
  • Automated tests

Framework Choice

Typer (preferred for new tools):

  • Type hints provide automatic validation
  • Built-in help generation
  • Rich integration for beautiful output
  • Less boilerplate than Click

Click (acceptable for existing tools):

  • Typer is built on Click (100% compatible)
  • Well-structured Click code doesn't need migration
  • Both must follow same output conventions
# Typer (preferred)
import typer
from rich.console import Console

app = typer.Typer()
console = Console(stderr=True)  # UI to stderr

# Click (acceptable)
import click
from rich.console import Console

console = Console(stderr=True)  # Same pattern

平台分布

Codex

35.21%
按下载量换算35

Claude

30.67%
按下载量换算30

Cursor

20.41%
按下载量换算20

Gemini CLI

9.21%
按下载量换算9

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

接触敏感数据

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

安装前确认

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

继续浏览同类 Skills