find-similar-functions
Use truffler to find similar or pre-existing JavaScript/TypeScript symbols before implementing new code, especially helpers, utilities, parsers, formatters, scanners, fuzzy matchers, and other reusable functions. Agents should use this skill whenever they are about to add or refactor functionality in a JS/TS repository and need to avoid duplicating existing code, even if the user does not explicitly mention deduplication.
npx skills add millionco/react-doctor --skill find-similar-functions --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Similar Function Finder Use this skill before writing new JavaScript or TypeScript code that might overlap with existing helpers. The goal is to discover nearby functions, methods, constants, types, and interfaces early enough to reuse or extend them instead of creating duplicate behavior. `truffler` is a fuzzy symbol search tool. Treat it as a discovery layer: it points you to likely symbols, but you still need to inspect the code before deciding whether something is reusable. ## Workflow 1. State the behavior you are about to implement in a few words. 2. Derive 3-6 search queries from the intended behavior: - the proposed function or class name - domain nouns, such as `symbol`, `path`, `file`, `route`, `token`, or `config` - verbs, such as `parse`, `normalize`, `discover`, `scan`, `format`, `rank`, `score`, `resolve`, or `validate` - common abbreviations and synonyms, such as `btn` for `button` or `cfg` for `config` 3. Run `truffler` against the narrowest useful root first, then broaden if needed. 4. Inspect the top matches with normal code-reading tools before editing. 5. Prefer reusing, extending, or moving existing code when the behavior substantially matches. Create new cod
- Workflow
- Command Recipes
- Search Strategy
- Reuse Decision Guide
- Reporting Template
truffler "normalize path" src --kind function,method,constant,type --limit 20 truffler "score" src --kind function,method --format json --limit 15 bun src/cli.ts "discover file" src --kind function,method,constant,type --limit 20 bun src/cli.ts "format result" src --kind function,method --format json --limit 15 bunx @rayhanadev/truffler "parse config" src --kind function,method,type --limit 20 truffler "<query>" <root> --kind function,method,constant,type,interface --limit 20 truffler "<query>" <root> --format json --limit 20
What does the find-similar-functions skill do?
Use truffler to find similar or pre-existing JavaScript/TypeScript symbols before implementing new code, especially helpers, utilities, parsers, formatters, scanners, fuzzy matchers, and other reusable functions. Agents should use this skill whenever they are about to add or refactor functionality in a JS/TS repository and need to avoid duplicating existing code, even if the user does not explicitly mention deduplication.
How do I install it?
Run `npx skills add millionco/react-doctor --skill find-similar-functions --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From millionco/react-doctor, a repository with 14,264 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.