Codebase Simplification Campaignのロゴ

Codebase Simplification Campaign

コミュニティ
Sahil-SS9
codebase-simplification-campaign

Use when refactoring a module or codebase while preserving behaviour.

概要

公開者Sahil-SS9
リポジトリagent-personas
スキル名codebase-simplification-campaign
スター
67
フォーク
4
同梱ファイル
4
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 4個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    Sahil-SS9がGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Codebase Simplification Campaign」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/Sahil-SS9/agent-personas/tree/main/skills/codebase-simplification-campaign
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Sahil-SS9/agent-personas.git /tmp/agent-personas
mkdir -p .claude/skills
cp -r /tmp/agent-personas/skills/codebase-simplification-campaign .claude/skills/codebase-simplification-campaign
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでCodebase Simplification Campaignを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にCodebase Simplification Campaignを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Codebase Simplification Campaignは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Codebase Simplification Campaign

Operational method; evidence is limited to the scenarios actually exercised.

Preparation gate

Applies to module-level refactors as well as campaigns. BEFORE the first structural source edit, follow refactor preparation: inspect and execute relevant coverage; add and run missing boundary characterization against unchanged source. A smoke pass alone does not cover absent edge assertions. Reuse adequate existing coverage without duplicate tests. For structural-plus-feature work, verify a behaviour-preserving structural slice before adding the feature; separate edits/test receipts suffice, not mandatory separate commits. If a small test seam is necessary first, disclose and verify that prerequisite instead of pretending the source was untouched. For trivial local work, use the short path in the guide; the repository-wide LOC census and campaign machinery below apply only when a repository-wide campaign or numerical reduction is requested.

  1. Freeze baseline revision, tracked file universe, language-aware LOC tool/version and exclusions before changes. Report overall repository and production-source counts separately, with tests/docs/generated/vendor categories. Include new and moved files consistently.

  2. A requested 30% reduction is an aggressive target, not a licence to remove features, tests, security guards, observability or compatibility. Never minify, reclassify or move code outside the denominator to claim success. Report target shortfalls honestly.

  3. Map entrypoints, dependencies, high-churn modules, large files and duplicate behaviours. Read callers and history before declaring code dead; reflection, registration and import side effects can evade text search.

  4. First add characterisation tests at observable boundaries, including error paths, ordering and side effects. Keep existing defects distinguishable from intended fixes; behaviour-changing repairs are separate scope, not disguised refactoring.

  5. Rank seams by measured duplication, change coupling and verification cost. Break god files along coherent responsibilities and ownership, not line thresholds. Consolidate helpers only when semantics and reasons for change match; keep accidental similarity separate.

  6. Flatten routing only after recording precedence, fallthrough, defaults and failure semantics. Compare guard clauses, explicit state transitions and table dispatch; reject clever indirection that makes the caller harder to understand.

  7. Apply small reversible slices; after each slice run focused and integration tests. Use simplify-swarm-candidate for local improvements and hermaguard-candidate for adversarial verification. Reviewer agreement never lowers change risk.

  8. Prefer independently green stacked PRs. When changing published interfaces or independently deployed consumers, apply expand/migrate/contract gates, including mixed-state and retirement evidence. Use one atomic PR only where splitting creates broken intermediate states. Continue routine approved choices without asking, but do not invent missing authority or conceal blockers.

  9. Report baseline/current counts, reduction, duplication/coupling changes, remaining hotspots, tests and actual PR handles if authorised. Only undo owned changes; preserve unrelated dirty work. A smaller tree is not enough: prove unchanged contracts and explain representative execution paths.

Provenance and limits

Read source synthesis when assessing origin, conflicting guidance or evidence maturity.

Source-grounded decision rules

Separate mechanism, specialised action and policy when they have different change reasons. A god-file split is successful only if callers need less knowledge and dependencies decrease; never extract solely to meet a function-length threshold (Ousterhout, chapters 6 and section 9.8).

Reduce special cases through representations only after proving distinctions are irrelevant: empty and absent are not interchangeable when callers observe them. Compare explicit branches, data dispatch and polymorphism; preserve unknown-type defaults and error semantics (Ousterhout chapter 6; Fowler catalogue).

Migration ledger: enumerate every consumer, compatibility state, owner, verification and retirement condition. Use independently green shards, prevent new old-API uses, and do not call the migration finished while consumers or temporary adapters remain (Software Engineering at Google, chapter 22).

Branch by abstraction: place current behaviour behind a narrow boundary, migrate callers, introduce and compare the replacement, switch only with authority, then retire old implementation and temporary boundary when no longer needed. Test mixed-version states; do not shadow-write side effects (Fowler, Branch By Abstraction; side-effect prohibition is our safety synthesis).

Freeze the dependency index revision and confirm runtime registration, configuration and dynamic callers separately. Treat graph absence as an investigation lead, never proof of dead code (wiki codeindex plus upstream README).

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Codebase Simplification Campaign」では何ができますか?

Use when refactoring a module or codebase while preserving behaviour.

TypingMindでCodebase Simplification Campaignを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Codebase Simplification Campaignはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにCodebase Simplification Campaignをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/Sahil-SS9/agent-personas/tree/main/skills/codebase-simplification-campaignを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Codebase Simplification Campaignを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Codebase Simplification Campaignで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもCodebase Simplification Campaignを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Codebase Simplification Campaign」は無料ですか?

はい。Sahil-SS9がMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇