Skill站外收录 @skilllib/skill-2014279378698448898
repoprompt
高效探索代码库结构与内容,支持按需提取文件片段、符号定义及上下文搜索,通过选择集管理和智能上下文构建,实现低 token 消耗的精准代码分析,适用于复杂项目的快速理解与任务规划。
效率工具 AI 技能
Skills.MD
# 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
```bash
# If installed to PATH (Settings → MCP Server → Install CLI to PATH)
rp-cli -e 'command'
# Or use the alias (configure in your shell)
repoprompt_cli -e 'command'
```
## Commands Reference
### File Tree
```bash
# Full tree
rp-cli -e 'tree'
# Folders only
rp-cli -e 'tree --mode folders'
# Selected files only
rp-cli -e 'tree --mode selected'
```
### Code Structure (Codemaps) - TOKEN EFFICIENT
```bash
# Structure of specific paths
rp-cli -e 'structure src/auth/'
# Structure of selected files
rp-cli -e 'structure --scope selected'
# Limit results
rp-cli -e 'structure src/ --max-results 10'
```
### Search
```bash
# Basic search
rp-cli -e 'search "pattern"'
# With context lines
rp-cli -e 'search "error" --context-lines 3'
# Filter by extension
rp-cli -e 'search "TODO" --extensions .ts,.tsx'
# Limit results
rp-cli -e 'search "function" --max-results 20'
```
### Read Files - TOKEN EFFICIENT
```bash
# Full file
rp-cli -e 'read path/to/file.ts'
# Line range (slice)
rp-cli -e 'read path/to/file.ts --start-line 50 --limit 30'
# Last N lines (tail)
rp-cli -e 'read path/to/file.ts --start-line -20'
```
### Selection Management
```bash
# Add files to selection
rp-cli -e 'select add src/auth/'
# Set selection (replace)
rp-cli -e 'select set src/api/ src/types/'
# Clear selection
rp-cli -e 'select clear'
# View current selection
rp-cli -e 'select get'
```
### Workspace Context
```bash
# Get full context
rp-cli -e 'context'
# Specific includes
rp-cli -e 'context --include prompt,selection,tree'
```
### Chain Commands
```bash
# Multiple operations
rp-cli -e 'select set src/auth/ && structure --scope selected && context'
```
### Workspaces
```bash
# List workspaces
rp-cli -e 'workspace list'
# List tabs
rp-cli -e 'workspace tabs'
# Switch workspace
rp-cli -e 'workspace switch "ProjectName"'
```
### AI Chat (uses RepoPrompt's models)
```bash
# Send to chat
rp-cli -e 'chat "How does the auth system work?"'
# Plan mode
rp-cli -e 'chat "Design a new feature" --mode plan'
```
### Context Builder (AI-powered file selection)
```bash
# Auto-select relevant files for a task
rp-cli -e 'builder "implement user authentication"'
```
## Workflow Shorthand Flags
```bash
# Quick operations without -e syntax
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:
```bash
# daily-export.rp
workspace switch Frontend
select set src/components/
context --all > ~/exports/frontend.md
```
Run with:
```bash
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:
```bash
# Start context builder async
uv run python -m runtime.harness scripts/repoprompt_async.py \
--action start --task "understand the auth system"
# With workspace switch
uv run python -m runtime.harness scripts/repoprompt_async.py \
--action start --workspace "MyProject" --task "explore API patterns"
# Check status
uv run python -m runtime.harness scripts/repoprompt_async.py --action status
# Get result when done
uv run python -m runtime.harness scripts/repoprompt_async.py --action result
# Kill if needed
uv run python -m runtime.harness scripts/repoprompt_async.py --action kill
```
## Note
Requires RepoPrompt app running with MCP Server enabled.
评论 0
还没有评论,来抢沙发。
相关内容
同类或同场景的收录内容
building-with-kafka-strimzi
在 Kubernetes 上构建基于 Apache Kafka 的事件驱动系统,支持高可靠的消息传递、事务性处理与精确一次语义,结合 Strimzi 运营商实现集群自动化管理,利用 Schema Registry 保障事件模式演进,适用于微服务间解耦通信与实时数据流处理场景。
站外数据与分析
609 0.0
personal-tool-builder
专注于从个人真实痛点出发快速构建实用工具,涵盖命令行程序、本地优先应用和自动化脚本的开发与演进,强调先满足自身需求再逐步扩展,通过持续自用打磨功能,避免过度设计,确保工具简洁有效且长期可维护。
站外商业与营销
196 0.0
threejs-lighting
实现三维场景中的光照与阴影控制,支持多种光源类型及环境光照明,提供从基础布光到高级阴影优化的完整方案,适用于需要真实感渲染或性能平衡的可视化项目。
站外效率工具
442 0.0
aggregation-helper
提供数据聚合场景的自动化辅助能力,涵盖 SQL 查询编写、统计分析建模、可视化方案设计及商业智能配置,支持从需求理解到生产级代码生成的全流程指导。
站外效率工具数据与分析
217 0.0
举报「repoprompt」
举报信息仅审核团队可见,同一资产 24 小时内仅可举报一次