一键导入
dora
Query codebase using `dora` CLI for code intelligence, symbol definitions, dependencies, and architectural analysis
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Query codebase using `dora` CLI for code intelligence, symbol definitions, dependencies, and architectural analysis
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | dora |
| description | Query codebase using `dora` CLI for code intelligence, symbol definitions, dependencies, and architectural analysis |
IMPORTANT: Use dora FIRST for ALL code exploration tasks.
dora understands code structure, dependencies, symbols, and architectural relationships through its indexed database. It provides instant answers about:
When to use dora vs other tools:
Workflow pattern:
dora status - Check index health, file/symbol counts, last indexed timedora map - Show packages, file count, symbol countdora ls [directory] [--limit N] [--sort field] - List files in directory with metadata (symbols, deps, rdeps). Default limit: 100dora file <path> - Show file's symbols, dependencies, and dependents. Note: includes local symbols (parameters).dora symbol <query> [--kind type] [--limit N] - Find symbols by name across codebasedora refs <symbol> [--kind type] [--limit N] - Find all references to a symboldora exports <path> - List exported symbols from a file. Note: includes function parameters.dora imports <path> - Show what a file importsdora deps <path> [--depth N] - Show file dependencies (what this imports). Default depth: 1dora rdeps <path> [--depth N] - Show reverse dependencies (what imports this). Default depth: 1dora adventure <from> <to> - Find shortest dependency path between two filesdora leaves [--max-dependents N] - Find files with few/no dependents. Default: 0dora lost [--limit N] - Find unused exported symbols. Default limit: 50dora treasure [--limit N] - Find most referenced files and files with most dependencies. Default: 10dora cycles [--limit N] - Detect circular dependencies. Empty = good. Default: 50dora coupling [--threshold N] - Find bidirectionally dependent file pairs. Default threshold: 5dora complexity [--sort metric] - Show file complexity (symbol_count, outgoing_deps, incoming_deps, stability_ratio, complexity_score). Sort by: complexity, symbols, stability. Default: complexitydora changes <ref> - Show files changed since git ref and their impactdora graph <path> [--depth N] [--direction type] - Generate dependency graph. Direction: deps, rdeps, both. Default: both, depth 1dora docs [--type TYPE] - List all documentation files. Use --type to filter by md or txtdora docs search <query> [--limit N] - Search through documentation content. Default limit: 20dora docs show <path> [--content] - Show document metadata and references. Use --content to include full textNote: To find where a symbol is documented, use dora symbol which includes a documented_in field. To find documentation about a file, use dora file which also includes documented_in.
dora schema - Show database schema (tables, columns, indexes)dora cookbook show [recipe] - Query patterns with real examples (quickstart, methods, references, exports)dora query "<sql>" - Execute read-only SQL query against the databasedora symboldora filedora rdeps, dora refsdora treasure, dora leavesdora cycles, dora coupling, dora complexitydora deps, dora adventuredora lostdora symbol (shows documented_in), dora docs searchdora docsdora cookbook for examples, dora schema for structure, dora query to executedora status - Check index healthdora treasure - Find core filesdora file <path> - Understand specific filesdora deps/dora rdeps - Navigate relationshipsdora refs - Check usage before changesFinding where a symbol is defined:
# DON'T: grep -r "class AuthService" .
# DON'T: grep -r "function validateToken" .
# DON'T: Glob("**/*.ts") then search each file
# DO:
dora symbol AuthService
dora symbol validateToken
Finding all usages of a function/class:
# DON'T: grep -r "AuthService" . --include="*.ts"
# DON'T: Grep("AuthService", glob="**/*.ts")
# DO:
dora refs AuthService
Finding files that import a module:
# DON'T: grep -r "from.*auth/service" .
# DON'T: grep -r "import.*AuthService" .
# DO:
dora rdeps src/auth/service.ts
Finding what a file imports:
# DON'T: grep "^import" src/app.ts
# DON'T: cat src/app.ts | grep import
# DO:
dora deps src/app.ts
dora imports src/app.ts
Finding files in a directory:
# DON'T: find src/components -name "*.tsx"
# DON'T: Glob("src/components/**/*.tsx")
# DO:
dora ls src/components
dora ls src/components --sort symbols # With metadata
Finding entry points or core files:
# DON'T: grep -r "export.*main" .
# DON'T: find . -name "index.ts" -o -name "main.ts"
# DO:
dora treasure # Most referenced files
dora file src/index.ts # Understand the entry point
Understanding a file's purpose:
# DON'T: Read file, manually trace imports
# DON'T: grep for all imports, then read each
# DO:
dora file src/auth/service.ts # See symbols, deps, rdeps at once
Finding unused code:
# DON'T: grep each export manually across codebase
# DON'T: Complex script to track exports vs imports
# DO:
dora lost # Unused exported symbols
dora leaves # Files with no dependents
Checking for circular dependencies:
# DON'T: Manually trace imports in multiple files
# DON'T: Write custom script to detect cycles
# DO:
dora cycles
Impact analysis for refactoring:
# DON'T: Manually grep for imports and usages
# DON'T: Read multiple files to understand impact
# DO:
dora rdeps src/types.ts --depth 2 # See full impact
dora refs UserContext # All usages
dora complexity --sort complexity # Find risky files
Finding documentation for code:
# DON'T: grep -r "AuthService" docs/
# DON'T: Manually search through README files
# DO:
dora symbol AuthService # Shows documented_in field
dora file src/auth/service.ts # Shows documented_in field
dora docs search "authentication" # Search doc content
dora docs # List all docs
Understanding what a document covers:
# DON'T: Read entire doc, manually trace references
# DON'T: grep for symbol names in the doc
# DO:
dora docs show README.md # See all symbols/files/docs referenced
dora docs show docs/api.md --content # Include full content
Understanding a feature:
dora symbol AuthService # Find the service
dora file src/auth/service.ts # See what it depends on
dora rdeps src/auth/service.ts # See what uses it
dora refs validateToken # Find all token validation usage
Impact analysis before refactoring:
dora file src/types.ts # See current dependencies
dora rdeps src/types.ts --depth 2 # See full impact tree
dora refs UserContext # Find all usages of the type
dora complexity --sort stability # Find stable vs volatile files
Finding dead code:
dora lost --limit 100 # Unused exported symbols
dora leaves # Files nothing depends on
dora file src/old-feature.ts # Verify it's truly unused
Architecture investigation:
dora cycles # Check for circular deps (should be empty)
dora coupling --threshold 10 # Find tightly coupled modules
dora complexity --sort complexity # Find complex/risky files
dora treasure # Find architectural hubs
Navigating unfamiliar code:
dora map # Overview of packages and structure
dora treasure # Find entry points and core files
dora file src/index.ts # Start from main entry
dora deps src/index.ts --depth 2 # See what it depends on
dora adventure src/a.ts src/b.ts # Find connection between modules
Working with changes:
dora changes main # See what changed vs main branch
dora rdeps src/modified.ts # Check impact of your changes
dora graph src/modified.ts --depth 2 # Visualize dependency tree
Custom analysis:
dora cookbook show methods # See query pattern examples
dora schema # See database structure
dora query "SELECT f.path, COUNT(s.id) as symbols FROM files f JOIN symbols s ON s.file_id = f.id WHERE s.is_local = 0 GROUP BY f.path ORDER BY symbols DESC LIMIT 20"
Working with documentation:
dora symbol AuthService # Shows documented_in field
dora docs show README.md # What does README reference?
dora docs search "setup" # Find all docs about setup
dora docs # List all documentation files
dora docs --type md # List only markdown docs
Performance:
--limit to cap results for large codebasesSymbol filtering:
is_local = 0--kind to filter by symbol type (function, class, interface, type, etc.)Dependencies:
deps shows outgoing dependencies (what this imports)rdeps shows incoming dependencies (what imports this)--depth to explore transitive dependenciesArchitecture metrics:
complexity_score = symbol_count × incoming_deps (higher = riskier to change)stability_ratio = incoming_deps / outgoing_deps (higher = more stable)cycles output = healthy architecturecoupling (> 20 symbols) = consider refactoringDocumentation:
.md and .txt filesAuthService)src/auth/service.ts)dora symbol or dora file to see where code is documented (via documented_in field)dora docs to list all documentation filesdora docs show to see what a document covers with line numbersdora file and dora exports