Code Search Skill for Openclaw

A high-performance search toolkit for exploring codebases via structured content grep, filename globbing, and directory tree visualization.

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

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install openclaw-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 openclaw-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 professional-grade toolkit designed for the Openclaw Skills environment, providing AI agents and developers with rapid access to repository insights. It leverages the raw speed of ripgrep and fd to perform exhaustive searches across large codebases while maintaining low latency and high accuracy.

By integrating this skill, users can seamlessly navigate complex project structures, locate specific logic implementations, and audit configurations without leaving their terminal or agent interface. It is built to handle modern development workflows by automatically respecting version control ignore rules and filtering out unnecessary build artifacts.

Code Search Skill Use Cases

  • Finding function, class, or variable definitions and their usages across multiple files.
  • Searching for specific configuration strings, API keys, or imports within a project.
  • Identifying files by name or extension patterns (e.g., finding all test files or yaml configs).
  • Visualizing the directory hierarchy to understand the architecture of unfamiliar repositories.
  • Auditing codebases for TODOs, error messages, or specific architectural patterns.

How Code Search Skill Works

  1. The skill acts as a structured wrapper around high-performance CLI tools like ripgrep, fd, and tree.
  2. When a command is issued, it executes the search within the specified directory path, defaulting to the current working directory.
  3. The engine automatically filters out noise by ignoring .git, node_modules, and other common build directories, while also respecting .gitignore rules.
  4. Search results for content and files are sorted by modification time, ensuring the most recent and relevant data appears first.
  5. The output is wrapped in clear, parseable delimiters, making it easy for the Openclaw Skills platform to interpret the results.

Code Search Skill Setup

Before using the skill, verify that all system dependencies are correctly installed by running the dependency check script:

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

Once verified, you can search file contents using the grep command:

bash /root/.openclaw/workspace/skills/code-search/scripts/search.sh grep "your_pattern" --path /your/project/path

Code Search Skill Data Schema & Taxonomy

The skill returns structured text blocks that categorize findings based on the search type. Below is the metadata taxonomy used by this skill within the Openclaw Skills ecosystem:

Output Block Description Key Metadata
[SEARCH RESULTS: grep] Content matches File path, line number, match context
[SEARCH RESULTS: glob] Filename matches Absolute or relative file paths
[DIRECTORY TREE] Structure map Directory hierarchy, file nesting, optional file sizes
[TRUNCATED] Limit indicator Notification when results exceed the max limit

Code Search Skill Advanced Features

  • Multi-type filtering: Narrow down grep or glob searches by specific file extensions like .go, .py, or .ts.
  • Contextual Awareness: Grep searches can include N lines of code surrounding a match to provide better context for the agent.
  • Literal Search Mode: Bypass regex interpretation using the --literal flag to search for exact strings containing special characters.
  • Depth-Controlled Visualization: The tree command supports custom depth levels to prevent information overload in deep directory structures.
  • Automated Noise Reduction: Native exclusion of pycache, vendor directories, and build artifacts to focus purely on source code.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*