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.
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.symbol, path, file, route, token, or configparse, normalize, discover, scan, format, rank, score, resolve, or validatebtn for button or cfg for configtruffler against the narrowest useful root first, then broaden if needed.truffler is installed in the target project:truffler "normalize path" src --kind function,method,constant,type --limit 20
truffler "score" src --kind function,method --format json --limit 15
truffler repository: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 if network/package execution is acceptable for the environment:bunx @rayhanadev/truffler "parse config" src --kind function,method,type --limit 20
truffler cannot be run, say so and fall back to the repository's available search tools. Still follow the same deduplication intent: search before implementing.truffler "<query>" <root> --kind function,method,constant,type,interface --limit 20
truffler "<query>" <root> --format json --limit 20
src/, try known library, package, app, or test roots.--kind and reduce the root rather than skimming unrelated output.I checked for existing symbols with `truffler` using queries like `normalize`, `path`, and `resolve`. The closest match was `normalizePath` in `src/files.ts`, so I reused that behavior instead of adding a separate helper.
I searched with `truffler` for `parse`, `config`, and `loadConfig` across `src/`; the matches were unrelated, so I added a new helper in the nearest module.