CommunityArte y diseñogithub.com

High-cla/multi-skilled-repository

AI Agent Skills 合集 — CMD+PowerShell 避坑指南 · CLI 优先决策矩阵 · 更多技能持续添加

Compatible con~Claude Code~Codex CLI~Cursor
npx skills add High-cla/multi-skilled-repository

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentación


name: cli-first-decision description: ALWAYS use BEFORE thinking, BEFORE any tool call, and BEFORE dispatching sub-agents. This is the FIRST skill to trigger for ANY task involving file operations, code changes, system commands, or when deciding between approaches (built-in tools, CLI utilities, skills, MCP servers, or sub-agents). Trigger on: any request that might need tools, any Windows/Linux command operations, any batch/PowerShell/shell scripting, any file search/replace/edit operations, or whenever you're about to think about how to accomplish something.

CLI-First Decision

Core Rule

任何任务开始前,按优先级决策:先触发 → 再思考 → 选工具 → 执行

  1. 强制触发: 收到 ANY 请求后,在开始思考之前、调用任何工具之前、派发子智能体之前,必须先触发此技能进行决策
  2. 思考优先: 先理解问题本质——明确需求、拆解步骤、判断范围。不要急着摸工具。
  3. 内置工具次之: 简单读/写/搜索一步直达 → 直接用 Read/Edit/Grep/Glob 等(零额外成本)
  4. CLI 工具再次: 批量/机械性操作 → 用对应的 CLI 工具(<1s,参考下方矩阵)
  5. 技能辅助: 需要领域专知的操作 → 先加载对应 skill 获取指导(参考可用技能列表)
  6. MCP 工具: 知识图谱查询、顺序推理、网页抓取等 → 用 MCP server 提供的工具
  7. 子智能体: 需要多步推理、语义理解、跨模块分析 → 派子智能体(sub-agent)
  8. 自行推理兜底: 架构决策、设计权衡、审查验证 → 亲自推理或咨询 Oracle

Decision Tree

收到请求(触发)
  └─ 识别类型:修复/实现/调研/评估/开放式?
       └─ 推理:先明确需求、拆解步骤、判断范围
       ├─ 简单读/写/改一个文件已知内容?───→ 内置工具 (Read/Edit/Write)
       ├─ 机械性批量操作?
       │   ├─ 批量文本替换?───────────→ git-sed / sd
       │   ├─ 文件查找?───────────────→ fd-find / glob
       │   ├─ 内容搜索?───────────────→ rg-search / grep
       │   ├─ AST 结构化操作?──────────→ ast-grep
       │   ├─ JSON/YAML/XML 查询?──────→ jq-query / yq
       │   └─ 其他机械操作?────────────→ 查下方矩阵
       ├─ 有对应领域 skill 可用?────────→ 先加载 skill 获取指导
       ├─ 有 MCP 工具可用?
       │   ├─ 知识图谱/代码关系查询?────→ codebase-memory-mcp
       │   ├─ 顺序推理/复杂分析?───────→ sequential-thinking
       │   └─ 网页内容获取?───────────→ fetch
       ├─ 需要语义理解/多步推理/跨模块?──→ 子智能体 (task/sub-agent)
       └─ 架构决策/设计权衡/审查?──────→ 自行推理或咨询 Oracle

Tool Decision Matrix

层级场景首选工具耗时代价
触发接收请求、识别类型、明确意图Intent Gate 分类即时
推理任务分析、需求拆解、步骤规划先思考,后选工具即时
内置简单文件读/写/编辑Read / Edit / Write即时
内置基础内容搜索grep<1s
内置文件模式匹配glob<1s
CLI批量文本替换(正则)git-sed<1s
CLI文件查找(按名称/类型/时间)fd-find<1s
CLI内容搜索+统计rg-search (ripgrep)<1s
CLIAST 代码搜索/替换(25 语言)ast-grep<1s
CLIJSON 查询/转换jq-query<1s
CLIHTTP API 测试git-curl<1s
CLI模糊过滤/缩小列表fzf-filter<1s
CLI打包/解压git-tar<1s
CLI换行符转换(CRLF/LF)git-dos2unix<1s
CLI文本查找替换(更简单语法)sd<1s
CLI代码统计(语言分布)tokei<1s
CLIXML/YAML/JSON 查询yq / xq<1s
技能领域专知操作(量化/前端/云等)加载对应 skill 获取指导见 skill 文档
MCP知识图谱/代码关系查询codebase-memory-mcp<5s
MCP顺序推理/多步分析sequential-thinking视步骤
MCP网页内容获取fetch<10s
子智能体多步推理、语义理解、跨模块分析task() 派子智能体数十秒+
自行推理架构决策、设计权衡、审查验证亲自处理或 Oracle视复杂度

Quick Tool Reference

工具典型命令用途
git-sedgit-sed expression:"s/old/new/g" files:["src/**/*.ts"] inPlace:""批量正则替换,跨文件编辑
fd-findfd-find pattern:"*.xml" extension:"xml" path:"./Characters"按名称/类型/大小/时间查找文件
rg-searchrg-search pattern:"somePattern" glob:"*.xml" context:2文件内容搜索,PCRE2 正则,上下文行
ast-grepast_grep_search pattern:"if($$$) { $$$ }" lang:"ts" / ast_grep_replace pattern:"console.log($MSG)" rewrite:"logger.info($MSG)" lang:"ts"AST 结构搜索/替换,理解代码语法树
jq-queryjq-query filter:".name" file:"data.json"JSON 数据查询、过滤、转换
git-curlgit-curl url:"https://api.example.com" method:"POST" data:'{"key":"val"}'HTTP API 请求,支持各种方法和自定义头
fzf-filterfzf-filter pattern:"keyword" input:$lines模糊过滤文本行,缩小列表
git-targit-tar action:"create" archive:"out.tar.gz" files:["src/"] compression:"gzip"创建/解压 tar/zip 归档
git-dos2unixgit-dos2unix file:"script.sh" mode:"dos2unix"转换 CRLF ↔ LF 换行符
grepgrep pattern:"somePattern" include:"*.xml" output_mode:"files_with_matches"基础内容搜索(内置)
globglob pattern:"**/*.xml"文件模式匹配(内置)
sdsd find:"old" replace:"new" files:["file.txt"]更简单的 find-replace,默认原地编辑,支持正则和字面量模式
tokeitokei path:"./"按语言统计代码行数、注释、空白行。秒级出结果
yqyq expression:".Missions.NestMission[]" file:"Missions.xml" xml:trueYAML/XML/JSON 结构化数据查询。XML 模式可直查 XML 文件(如列出所有任务 ID)

When to Use Sub-Agents (Sub-Agent Trigger Guide)

Sub-agents excel where CLI tools and built-in tools fall short:

场景说明推荐方式
语义理解判断代码逻辑是否正确、功能是否完整task() 派子智能体
跨模块集成多个模块的协调变更、接口对齐task() 派子智能体
多步操作需要先搜索→分析→再修改的连锁操作task() 派子智能体
代码生成/重构需要理解现有代码结构后生成新代码子智能体或自行推理
架构决策设计方案选择、权衡分析自行推理或 Oracle
验证与审查理解代码意图、做质量判断自行推理或 review-work

注意: 即使最终决定用子智能体,在 task() prompt 中也可以引用 CLI 工具——子智能体内部同样可以调用这些工具完成任务。

Common Mistakes

  1. 跳过 CLI 检查直接 task():习惯性派子代理做批量替换,浪费数万 token。30s 的代理工作可能 <1s 的 CLI 命令就能完成。

  2. 用 ripgrep 找到文件后手动修改:先 rg 搜索定位,再用 CLI 批量编辑要两步合一步。用 git-sed 一条命令完成搜索+替换。

  3. 在单个文件上调用代理:修改一个文件中的已知内容直接编辑即可,不需要启动完整的子代理会话。

  4. 该用子智能体时却用 CLI 工具硬扛:CLI 工具不懂语义。涉及跨模块分析、多步推理、理解代码意图的场景,用 CLI 组合拳不如一个子智能体高效。示例:需要"找到所有调用了 X 函数的文件,分析其参数模式,然后统一重构"——这是子智能体的领域,不是 sed 能搞定的。

  5. sd 默认原地编辑,先 --preview 再执行:sd 和 sed 表现不同——sd 默认直接修改文件。实测 sd '<?xml' '<?XML' filelist.xml 直接改写了所有 <?xml 标签(63处),只能 git checkout 恢复。安全步骤: 先用 sd --preview 'find' 'replace' file 查看影响范围,确认无误后再执行(不加 --preview)。

  6. yq XML 模式 yq v3 用 --xml,v4 换成 -p xml:yq v4 移除了 --xml 短参数,改用 -p xml。默认输出格式警告可通过 -o yaml 抑制。

Skills relacionados

DjFikie25/shipkit

Build full-stack Next.js and React Native apps with integrated auth, database, AI chat, and testing in a production-ready starter kit.

community

omiron33/clawarr-suite

🎬 Unified deep-integration control for self-hosted media stacks (Sonarr, Radarr, Prowlarr, Plex, Tautulli, and 10+ more). An OpenClaw agent skill.

community

wondelai/software-design-philosophy

Manage software complexity through deep modules, information hiding, and strategic programming. Use when the user mentions "module design", "API too complex", "shallow class", "complexity budget", "strategic vs tactical", "deep module", "information leakage", or "pass-through method". Also trigger when reviewing interface designs for simplicity, evaluating whether an abstraction is pulling its weight, or choosing between general-purpose and special-purpose approaches. Covers deep vs shallow modules, red flags for complexity, and comments as design documentation. For code quality, see clean-code. For boundaries, see clean-architecture.

community

skfaysal/claude-code-personal-assistant

A personal assistant built on Claude Code, using custom system prompts and Skills to handle knowledge-work tasks — researching topics, generating LinkedIn posts, creating slide decks, and more. Each capability is a modular, self-contained skill that Claude invokes automatically, tuned to my own voice and workflow.

community

ilsantino/iago-os

a modular, multi-tenant agentic operating system that orchestrates specialized AI agents, tools, and workflows within option to create isolated client environments to automate, build, and scale end-to-end business processes

community

wondelai/ddia-systems

Design data systems by understanding storage engines, replication, partitioning, transactions, and consistency models. Use when the user mentions "database choice", "replication lag", "partitioning strategy", "consistency vs availability", "stream processing", "ACID transactions", "eventual consistency", or "LSM tree vs B-tree". Also trigger when choosing between SQL and NoSQL, designing data pipelines, or debugging distributed system consistency issues. Covers data models, batch/stream processing, and distributed consensus. For system design, see system-design. For resilience, see release-it.

community