find-before-build
Search for the existing implementation before writing a new one: name the searches you ran for an existing helper, abstraction, or pattern and what they returned, before introducing anything new. Use before adding a utility, wrapper, config knob, or dependency to a codebase you did not write end-to-end.
- License 许可
- MIT
- 最近更新
- 2026-11-12
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- find-before-build
- license
- MIT
- description
- Search for the existing implementation before writing a new one: name the searches you ran for an existing helper, abstraction, or pattern and what they returned, before introducing anything new. Use before adding a utility, wrapper, config knob, or dependency to a codebase you did not write end-to-end.
- compatibility
- PORTABILITY: pure search-then-cite discipline — no hooks, no subagent-spawning tool, no Workflow tool, no harness-specific primitive. The searches are whatever the harness already offers (grep, glob, code search); the receipt is prose. Ports to any harness that can search a codebase and report what it found.
03 SKILL.md 正文
find-before-build
Invariant
A new abstraction (helper, wrapper, utility, dependency) is ALWAYS preceded by named searches for an existing equivalent with their results shown — and NEVER introduced when an existing equivalent was found and usable.
Not this
-
codebase-design (
plugins/codebase-design) governs how to design a new interface well once one is warranted — candidates, depth, seam placement. find-before-build is the gate before that: whether a new interface should exist at all. Run this first; only a search that comes back empty (or unusable) hands off to codebase-design. -
verify-before-claim (
plugins/verify-before-claim) is the general claims discipline. The search receipt here is one specific claim shape — "no existing equivalent exists" — made checkable the same way: by attaching the literal evidence. This skill exists because that particular claim is usually never stated, so it's never checked; find-before-build forces it into the open.
When to use this
The moment you're about to introduce something new to a codebase you didn't write end-to-end: a helper function, a formatting/parsing/retry utility, a wrapper around an API, a config option, a test fixture, a dependency in the manifest. Trigger phrases: "add a helper", "write a util", "we need a wrapper", "add a package", and — most importantly — your own impulse to start typing a function you haven't looked for.
The gate
-
Name what you're about to build, in one line, in the codebase's own vocabulary — the thing's purpose, not your working title for it ("retries an HTTP call with backoff", not "myFetchHelper").
-
Run at least two searches from different angles before writing it: by likely name (grep for
retry,backoff), by mechanism (call sites of the API being wrapped, imports of a likely module), by convention (the project'sutils/,lib/,helpers/layout, the dependency manifest for an already-installed package that does this). One search that comes back empty is not looking; it's one guessed keyword failing. -
Show the receipt. Before the new code, state the searches verbatim and what each returned: "Searched
rg 'backoff|retry' src/— 3 hits, all test mocks; checkedpackage.json— no retry package installed." The receipt appears wherever the work is reported (the PR description, the summary, the commit body). -
Decide by the receipt. Found and usable → use it, extend it, or fix it in place; do not write the parallel version. Found but genuinely unusable → say why (wrong layer, deprecated, semantics differ) — that sentence is part of the receipt. Nothing found → build, and hand the design to codebase-design if it meets that skill's bar.
"Usable" means it does the job with at-most-local changes. Preference, style, or not-invented-here is not unusability — if the existing one is ugly but correct, use it and record the cleanup wish as a finding, not a rewrite.
Failure modes this exists to stop
- The codebase's fourth date-formatting helper, three directories from the first.
- A new dependency added while an installed one already covers the need.
- One token grep coming back empty and standing in for a real search.
- "Found it, but mine is cleaner" — a parallel implementation shipped next to a working existing one.
04 同仓库更多 Skills
wayfinder
Chart a multi-session effort as a labeled map of typed decision tickets (grilling / prototype / research / task) with explicit dependencies and an open frontier agents self-assign into. Plans; never executes. Use this skill whenever the user is working with wayfinder, and on phrases like "chart this effort", "break this into tickets", "what's the frontier", "plan across sessions", or "map out the dependencies for this work".
wave-research
Staged, adversarial research that tries to break a thesis before believing it: waves, checkpoints, falsifiable sub-claims, rival hypotheses, an ACH matrix, source-incentive tags and a verified final thesis. Also carries Workflow templates for a one-pass research-and-verify fan-out. Use to stress-test or vet a contested claim; not for quick lookups.
second-opinion
Offer-only validation pipeline for a verdict or recommendation. Use when the user asks to validate, verify, fact-check, or get a second opinion on a claim or recommendation — "are you sure", "double-check this", "second opinion". Batches fact-checking against sources, adds scoped advisor personas for the angles that need judgment, then re-emits the response grouped into verified, flagged, and conflict, with a mandatory validation delta. Requires a subagent-spawning tool; without one it must decline rather than simulate.
machine-voice
Compression rules for standalone machine-read artifacts the reader scans — agent traces, tool-call logs, status lines, progress updates, handoff notes, state dumps, config, schemas, reference cards, and structured data another agent parses. Applies three layers: lexical compression, markdown structure as navigation, and emojis as typed status markers. Reach for it when emitting one of those artifacts on its own. Companion to human-voice, which governs prose a human reads and also owns any table or block that serves surrounding explanation. Neither skill applies to code or file contents the user will save, commit messages, creative writing, or turns that are only a clarifying question — those ship unstyled and uncompressed.
human-voice
Style for prose a human reads — answers, recommendations, explanations, research summaries, comparisons. Use on every conversational reply that contains prose for a person to read: triage intent, lead with the verdict, keep it scannable, tag claim confidence. Reach for it whenever answering a technical question, comparing options, or making a recommendation, even when the user says nothing about style. Companion to machine-voice, which instead governs standalone machine-read artifacts — agent traces, tool-call logs, status lines, progress updates, handoff notes, state dumps, config, schemas, reference cards, and structured data another agent parses. Neither skill applies to code or file contents, commit messages, creative writing, or turns that are only a clarifying question — those ship unstyled.
ai-writing-mistakes
Catch and repair the tells that mark prose as machine-written — the negation-flip ("it's not X, it's Y"), rule-of-three padding, hedge stacking, unearned intensifiers, filler verbs like delve and leverage, participle trailers ("...ensuring seamless integration"), sycophantic openers, empty closing summaries, and uniform em-dash/sentence rhythm. Use when drafting or revising any prose a human will read, including documents you were asked to author — READMEs, docs, PR bodies, release notes, emails — and when the user asks whether something "sounds like AI" or wants writing tightened. This is a wording pass, not a voice: human-voice still decides layout and confidence tags, machine-voice still owns traces and logs, and neither this skill nor those two touch code, commit messages, or quoted text.