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

smart-explore

하는 일

코드의 특정 부분을 전체 파일을 읽지 않고도 찾아 이해하도록 돕습니다. 코드의 '지도'를 만들어 줍니다.

사용하는 경우

  • ✓큰 코드에서 특정 함수나 부분을 찾고 싶을 때.
  • ✓코드 파일의 구조를 이해해야 할 때.
  • ✓모든 것을 읽지 않고 프로그래밍 프로젝트를 빠르게 살펴보고 싶을 때.

스킬 링크

https://github.com/thedotmack/claude-mem/blob/main/plugin/skills/smart-explore/SKILL.md

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

사용 방법

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

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

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

AI에게 요청하는 예시

“'./src' 디렉터리에서 'login'과 관련된 모든 함수를 찾아 주세요.”

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

작동 방식

먼저 코드의 구조를 분석해 색인을 만듭니다. 그다음 특정 부분이나 파일의 구조를 보여 달라고 요청할 수 있습니다. 시간과 처리 자원을 아껴 줍니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Smart Explore

Structural code exploration using AST parsing. This skill overrides your default exploration behavior. While this skill is active, use smart_search/smart_outline/smart_unfold as your primary tools instead of Read, Grep, and Glob.

Core principle: Index first, fetch on demand. Give yourself a map of the code before loading implementation details. The question before every file read should be: "do I need to see all of this, or can I get a structural overview first?" The answer is almost always: get the map.

Your Next Tool Call

This skill only loads instructions. You must call the MCP tools yourself. Your next action should be one of:

smart_search(query="<topic>", path="./src")    -- discover files + symbols across a directory
smart_outline(file_path="<file>")              -- structural skeleton of one file
smart_unfold(file_path="<file>", symbol_name="<name>")  -- full source of one symbol

Do NOT run Grep, Glob, Read, or find to discover files first. smart_search walks directories, parses all code files, and returns ranked symbols in one call. It replaces the Glob → Grep → Read discovery cycle.

3-Layer Workflow

Step 1: Search -- Discover Files and Symbols

smart_search(query="shutdown", path="./src", max_results=15)

Returns: Ranked symbols with signatures, line numbers, match reasons, plus folded file views (~2-6k tokens)

-- Matching Symbols --
  function performGracefulShutdown (services/infrastructure/GracefulShutdown.ts:56)
  function httpShutdown (services/infrastructure/HealthMonitor.ts:92)
  method WorkerService.shutdown (services/worker-service.ts:846)

-- Folded File Views --
  services/infrastructure/GracefulShutdown.ts (7 symbols)
  services/worker-service.ts (12 symbols)

This is your discovery tool. It finds relevant files AND shows their structure. No Glob/find pre-scan needed.

Parameters:

  • query (string, required) -- What to search for (function name, concept, class name)
  • path (string) -- Root directory to search (defaults to cwd)
  • max_results (number) -- Max matching symbols, default 20, max 50
  • file_pattern (string, optional) -- Filter to specific files/paths

Step 2: Outline -- Get File Structure

smart_outline(file_path="services/worker-service.ts")

Returns: Complete structural skeleton -- all functions, classes, methods, properties, imports (~1-2k tokens per file)

Skip this step when Step 1's folded file views already provide enough structure. Most useful for files not covered by the search results.

Parameters:

  • file_path (string, required) -- Path to the file

Step 3: Unfold -- See Implementation

Review symbols from Steps 1-2. Pick the ones you need. Unfold only those:

smart_unfold(file_path="services/worker-service.ts", symbol_name="shutdown")

Returns: Full source code of the specified symbol including JSDoc, decorators, and complete implementation (~400-2,100 tokens depending on symbol size). AST node boundaries guarantee completeness regardless of symbol size — unlike Read + agent summarization, which may truncate long methods.

Parameters:

  • file_path (string, required) -- Path to the file (as returned by search/outline)
  • symbol_name (string, required) -- Name of the function/class/method to expand

When to Use Standard Tools Instead

Use these only when smart_* tools are the wrong fit:

  • Grep: Exact string/regex search ("find all TODO comments", "where is ensureWorkerStarted defined?")
  • Read: Small files under ~100 lines, non-code files (JSON, markdown, config)
  • Glob: File path patterns ("find all test files")
  • Explore agent: When you need synthesized understanding across 6+ files, architecture narratives, or answers to open-ended questions like "how does this entire system work end-to-end?" Smart-explore is a scalpel — it answers "where is this?" and "show me that." It doesn't synthesize cross-file data flows, design decisions, or edge cases across an entire feature.

For code files over ~100 lines, prefer smart_outline + smart_unfold over Read.

Workflow Examples

Discover how a feature works (cross-cutting):

1. smart_search(query="shutdown", path="./src")
   -> 14 symbols across 7 files, full picture in one call
2. smart_unfold(file_path="services/infrastructure/GracefulShutdown.ts", symbol_name="performGracefulShutdown")
   -> See the core implementation

Navigate a large file:


…
자주 묻는 질문

'smart_search', 'smart_outline', 'smart_unfold'의 차이는 무엇인가요?

'smart_search'는 프로젝트 전체에서 파일과 코드 부분을 찾습니다. 'smart_outline'은 특정 파일의 구조를 보여 줍니다. 'smart_unfold'는 찾은 특정 부분의 전체 코드를 보여 줍니다.

'Read'나 'Grep' 같은 일반 도구는 언제 사용해야 하나요?

작은 파일(100줄 미만), JSON이나 텍스트 같은 코드가 아닌 파일, 또는 정확한 텍스트나 패턴 검색이 필요할 때 일반 도구를 사용하세요.

전체 파일을 읽는 대신 이것을 사용하는 이유는 무엇인가요?

큰 파일 전체를 읽으면 자원을 많이 씁니다. 이 도구들은 색인을 만들고 필요한 부분만 보여 주므로, 코드 구조를 이해하는 데 훨씬 빠르고 효율적입니다.

상세 정보

작성자의 원본 설명

Token-optimized structural code search using tree-sitter AST parsing. Use instead of reading full files when you need to understand code structure, find functions, or explore a codebase efficiently.

repo: thedotmack/claude-mem

인기도

GitHub 스타
101k
순위
#1279
라이선스
Apache-2.0
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

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

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬