search-first

search-first is a skill for Claude Code from xiaobei930/cc-best. It costs 30 tokens per session (1,149 once invoked), scanned A, original, MIT.

A workflow for researching existing libraries, tools, and solutions before writing custom code.

In plain words
What is it for?
Use it when choosing a dependency, introducing a tool or framework, or solving an unfamiliar technical problem.
Why use it?
It reduces duplicated work and helps developers decide whether to adopt, extend, combine, or build a solution after checking its fit and maintenance.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the cc-best plugin — 19 skills, 44 commands, 8 agents, 20 hooks shipped together

Good fit Use it when choosing a dependency, introducing a tool or framework, or solving an unfamiliar technical problem.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/xiaobei930/cc-best/search-first
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add xiaobei930/cc-best --skill search-first
Clone the repo
git clone --depth 1 https://github.com/xiaobei930/cc-best

Made for: Claude Code.

Or install cc-best, the plugin that ships this one along with the rest of its 19 skills, 44 commands, 8 agents, 20 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for search-first

README.md
[![agentmods](https://agentmods.dev/badge/skills/xiaobei930/cc-best/search-first/github.svg)](https://agentmods.dev/skills/xiaobei930/cc-best/search-first)
Your own site
<a href="https://agentmods.dev/skills/xiaobei930/cc-best/search-first"><img src="https://agentmods.dev/badge/skills/xiaobei930/cc-best/search-first/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for search-first

Your own site · 80×15
<a href="https://agentmods.dev/skills/xiaobei930/cc-best/search-first"><img src="https://agentmods.dev/badge/skills/xiaobei930/cc-best/search-first.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 30 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,149 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00030 $0.01149
Opus 5.5 $0.00012 $0.00460
Sonnet 5.5 $0.00006 $0.00230
Haiku 4.5 $0.00003 $0.00115

Measured 1mo ago against content hash 672cde6449b4, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

search-first scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/search-first/SKILL.md · 120 lines

How it starts

The opening of the file, as written. The whole thing — 120 lines — stays where its author put it; the contents beside it link to each section on GitHub.

研究优先工作流

编码前系统化搜索现有方案,做出 Adopt/Extend/Compose/Build 决策。

核心原则:不重复造轮子,但也不盲目引入依赖。

触发条件 | Trigger Conditions

  • /cc-best:lead 技术方案设计阶段
  • 需要引入新库/工具/框架时
  • 遇到"需要 X 功能"的需求时
  • 解决不熟悉的技术问题时

搜索流程 | Search Process

1. 并行搜索(限时 5-10 分钟)
   ├─ 包管理器(npm/PyPI/Maven 等,根据项目技术栈)
   ├─ MCP 服务器(如适用)
   ├─ GitHub/社区方案
   └─ 官方文档/API 参考

2. 方案评估
   ├─ 功能匹配度
   ├─ 维护活跃度(最近提交、issue 响应)
   ├─ 许可证兼容性
   └─ 依赖复杂度

3. 决策 + 记录
   ├─ 输出 Adopt/Extend/Compose/Build 决策
   ├─ 记录到 progress.md 决策表
   └─ 标注置信度

评估矩阵 | Decision Matrix

条件 决策 行动
精确匹配 + 活跃维护 + 兼容许可 采用 (Adopt) 直接安装使用
部分匹配 + 良好基础 扩展 (Extend) 安装 + 薄包装器适配
多个弱匹配 组合 (Compose) 组合 2-3 个小包
无合适方案 构建 (Build) 自研,但带着搜索知识

评估检查清单

- [ ] 功能是否满足核心需求(≥80%)
- [ ] 最近 6 个月内有提交
- [ ] 许可证与项目兼容(MIT/Apache/ISC 优先)
- [ ] 依赖数量合理(<20 direct deps)
- [ ] 有测试覆盖和文档
- [ ] 无已知安全漏洞

与角色工作流的集成 | Pipeline Integration

在 /cc-best:lead 工作流中,技术栈选型前自动触发:

PM(需求) → Lead(search-first → 方案设计) → Dev(实现)

集成方式

  1. Lead 角色:技术方案设计时,对每个新依赖执行 search-first
  2. Dev 角色:遇到"需要引入新工具"时,暂停编码执行 search-first
  3. Architect agent:架构决策中自动引用 search-first 结果

搜索策略 | Search Strategy

按场景选择搜索深度

场景 搜索深度 时间上限
已知成熟方案 浅搜索 2 分钟
常见功能需求 标准搜索 5 分钟
创新/罕见需求 深度搜索 10 分钟

搜索来源优先级

  1. 项目已有依赖(检查 package.json/go.mod 等)
  2. 项目技术栈生态的官方推荐
  3. 包管理器搜索(npm search / pip search 等)
  4. GitHub trending + awesome-xxx 列表
  5. WebSearch 通用搜索

决策记录模板 | Decision Template

### 搜索决策: [功能描述]

**搜索范围**: [npm/GitHub/WebSearch]
**候选方案**:

1. [方案A] - [优劣概述]
2. [方案B] - [优劣概述]

**决策**: [Adopt/Extend/Compose/Build] [方案名]
**理由**: [1-2 句]
**置信度**: [高/中/低]

最佳实践 | Best Practices

  1. 搜索有时间上限 — 超时用 MVP 方案,标记 TBD
  2. 不是每个工具都要搜索 — 区分"已知成熟方案"和"新需求"
  3. 检查维护状态 — star 多但 3 年未更新的比新库风险更高
  4. 考虑退出成本 — 深度耦合的依赖要慎重选择
  5. 记录搜索过程 — 即使决定 Build,也记录为什么不 Adopt

Read the full file on GitHub · 120 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 120 lines · 30 tokens per session scan A 672cde6449b4

Subscribe to this mod's changes

search-first is a skill published in the GitHub repository xiaobei930/cc-best (48 stars, last pushed 4mo ago), licensed MIT. It adds 30 tokens to every session and 1,149 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

eval-hooks

Audit Claude Code and Codex hooks for validity, safety, and correctness across settings.json, hooks.json, config.toml, plugin, and skill or agent frontmatter hooks. Resolves each command, checks event names, handler types, matchers, exit-code and JSON decision strategy, and timeouts against each host's documented…

FlorianBruniaux/claude-code-ultimate-guide · 115 tokens

eval-skills

Audit a project or library of skills for metadata, trigger boundaries, workflow completion criteria, local resource closure, instruction economy, tool scope, effort, and routing evidence. Use before shipping skills, after importing a skill collection, or when a skill triggers too often or not at all.

FlorianBruniaux/claude-code-ultimate-guide · 60 tokens

source-command-audit-whitepapers

Audit version freshness, FR/EN parity, and metadata quality of all whitepapers and recap cards.

FlorianBruniaux/claude-code-ultimate-guide · 26 tokens

audit-agents-skills

Audit Claude Code agents, skills, and commands for quality and production readiness. Use when evaluating skill quality, checking production readiness scores, or comparing agents against best-practice templates.

FlorianBruniaux/claude-code-ultimate-guide · 41 tokens

eval-agents

Audit custom subagent definitions for Claude Code (.claude/agents/.md) and Codex (.codex/agents/.toml): loadability against the native schema, description overlap, model tier, tool scope, and headless-safe instructions. Use when onboarding to a project with agents, after adding or importing agents, or when the parent…

FlorianBruniaux/claude-code-ultimate-guide · 80 tokens

issue-triage

3-phase issue backlog management with audit, deep analysis, and validated triage actions. Use when triaging GitHub issues, sorting bug reports, cleaning up stale tickets, or detecting duplicate issues. Args: 'all' to analyze all, issue numbers to focus (e.g. '42 57'), 'en'/'fr' for language, no arg = audit only.

FlorianBruniaux/claude-code-ultimate-guide · 81 tokens