Search No native equivalent

list_patterns

Returns the full list of built-in pattern names with descriptions. Trivial token cost (~226 tokens).

What It Does

list_patterns returns the complete list of built-in pattern names that search_patterns supports, along with a short description of each. It costs approximately 226 tokens, making it one of the cheapest calls in the entire toolset.

When to Use

Call list_patterns at the start of a code audit session when you do not remember the exact pattern names. Rather than guessing whether the pattern is called empty-catch or empty-catches or swallowed-errors, one call gives you the authoritative list.

It is also useful when building a codebase_retrieval batch query that includes pattern searches. Knowing the exact names prevents wasted calls with misspelled pattern identifiers.

Output Format

The response is a simple list:

Available patterns:
- empty-catch: Catch blocks with no error handling
- any-type: TypeScript `any` usage
- console-log: Console statements in production code
- await-in-loop: Sequential await inside loops
- todo-fixme: TODO/FIXME/HACK comments
- large-function: Functions exceeding line thresholds
- deep-nesting: Excessive control flow nesting
- magic-number: Unnamed numeric literals
- scaffolding: Leftover scaffolding and boilerplate

Cost Consideration

At ~226 tokens, this call is essentially free. There is no reason to guess pattern names when you can retrieve the list for less than the cost of a single grep result line.

Related tools

Benchmark note

This benchmark compares CodeSift against the closest practical native workflow an agent would use for the same task. For some tools, that baseline is a direct shell equivalent such as rg or find. For AST-aware, graph-aware, and LSP-backed tools, the baseline is a multi-step workflow rather than a strictly identical command. Results should be read as agent-workflow comparisons: token cost, call count, and practical context efficiency.