New to Claude Skills? Learn how to install them →

Cgoogle-gemini on GitHub

Code Explorer

OfficialFree

Navigate codebases to resolve issues efficiently.

Get this skill

Free · Opens the source repo

What Code Explorer does

Code Explorer is a skill designed to assist developers in navigating complex code repositories effectively. It provides a structured approach to exploring the codebase, ensuring that developers can locate primary source files, UI components, and relevant test files related to bug reports or feature requests. By following a systematic exploration process, users can gain a comprehensive understanding of the repository structure, which is crucial for identifying the necessary changes across different packages.

The skill is divided into three phases, starting with root exploration and related area discovery. This phase emphasizes understanding the overall codebase structure, allowing developers to see beyond individual files and recognize how different components interact. By formulating an initial hypothesis based on the issue description, users can target their exploration more effectively.

In the second phase, directed code exploration and traversal, the skill guides users in tracing errors back to their source. This includes following data flow across package boundaries and examining all affected files. It encourages developers to focus on the underlying code rather than user-suggested workarounds, ensuring that the solutions are clean and maintainable.

Finally, the skill assists in evaluating the applicability of existing test patterns, guiding users to check for automated tests that may already exist in the codebase. If no relevant tests are found, it provides recommendations for manual verification. Overall, Code Explorer streamlines the debugging process by providing clear instructions and a methodical approach to code exploration, making it an invaluable tool for developers tackling complex issues.

When to use it

Use Code Explorer when you need to investigate issues in a codebase and want a structured method for exploring related files and components.

When not to use it

This skill may not be suitable for very small projects where file structures are simple, or for users who prefer more exploratory or ad-hoc methods of code navigation.

What you can build with it

Debugging a Complex Issue

When faced with a bug that spans multiple packages, use Code Explorer to trace the error back to its source and identify all affected files.

Implementing a New Feature

Before starting on a new feature, explore the codebase to understand existing components and how they may interact with your changes.

Verifying Test Coverage

Use the skill to check for existing tests related to a specific module, ensuring that your changes are covered by automated tests.

How to install Code Explorer

View source

1. Install with the skills CLI

npx skills add google-gemini/gemini-cli/code_explorer --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by google-gemini

Code Explorer Instructions

Explore the repository to find verified, existing file paths and technical context related to the reported issue.

Phase 1: Root Exploration & Related Area Discovery

  1. Understand Overall Codebase Structure: Before focusing on a single file, gain a high-level understanding of the repository structure (e.g. packages/cli, packages/core). This ensures you remain aware that a complete fix may require coordinating changes across other sibling packages. Never restrict your initial search to a single subfolder, as essential related files frequently reside in outside parent or sibling packages.
  2. Formulate an Initial Hypothesis: Before jumping to drafting a plan, analyze the issue title and body to form a high-level hypothesis about the issue domain and identify candidate directories across the codebase.

Phase 2: Directed Code Exploration & Traversal

  1. Error Tracing: If the issue body contains a stack trace, log, or file reference, start at that exact file. For code files, follow imports down to original definitions; for failing workflow steps, target the failing workflow/action file directly.
  2. Cross-Package & Side-Effect Traversal: IMPORTANT: Trace data flow across package boundaries (packages/cli <-> packages/core) and shared utilities to capture all affected caller/consumer files.
  3. Architectural Grounding: Ignore user-suggested workarounds in the issue description. Always investigate the underlying source code to derive a clean fix.

Phase 3: Test Applicability & Pattern Check

  1. Search Existing Test Patterns: Use find_file or list_directory in the target directory to check if automated unit/integration test files (e.g. *.test.ts or *.test.tsx) exist in that module.
  2. Evaluate Test Applicability / N/A: If an automated test does not logically apply or is not customary for the change (such as CI workflow YAML files or documentation updates), set test_file to "N/A" and provide manual or workflow verification steps.

Finally, review your suggested target files to ensure it is a minimal fix that does not touch unnecessary files.

Output Format:

Output a concise summary of the discovered file paths and technical context:

{
  "primary_source_files": ["path/to/source.ts"],
  "related_files": [],
  "test_file": "path/to/test.test.ts" | "N/A",
  "exploration_notes": "Brief explanation of discovered files and technical context."
}

Frequently asked questions about Code Explorer

Similar skills