| name | repoprompt |
| description | Use RepoPrompt CLI for token-efficient codebase exploration |
| allowed-tools | ["Bash","Read"] |
RepoPrompt Skill
When to Use
- Explore codebase structure (tree, codemaps)
- Search code with context lines
- Get code signatures without full file content (token-efficient)
- Read file slices (specific line ranges)
- Build context for tasks
Token Optimization
RepoPrompt is more token-efficient than raw file reads:
structure → signatures only (not full content)
read --start-line --limit → slices instead of full files
search --context-lines → relevant matches with context
CLI Usage
rp-cli -e 'command'
repoprompt_cli -e 'command'
Commands Reference
File Tree
rp-cli -e 'tree'
rp-cli -e 'tree --mode folders'
rp-cli -e 'tree --mode selected'
Code Structure (Codemaps) - TOKEN EFFICIENT
rp-cli -e 'structure src/auth/'
rp-cli -e 'structure --scope selected'
rp-cli -e 'structure src/ --max-results 10'
Search
rp-cli -e 'search "pattern"'
rp-cli -e 'search "error" --context-lines 3'
rp-cli -e 'search "TODO" --extensions .ts,.tsx'
rp-cli -e 'search "function" --max-results 20'
Read Files - TOKEN EFFICIENT
rp-cli -e 'read path/to/file.ts'
rp-cli -e 'read path/to/file.ts --start-line 50 --limit 30'
rp-cli -e 'read path/to/file.ts --start-line -20'
Selection Management
rp-cli -e 'select add src/auth/'
rp-cli -e 'select set src/api/ src/types/'
rp-cli -e 'select clear'
rp-cli -e 'select get'
Workspace Context
rp-cli -e 'context'
rp-cli -e 'context --include prompt,selection,tree'
Chain Commands
rp-cli -e 'select set src/auth/ && structure --scope selected && context'
Workspaces
rp-cli -e 'workspace list'
rp-cli -e 'workspace tabs'
rp-cli -e 'workspace switch "ProjectName"'
AI Chat (uses RepoPrompt's models)
rp-cli -e 'chat "How does the auth system work?"'
rp-cli -e 'chat "Design a new feature" --mode plan'
Context Builder (AI-powered file selection)
rp-cli -e 'builder "implement user authentication"'
Workflow Shorthand Flags
rp-cli --workspace MyProject --select-set src/ --export-context ~/out.md
rp-cli --chat "How does auth work?"
rp-cli --builder "implement user authentication"
Script Files (.rp)
For repeatable workflows, save commands to a script:
workspace switch Frontend
select set src/components/
context --all > ~/exports/frontend.md
Run with:
rp-cli --exec-file ~/scripts/daily-export.rp
CLI Flags
| Flag | Purpose |
|---|
-e 'cmd' | Execute command(s) |
-w <id> | Target window ID |
-q | Quiet mode |
-d <cmd> | Detailed help for command |
--wait-for-server 5 | Wait for connection (scripts) |
Async Operations (tmux)
For long-running operations like builder, use the async script:
uv run python -m runtime.harness scripts/repoprompt_async.py \
--action start --task "understand the auth system"
uv run python -m runtime.harness scripts/repoprompt_async.py \
--action start --workspace "MyProject" --task "explore API patterns"
uv run python -m runtime.harness scripts/repoprompt_async.py --action status
uv run python -m runtime.harness scripts/repoprompt_async.py --action result
uv run python -m runtime.harness scripts/repoprompt_async.py --action kill
Note
Requires RepoPrompt app running with MCP Server enabled.