code-search
What it does
This skill helps an agent search code quickly with ripgrep and Git instead of reading whole files. It is for developers who need to find where a function is defined or used.
When to use it
- ✓When you need to find where a function, class or symbol is defined.
- ✓When you want every place a name is used in a project.
- ✓When you need to find out when or why a line of code changed.
Skill link
https://github.com/agentscope-ai/agentscope-java/blob/main/agentscope-examples/agents/agentscope-codingagent/src/main/resources/workspace-templates/skills/code-search/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Find every place the function calculateTax is defined or called in this project.”
5 new skills a week. 1 minute to read.
How it works
The skill uses ripgrep for regular-expression searches, filtered by file type, and uses Git history commands to trace when a string was added or who changed a line. It keeps results narrow so the output stays small.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Code Search
The built-in grep tool matches LITERAL text only. For real regular-expression search and
history-aware lookups, drive ripgrep and git through execute.
Ripgrep (regex)
- Symbol definition:
rg -n "fn\s+\w+\(" src/,rg -n --type java "class \w+Service". - Usages of a name:
rg -n "\bmyFunction\b". - Limit by file type:
rg -n --type ts "useEffect\(". - List files only:
rg -l "TODO"; find files by name:rg --files | rg <name>or useglob.
Git history search
- When a string was introduced/removed:
git log -S "<string>" --oneline. - Who/why a line changed:
git blame -L <start>,<end> <file>. - Search tracked files:
git grep -n "<regex>".
Tips
- Prefer a targeted regex over reading whole files when locating symbols or call sites.
- Escape regex metacharacters when you want a literal match, or pass
-Fto ripgrep. - Narrow scope with a path argument to keep output small (tool output is truncated).
FAQ
Does it need ripgrep?
Yes, the skill uses ripgrep for regular-expression searches.
Can it search Git history?
Yes, it can find when a string was added or removed and who changed a line.
Why not read whole files?
Targeted searches keep the results short and easier to work with.
Details
Original description by the author
Search a codebase efficiently with ripgrep regular expressions, file globs, and git history search. Use to locate symbols, usages, and definitions instead of reading whole files.
Popularity
- GitHub stars
- 6.2k
- Ranking position
- #14387
- License
- Apache-2.0
- Updated
- 11/2/2026
Comments
- …
More skills from this repository
agentscope-java
6.2kHelps your agent write non-blocking Java code for AgentScope, a multi-agent framework built on Project Reactor.
data-report
6.2kHelps your agent summarize a dataset into a report with averages, totals, ranges and trends, saved as a Markdown file.
data-transform
6.2kHelps your agent convert a data file between formats such as CSV and JSON, so the data can be used in other tools.
git-changelog
6.2kHelps your agent write a changelog or release notes from a Git history, grouped into features, fixes and other changes.
Similar skills
diffs
394kLets your agent produce a real, shareable diff of edits as a viewer link or image file, instead of a hand-written summary.
coding-agent
394kHelps your agent hand a larger coding job to Codex, Claude Code, or OpenCode as a background worker, then check on its progress.
gh-issues
394kHelps your agent find GitHub issues, pick the ones to work on, and open pull requests with fixes, including follow-up on review comments.