Code Search Skill

Search repository files with glob filtering and configurable context lines.

26|5|Updated Feb 19, 2026
One-click install
npx skills add https://github.com/kunwl123456/zeroclaw-skills-collection --skill code-search-skill
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Code Search Skill
Source: https://github.com/kunwl123456/zeroclaw-skills-collection/tree/main/code-search
Command: npx skills add https://github.com/kunwl123456/zeroclaw-skills-collection --skill code-search-skill

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill replaces complex and potentially unsafe command-line grep or find operations with a streamlined, context-aware code searching tool for agents.

Core Features & Use Cases

  • Smart Filtering: Automatically ignores common development directories like node_modules and .git.
  • Contextual Results: Displays lines surrounding a match to provide better understanding.
  • Safe Output: Limits results to prevent overwhelming the agent's context window.
  • Use Case: Quickly locate all instances of a specific function definition or a TODO comment across the entire codebase.

Quick Start

Search the repository for all occurrences of the text "initialize_user_session".

Frequently Asked Questions about Code Search Skill

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

FAQPage Schema
How do I search for code across a repository without using unsafe grep commands?

Code search safely across a repository by using this tool instead of command-line grep, which intelligently filters out directories like node_modules and .git to provide secure and efficient pattern matching for agents.

Can I see surrounding context lines when searching for a specific function definition in a codebase?

Yes, you can display configurable context lines surrounding a match when searching for function definitions. This contextual output provides better understanding of the code structure without needing to open the file separately.

What is the best way to find all TODO comments in a codebase without overwhelming the agent context window?

Finding TODO comments safely requires a search tool that limits output to prevent token overflow. This code search functionality restricts returned results, ensuring the agent's context window is not overwhelmed during repository searches.

Does this code search tool support glob pattern filtering for file inclusion?

Yes, this code search tool supports basic glob pattern filtering for file inclusion. You can narrow down repository searches to specific file types or naming conventions before applying pattern matching.

How do I prevent search results from including irrelevant development directories like node_modules?

To prevent search results from including irrelevant development directories, this code search tool automatically applies smart filtering. It safely excludes common folders like node_modules and .git from the repository search output by default.