smart-grep-extended

Search codebases with ripgrep and return token-budgeted path and line matches.

Updated Nov 23, 2025
One-click install
npx skills add https://github.com/ak-eyther/model-project --skill smart-grep-extended
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: smart-grep-extended
Source: https://github.com/ak-eyther/model-project/tree/main/codex/skills/smart-grep
Command: npx skills add https://github.com/ak-eyther/model-project --skill smart-grep-extended

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

It replaces noisy, token-heavy search workflows with a compact ripgrep-based approach that surfaces only the most relevant matches, helping you inspect large codebases without flooding context.

Core Features & Use Cases

  • Token-efficient search: Uses structured rg --json output plus truncation and budgeting to keep results small and useful.
  • Targeted code discovery: Helps you find functions, classes, imports, TODOs, and other patterns across Python, JavaScript, TypeScript, and similar source files.
  • Practical workflow: First locate the exact file or symbol with smart search, then open only the most relevant file for deeper inspection.
  • Use case: When you need to understand where authentication is handled in a large repository, this Skill narrows the search to the few lines that matter instead of returning broad grep output.

Quick Start

Use the smart-grep skill to search the repository for the pattern you care about and return only concise, token-budgeted matches.

Frequently Asked Questions about smart-grep-extended

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I search a large codebase without wasting context tokens?

Code search without wasting tokens uses ripgrep's JSON output, line truncation, and configurable token budgeting to return only concise path and line-number matches. This prevents broad grep output from flooding your context window with irrelevant data.

Can I find functions, classes, and TODOs across a repository efficiently?

Finding functions, classes, imports, and TODOs across a repository is the primary use case. The search targets source files like Python, JavaScript, and TypeScript, narrowing results to the few relevant lines instead of returning noisy full-file matches.

What's the best way to locate where authentication is handled in a large codebase?

The best way to locate authentication logic in a large codebase is using a targeted search that narrows results to concise, token-budgeted matches. This surfaces only the relevant lines and paths, allowing you to open only the most relevant file for deeper inspection.

Does this repository scanning approach work with Python and JavaScript source files?

Yes, repository scanning works with Python, JavaScript, TypeScript, and similar source files. It applies token budgeting and line truncation to structured search output, ensuring concise results across these different language ecosystems.

How does token budgeting keep code search results concise?

Token budgeting keeps code search results concise by applying limits to structured ripgrep JSON output and truncating long lines. This ensures that only the most relevant path and line-number matches are returned within configurable token constraints.

When should I avoid using a token-budgeted grep for repository scanning?

You should avoid token-budgeted grep when you need to inspect the full context of a file or require untruncated lines for analysis. It is designed for locating symbols and patterns first, followed by opening specific files for deeper inspection.