Code Search Skill for Openclaw

A high-performance toolkit for rapid codebase exploration using structured grep, glob, and directory tree visualization.

yanxingang
v1.0.0
Feb 26, 2026
0
2.4k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install code-search

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install code-search using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Code Search Skill?

The Code Search Skill is a robust developer tool designed to streamline repository navigation and discovery within Openclaw Skills. By integrating industry-standard utilities like ripgrep and fd, it provides AI agents and developers with the ability to perform deep content searches, locate files by pattern, and visualize directory structures instantly.

This skill is essential for understanding complex architectures, finding specific function definitions, or auditing configuration files across large-scale projects without manual browsing. It prioritizes speed and precision, ensuring that even the largest repositories remain searchable and accessible for automated workflows.

Code Search Skill Use Cases

  • Locating specific function, class, or variable definitions across multiple files.
  • Finding files using complex naming patterns or specific extensions.
  • Visualizing project directory hierarchies to understand architectural layout.
  • Auditing codebases for specific imports, error messages, or TODO markers.
  • Quick exploration of unfamiliar or legacy codebases during onboarding or debugging.

How Code Search Skill Works

  1. The user or agent triggers the search script with a specific command like grep, glob, or tree through the Openclaw Skills interface.
  2. The skill invokes underlying high-performance CLI tools such as ripgrep for text patterns or fd for filename matching.
  3. Results are filtered according to user-defined parameters like file type, max results, and context depth.
  4. The system automatically excludes ignored directories like .git or node_modules and respects .gitignore rules to ensure relevance.
  5. A structured output is returned with clear delimiters, making it easy for AI agents or human developers to process the findings.

Code Search Skill Setup

First, verify that all necessary dependencies are installed by running the built-in dependency check command:

bash /root/.openclaw/workspace/skills/code-search/scripts/search.sh check

Ensure that your environment has the required binaries (ripgrep, fd, and tree) accessible for Openclaw Skills to function correctly. All commands are executed via the primary search.sh entry point.

Code Search Skill Data Schema & Taxonomy

The Code Search Skill generates structured text output for reliable parsing and clear visibility. It organizes data using the following taxonomy:

Component Description Identifier
Results Header Identifies the command type [SEARCH RESULTS: grep/glob]
Structure Header Identifies directory maps [DIRECTORY TREE]
Termination Signals the end of data [END RESULTS/TREE]
Truncation Indicates result limits reached [TRUNCATED: ...]
Error Reporting Highlights failures [ERROR] ...

All results from grep and glob are sorted by modification time, presenting the newest files first to prioritize recent development context.

Code Search Skill Advanced Features

  • Multi-Mode Content Search: Switch between regex-based grep and literal text matching for precise discovery.
  • Contextual Analysis: Retrieve surrounding lines of code (context lines) to understand the logic flow surrounding a match.
  • Intelligent File Filtering: Built-in support for filtering searches by specific language extensions like Go, Python, or TypeScript.
  • Depth Control: Customize directory tree visualizations with specific depth parameters to manage information density.
  • Automated Exclusions: Native ignoring of build artifacts, caches, and vendor directories to keep search results clean and relevant.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*