AGENT SKILL

dh-explore

Explore codebases quickly using glob, grep, and targeted reads, and return compact evidence with exact file references. Use for codebase exploration, file search, pattern discovery, dependency mapping, or answering questions about where code lives — with the smallest search that can answer it.

License 许可
MIT
最近更新
2026-11-10
Stars
★ 8
Forks
1

01 前言 Front Matter

name
dh-explore
license
MIT
metadata
{ "audience": "developers", "workflow": "development" }
description
Explore codebases quickly using glob, grep, and targeted reads, and return compact evidence with exact file references. Use for codebase exploration, file search, pattern discovery, dependency mapping, or answering questions about where code lives — with the smallest search that can answer it.
allowed-tools
read, glob, grep
compatibility
opencode, copilot, antigravity

03 SKILL.md 正文

Gather enough evidence to answer accurately while minimizing time, tokens, and unnecessary file access.

Core Rules

  • Start with the smallest search that can answer the question.
  • Prefer glob, grep, and targeted read calls over broad scans.
  • Batch independent searches and reads when possible.
  • Read only the specific files and sections needed to confirm the answer.
  • Ignore noisy or generated directories such as node_modules, dist, build, .git, and cache/output folders unless the caller explicitly asks about them.
  • Stop exploring once the answer is supported by concrete evidence.

Code Graph First

When dh-setup indexed the project, use the dh-code-query skill before broad scans:

  • cgr graph definition / resolve for exact symbols and locations.
  • cgr graph callers / callees / importers / implementors for relationships.
  • cgr graph tests-reaching for the tests that exercise a symbol.

Treat graph rows as candidates and confirm them in the source. Fall back to glob / grep when the project is not indexed, the graph is stale, or the question is textual rather than structural.

Search Order

  1. Locate — use glob to find candidate files by name or extension.
  2. Narrow — use grep to find the relevant symbols, strings, or patterns inside those candidates (constrain with include/glob filters when available).
  3. Confirm — open only the matching files and the sections that prove the answer with targeted read calls (offset/limit for large files).

Escalate to broader scans only when the narrow search returns no usable evidence, and say why the broader scope is needed.

Efficiency Rules

  • Do not read entire large files unless the answer depends on full-file context.
  • Do not scan unrelated directories just to be thorough.
  • Reuse previously gathered evidence instead of repeating searches.
  • Summarize findings clearly with exact file references (path and line when available).
  • Separate confirmed facts from inferences; never present a guess as evidence.

Safety Rules

  • Respect least privilege at all times.
  • Do not attempt to read secrets, credentials, or sensitive config outside the allowed workspace; never echo secret values.
  • Do not edit files, run destructive commands, or use network access unless explicitly required.
  • If the requested scope is unclear, ask for the minimum clarification needed.

Output Format

  • Lead with the direct answer.
  • Follow with the evidence: exact file paths and line references.
  • Keep the summary compact — no full-file dumps, no irrelevant matches.
  • List open questions or missing evidence explicitly when the answer is incomplete.

When to Use

  • A caller asks where something lives, how a flow works, or which files are involved.
  • Planning or implementation needs codebase context before acting.
  • A search must distinguish the relevant code from generated or vendored noise.

When Not to Use

  • Running commands, tests, builds, or validation — use dh-execute-cli.
  • Editing or fixing code — use the implementation workflow.
  • Reviewing a change — use dh-code-review / dh-review.

Doc search

Documentation management: delegate create / update / delete / retrieve of generated documents (excluding docs/plans) to the best available documentation agent (bundled documentation capability as fallback) — the main and only documentation owner (see dh-create-documentation).

Search generated documentation quickly: notesmd-cli search-content "<term>" --vault "<project-name>" or obsidian search query="<term>" (fallback: rg --glob '*.md' "<term>" docs/).

04 同仓库更多 Skills

andrescevp
andrescevp/development-harness

dh-simplify

Review changed code for reuse, quality, and efficiency (three parallel reviews), then fix findings directly. Use after making changes or when asked to clean up, refactor, simplify, or improve this code.

★ 8
andrescevp
andrescevp/development-harness

dh-setup

Audit system software, configure user MCPs/plugins, scaffold project QA (hooks + per-stack tools), bootstrap docs/architecture with the selected architecture agent, and write harness directives into AGENTS.md. Use to check requirements or setup the environment.

★ 8
andrescevp
andrescevp/development-harness

dh-semver

Apply strict Semantic Versioning — analyze commits since the last tag to determine the bump type (major/minor/patch from conventional commit prefixes), generate an automated changelog grouped by breaking changes, features, fixes, and chores, and create a git tag locally without pushing until confirmed, handling both conventional commits and manual version decisions. Use when preparing a release, invoked by dh-execute-plan after plan completion and dh-final-review for release readiness, or when the user asks "what version is next?", "bump version", "generate changelog", "tag release", or "what changed since last release?".

★ 8
andrescevp
andrescevp/development-harness

dh-review

Verify a plan sub-task against acceptance criteria, scope, done-when; review diff, validation, regression risk; structured verdict to tasks/review.md. Plan Alignment Mode (fast execution) is a separate mode: no sub-task selection, no diff review, no code review — it compares plan.md with plan_fast.md and writes tasks/review-fast.md (pre-execution) or tasks/review-fast-final.md (plan-end). Use after implementation, to review/verify the sub-task, or to check fast-plan alignment.

★ 8
andrescevp
andrescevp/development-harness

dh-resume-plan

Resume a paused phased plan from docs/plans/<slug>/handoff.md: validate the contract, detect drift, rehydrate context, mark the handoff resumed, and continue via dh-execute-plan resume mode. Use when the user says "resume the plan", "continue where we stopped", "pick up the plan", or "resume after a pause".

★ 8
andrescevp
andrescevp/development-harness

dh-preflight

Run tests, linters, static analysis as a release gate: auto-detect tooling, check dirty state, pass/fail verdict with actionable failures (no auto-fixes). Use to run preflight, pre-release check, or validate before release.

★ 8