Back to list
krwhynot

discovery-first

by krwhynot

1🍴 0📅 Jan 21, 2026

SKILL.md


name: discovery-first description: Use pre-computed discovery files at .claude/state/ for codebase inventory questions. Triggers on component, hook, schema, form, type, inventory, what exists, list all, how many. Saves 90%+ tokens vs source scanning.

Discovery-First Skill

Purpose

ALWAYS read discovery files before scanning source code for inventory questions.

When This Triggers

  • "What components exist in contacts?"
  • "List all hooks in the codebase"
  • "What schemas are used for opportunities?"
  • "How many forms exist?"
  • "Which types are defined?"
  • "What calls useContactData?"

Discovery Files Location

Question TypeRead This First
Components.claude/state/component-inventory/{feature}.json
Hooks.claude/state/hooks-inventory.json
Schemas.claude/state/schemas-inventory/{feature}.json
Forms.claude/state/forms-inventory.json
Types.claude/state/types-inventory/{feature}.json
Call Graph.claude/state/call-graph-inventory/{feature}.json

Chunk Discovery Pattern

  1. Read manifest.json in the inventory directory first
  2. Find the chunk that contains the feature you need
  3. Read only that chunk (e.g., contacts.json)

Why This Matters

MethodToken CostSpeed
Discovery JSON~30KB< 2 sec
Source scanning~500KB5-15 sec
Savings94%5x faster

Required Behavior

  1. DO: Read .claude/state/ JSON files first
  2. DO: Use manifest.json to find the right chunk
  3. DON'T: Grep/Glob src/atomic-crm for inventory questions
  4. DON'T: Use Task/Explore agent for basic component/hook listing
  5. DON'T: Read individual source files when inventory answers the question

Example: Correct Approach

Question: "What hooks does ContactList use?"

Wrong approach:

Grep("use.*=", "src/atomic-crm/contacts/ContactList.tsx")
Read("src/atomic-crm/contacts/ContactList.tsx")

Correct approach:

Read(".claude/state/component-inventory/contacts.json")
→ Find ContactList entry → Read hooks array

Freshness

Discovery files are auto-regenerated on pre-commit via .husky/pre-commit. If data seems stale, run: just discover

Score

Total Score

50/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon