본문으로 건너뛰기
Skillpedia
일반 코딩6.2k · #14387

code-search

하는 일

이 스킬은 에이전트가 전체 파일을 읽는 대신 ripgrep과 Git으로 코드를 빠르게 검색하도록 돕습니다. 함수가 어디에 정의되거나 사용되는지 찾아야 하는 개발자를 위한 스킬입니다.

사용하는 경우

  • ✓함수, 클래스, 심볼이 어디에 정의되어 있는지 찾아야 할 때.
  • ✓프로젝트에서 어떤 이름이 쓰이는 모든 곳을 찾고 싶을 때.
  • ✓코드 줄이 언제, 왜 바뀌었는지 알아야 할 때.

스킬 링크

https://github.com/agentscope-ai/agentscope-java/blob/main/agentscope-examples/agents/agentscope-codingagent/src/main/resources/workspace-templates/skills/code-search/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/agentscope-ai/agentscope-java/blob/main/agentscope-examples/agents/agentscope-codingagent/src/main/resources/workspace-templates/skills/code-search/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“이 프로젝트에서 calculateTax 함수가 정의되거나 호출되는 모든 곳을 찾아 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

스킬은 정규 표현식 검색에 ripgrep을 쓰고, 파일 유형으로 걸러냅니다. Git 기록 명령으로 문자열이 언제 추가되었는지, 누가 줄을 바꿨는지 추적합니다. 검색 범위를 좁혀 출력을 짧게 유지합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 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 use glob.

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 -F to ripgrep.
  • Narrow scope with a path argument to keep output small (tool output is truncated).
자주 묻는 질문

ripgrep이 필요한가요?

네, 정규 표현식 검색에 ripgrep을 사용합니다.

Git 기록을 검색할 수 있나요?

네, 문자열이 언제 추가되거나 제거되었는지, 누가 줄을 바꿨는지 찾을 수 있습니다.

왜 파일 전체를 읽지 않나요?

목표를 좁힌 검색은 결과를 짧고 다루기 쉽게 유지합니다.

상세 정보

작성자의 원본 설명

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.

repo: agentscope-ai/agentscope-java

인기도

GitHub 스타
6.2k
순위
#14387
라이선스
Apache-2.0
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬