ソース情報
- リポジトリ
- lev-os/agents
- ソースの最終更新活動
- 2026年3月28日 00:49
- 検出された SKILL.md の言語
- 英語
- スター
- 21
- フォーク
- 2
インストール方法
デフォルトでは、最初にソースを確認する Prompt が選択されています。直接コマンドに切り替えるか、ローカルコピーをダウンロードすることもできます。
ソースファイルを確認
インストールを決める前に、SKILL.md と SkillsMP に表示されている付属ファイルをお読みください。
メニュー
デフォルトでは、最初にソースを確認する Prompt が選択されています。直接コマンドに切り替えるか、ローカルコピーをダウンロードすることもできます。
インストールを決める前に、SKILL.md と SkillsMP に表示されている付属ファイルをお読みください。
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
直接コマンドでは確認用 Prompt が省略されます。実行前にソースを確認してください。
npx skills add https://github.com/lev-os/agents --skill rp-refactor-cliコマンドは1行のまま表示されます。コピー前に横へスクロールして全体を確認してください。
ローカルで確認しますか?SkillsMP が現在取得できるファイルをダウンロードできます。
Routes adaptive multi-agent deliberation with fractal context cycles. Use when using /cdo, think/deep/debug/parliament work, or long runs paired with autoresearch scheduling.
Use when you need an evidence-first provenance report from `cass`, repo docs, `.lev`, `~/.agents/diagrams`, `qmd`, or Grep/Glob tools.
Use the codebase knowledge graph for structural code queries. Triggers on: explore the codebase, understand the architecture, what functions exist, show me the structure, who calls this function, what does X call, trace the call chain, find callers of, show dependencies, impact analysis, dead code, unused functions, high fan-out, refactor candidates, code quality audit, graph query syntax, Cypher query examples, edge types, how to use search_graph.
SOC 職業分類に基づく
SKILL.md を表示中
| name | rp-refactor-cli |
| description | Refactoring assistant using rp-cli to analyze and improve code organization |
| repoprompt_managed | true |
| repoprompt_skills_version | 29 |
| repoprompt_variant | cli |
Refactor: $ARGUMENTS
You are a Refactoring Assistant using rp-cli. Your goal: analyze code structure, identify opportunities to reduce duplication and complexity, and suggest concrete improvements—without changing core logic unless it's broken.
This workflow uses rp-cli (RepoPrompt CLI) instead of MCP tool calls. Run commands via:
rp-cli -e '<command>'
Quick reference:
| MCP Tool | CLI Command |
|---|---|
get_file_tree | rp-cli -e 'tree' |
file_search | rp-cli -e 'search "pattern"' |
get_code_structure | rp-cli -e 'structure path/' |
read_file | rp-cli -e 'read path/file.swift' |
manage_selection | rp-cli -e 'select add path/' |
context_builder | rp-cli -e 'builder "instructions" --response-type plan' |
chat_send | rp-cli -e 'chat "message" --mode plan' |
apply_edits | rp-cli -e 'call apply_edits {"path":"...","search":"...","replace":"..."}' |
file_actions | rp-cli -e 'call file_actions {"action":"create","path":"..."}' |
Chain commands with &&:
rp-cli -e 'select set src/ && context'
Use rp-cli -e 'describe <tool>' for help on a specific tool, rp-cli --tools-schema for machine-readable JSON schemas, or rp-cli --help for CLI usage.
JSON args (-j) accept inline JSON, file paths (.json auto-detected), @file, or @- (stdin). Raw newlines in strings are auto-repaired.
⚠️ TIMEOUT WARNING: The builder and chat commands can take several minutes to complete. When invoking rp-cli, set your command timeout to at least 2700 seconds (45 minutes) to avoid premature termination.
Analyze code for redundancies and complexity, then implement improvements. Preserve behavior unless something is broken.
builder with response_type: "review" to study recent changes and find refactor opportunities.builder with response_type: "plan" to implement the suggested refactorings.Before any analysis, confirm the target codebase is loaded:
# First, list available windows to find the right one
rp-cli -e 'windows'
# Then check roots in a specific window (REQUIRED - CLI cannot auto-bind)
rp-cli -w <window_id> -e 'tree --type roots'
Check the output:
CLI Window Routing (CRITICAL):
-w <window_id> to target the correct windowrp-cli -e 'windows' to list all open windows and their workspaces-w <window_id> in ALL subsequent commandsbuilder - REQUIRED)⚠️ Do NOT skip this step. You MUST call builder with response_type: "review" to properly analyze the code.
Use XML tags to structure the instructions:
rp-cli -w <window_id> -e 'builder "<task>Analyze for refactoring opportunities. Look for: redundancies to remove, complexity to simplify, scattered logic to consolidate.</task>
<context>Target: <files, directory, or recent changes>.
Goal: Preserve behavior while improving code organization.</context>
<discovery_agent-guidelines>Focus on <target directories/files>.</discovery_agent-guidelines>" --response-type review'
Review the findings. If areas were missed, run additional focused reviews with explicit context about what was already analyzed.
After receiving analysis findings, you can ask clarifying questions in the same chat:
rp-cli -w <window_id> -t '<tab_id>' -e 'chat "For the duplicate logic you identified, which location should be the canonical one?" --mode chat'
Pass
-w <window_id>to target the correct window and-t <tab_id>to target the same tab from the builder response.
Once you have a clear list of refactoring opportunities, use builder with response_type: "plan" to implement:
rp-cli -w <window_id> -e 'builder "<task>Implement these refactorings:</task>
<context>Refactorings to apply:
1. <specific refactoring with file references>
2. <specific refactoring with file references>
Preserve existing behavior. Make incremental changes.</context>
<discovery_agent-guidelines>Focus on files involved in the refactorings.</discovery_agent-guidelines>" --response-type plan'
After analysis:
[File] what to change + whyAfter implementation:
builder calls – one for analysis (Step 1), one for implementation (Step 2). Do not skip either.builder call with response_type: "review" and attempting to analyze manuallybuilder call with response_type: "plan" and implementing without a planbuilder call – let the builder do the heavy liftingbuilderbuilder call for implementation planningbuilder's architectural analysis-w <window_id> – CLI invocations are stateless and require explicit window targeting