vscode-sidebar-terminal: Command for Claude Code

.claude/commands/refactor.md

refactor is a command for Claude Code from s-hiraoku/vscode-sidebar-terminal. It costs 0 tokens per session (750 once invoked), scanned A, a copy of orchestrator, MIT.

A refactoring command that organizes complex work into sequential steps and parallel subtasks.

In plain words
What is it for?
It helps plan and carry out multi-step refactoring tasks.
Why use it?
It provides a repeatable structure for changing code while reviewing progress between stages.

Command for Claude Code

Written for Claude Code: installed under .claude/. Also seen: names the TodoWrite tool.

This is s-hiraoku/vscode-sidebar-terminal's own configuration. It tells Claude Code how to work on vscode-sidebar-terminal itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything vscode-sidebar-terminal configures →

Reuse

Borrowing it

Nothing to install: this file belongs to s-hiraoku/vscode-sidebar-terminal. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/s-hiraoku/vscode-sidebar-terminal/main/.claude/commands/refactor.md
Clone the repo
git clone --depth 1 https://github.com/s-hiraoku/vscode-sidebar-terminal

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for refactor

README.md
[![agentmods](https://agentmods.dev/badge/commands/s-hiraoku/vscode-sidebar-terminal/refactor.svg)](https://agentmods.dev/commands/s-hiraoku/vscode-sidebar-terminal/refactor)
Your own site
<a href="https://agentmods.dev/commands/s-hiraoku/vscode-sidebar-terminal/refactor"><img src="https://agentmods.dev/badge/commands/s-hiraoku/vscode-sidebar-terminal/refactor.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 750 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.00750
Opus 5 $0.00000 $0.00375
Sonnet 5 $0.00000 $0.00150
Haiku 4.5 $0.00000 $0.00075

Measured 7d ago against content hash 922c9ad87604, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

refactor scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

100% identical to orchestrator — 8 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.claude/commands/refactor.md · 94 lines

How it starts

The opening of the file, as written. The whole thing — 94 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Orchestrator

Split complex tasks into sequential steps, where each step can contain multiple parallel subtasks.

Process

  1. Initial Analysis

    • First, analyze the entire task to understand scope and requirements
    • Identify dependencies and execution order
    • Plan sequential steps based on dependencies
  2. Step Planning

    • Break down into 2-4 sequential steps
    • Each step can contain multiple parallel subtasks
    • Define what context from previous steps is needed
  3. Step-by-Step Execution

    • Execute all subtasks within a step in parallel
    • Wait for all subtasks in current step to complete
    • Pass relevant results to next step
    • Request concise summaries (100-200 words) from each subtask
  4. Step Review and Adaptation

    • After each step completion, review results
    • Validate if remaining steps are still appropriate
    • Adjust next steps based on discoveries
    • Add, remove, or modify subtasks as needed
  5. Progressive Aggregation

    • Synthesize results from completed step
    • Use synthesized results as context for next step
    • Build comprehensive understanding progressively
    • Maintain flexibility to adapt plan

Example Usage

When given "analyze test lint and commit":

Step 1: Initial Analysis (1 subtask)

  • Analyze project structure to understand test/lint setup

Step 2: Quality Checks (parallel subtasks)

  • Run tests and capture results
  • Run linting and type checking
  • Check git status and changes

Step 3: Fix Issues (parallel subtasks, using Step 2 results)

  • Fix linting errors found in Step 2
  • Fix type errors found in Step 2
  • Prepare commit message based on changes Review: If no errors found in Step 2, skip fixes and proceed to commit

Step 4: Final Validation (parallel subtasks)

  • Re-run tests to ensure fixes work
  • Re-run lint to verify all issues resolved
  • Create commit with verified changes Review: If Step 3 had no fixes, simplify to just creating commit

Key Benefits

Read the full file on GitHub · 94 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 94 lines · 0 tokens per session scan A 922c9ad87604

Subscribe to this mod's changes

refactor is a command published in the GitHub repository s-hiraoku/vscode-sidebar-terminal (21 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 750 tokens. A static security scan graded it A with 0 findings. It is 100% identical to orchestrator, differing in 8 lines, and is treated as a copy.