本文へ移動
cccskills
無料GitHub で公開

code-refactoring-small

Refactor code units whose size or mixed responsibilities impede understanding, testing, or change. Use when recent work makes a function, class, or module materially harder to reason about.

インストール方法を見る

含まれるファイル(1)

  • SKILL.md1.2 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Refactoring Large Code Units

Improve cohesion and readability rather than optimizing for an arbitrary line count.

Workflow

  1. Read the whole unit and its important callers or tests.
  2. Identify the concrete source of difficulty: mixed responsibilities, deep nesting, hidden state transitions, repeated setup, or an unstable boundary.
  3. Choose extractions that have meaningful names and inputs. Follow existing repository structure rather than introducing layers solely to make units shorter.
  4. Preserve behavior and public contracts unless the task explicitly changes them.
  5. Verify with focused tests and the repository's normal quality gates.

A long linear function may be clearer than many tiny helpers; a short function may still combine unrelated responsibilities. Use size as a prompt to inspect, not a pass/fail threshold.

Keep the refactor scoped to what improves the current change. If a larger architectural split is justified, explain the trade-off and seek agreement before expanding scope.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Applies local reliability, viewport, tab-safety, stale-ref, widget, and browser-boundary lessons to every agent-browser automation. Use alongside the upstream agent-browser skill whenever navigating, clicking, filling, testing, extracting, taking screenshots, or debugging any website with agent-browser.

日本語の概要は準備中です。原文の説明を表示しています。

aspiers/ai-config152026年10月9日 更新

Size the agent-browser Chromium window to fill its current screen, leaving a configurable bottom margin for the desktop panel. Use before any agent-browser automation that needs the full screen visible without elements overlapping or scrolling off (e.g. Xero, dense web apps).

日本語の概要は準備中です。原文の説明を表示しています。

aspiers/ai-config152026年10月9日 更新

Create Claude Code slash commands, OpenCode command files, Pi prompt templates, and Codex custom prompts that delegate to the right subagent or skill. Use when creating new commands, porting commands across agent platforms, or refactoring existing commands to follow platform conventions.

日本語の概要は準備中です。原文の説明を表示しています。

aspiers/ai-config152026年10月9日 更新

Adds or changes allowed commands in AI agent permission configs for OpenCode and Claude Code. Use when a command needs adding to an agent's allow list, when permission settings for existing commands need changing, when setting up a new AI tool that requires command permissions, or when the user asks to stop being prompted for a particular command.

日本語の概要は準備中です。原文の説明を表示しています。

aspiers/ai-config152026年10月9日 更新

bc

無料

Creates a Beads issue for a described problem or piece of work without doing the work itself. Use when the user invokes `/bc` or `$bc`, or asks to file, log, or record a bead for something. To also carry out the work, use the `bx` skill instead.

日本語の概要は準備中です。原文の説明を表示しています。

aspiers/ai-config152026年10月9日 更新

bdr

無料

Stores a persistent memory or learning with `bd remember` so it survives across sessions. Use when the user invokes `/bdr` or `$bdr`, or asks to remember, note, or persist an insight in a Beads workspace.

日本語の概要は準備中です。原文の説明を表示しています。

aspiers/ai-config152026年10月9日 更新

aspiers のスキルをすべて見る

このスキルの問題を報告する