discovery

Grep the repository to identify related code and write a discovery.md handoff plan.

3|1|Updated Feb 10, 2026
One-click install
npx skills add https://github.com/deandum/claude-resources --skill discovery-deandum
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: discovery
Source: https://github.com/deandum/claude-resources/tree/main/skills/core/discovery
Command: npx skills add https://github.com/deandum/claude-resources --skill discovery-deandum

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Ground a task in the existing codebase before specification to validate assumptions against prior art.

Core Features & Use Cases

  • Scope the search by extracting key terms from the task and building a short list of search terms.
  • Grep for prior art by scanning files that implement related features, citing hits with paths and lines.
  • Read similar features to extract conventions, dependencies, and tests, then surface inherited learnings.
  • Write discovery.md with sections for Existing Surface, Patterns to Follow, Inherited Gotchas, and Handoff to main Claude.

Quick Start

Ground the task in the codebase before drafting a spec.

Frequently Asked Questions about discovery

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I ground a new feature task in an existing codebase before writing a spec?

Ground a task in the existing codebase by extracting key terms, grepping for prior art, and reading similar features to surface inherited patterns. This validates assumptions against existing code before specification, producing a discovery.md artifact with references and a handoff plan.

What is codebase discovery and when do I need it before drafting specifications?

Codebase discovery is the process of scanning a repository to identify related code, conventions, and inherited gotchas before drafting specifications. You need it at the start of a task to validate assumptions against prior art and avoid duplicating existing patterns.

How do I find prior art and inherited gotchas in a repository before starting a new task?

Find prior art and gotchas by grepping the repository for key terms extracted from your task, then reading files that implement similar features. This surfaces existing patterns, dependencies, tests, and inherited learnings to document before proceeding.

Can I use grep to extract codebase patterns and conventions before writing a specification?

Yes, grep is used to scan files that implement related features and cite hits with paths and lines. Reading these similar features extracts conventions, dependencies, and tests, which are then documented as patterns to follow in the discovery output.

What's the best way to document existing code surface and patterns before handing off to a spec?

Document existing code surface and patterns by writing a discovery.md file containing sections for Existing Surface, Patterns to Follow, Inherited Gotchas, and Handoff. This artifact captures references, learnings, and a plan for the specification phase.

Why should I validate assumptions against prior art before drafting a software specification?

Validating assumptions against prior art prevents redundant work and unexpected conflicts by surfacing inherited gotchas and existing conventions early. Grounding the task in the codebase first ensures the specification accounts for established patterns and dependencies.