claude-code-conductor: Skill for Claude Code

.claude/skills/extract-lib/SKILL.md

extract-lib is a skill for Claude Code from satoh-y-0323/claude-code-conductor. It costs 32 tokens per session (3,008 once invoked), scanned A, original, MIT.

A tool-guided workflow for comparing multiple projects, identifying code they have in common, and proposing a reusable library with starter code.

In plain words
What is it for?
Use it to analyse at least two project directories, choose shared components, and produce a library design and skeleton implementation.
Why use it?
It helps avoid duplicating the same implementation across projects and checks the projects' stated coding conventions before making the proposal.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter. Also seen: names the AskUserQuestion tool.

This is satoh-y-0323/claude-code-conductor's own configuration. It tells Claude Code how to work on claude-code-conductor 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 claude-code-conductor configures →

Reuse

Borrowing it

Nothing to install: this file belongs to satoh-y-0323/claude-code-conductor. 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/satoh-y-0323/claude-code-conductor/main/.claude/skills/extract-lib/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/satoh-y-0323/claude-code-conductor

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 extract-lib

README.md
[![agentmods](https://agentmods.dev/badge/skills/satoh-y-0323/claude-code-conductor/extract-lib.svg)](https://agentmods.dev/skills/satoh-y-0323/claude-code-conductor/extract-lib)
Your own site
<a href="https://agentmods.dev/skills/satoh-y-0323/claude-code-conductor/extract-lib"><img src="https://agentmods.dev/badge/skills/satoh-y-0323/claude-code-conductor/extract-lib.svg" alt="Measured on agentmods" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,008 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 original No closer match found 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.00032 $0.03008
Opus 5 $0.00016 $0.01504
Sonnet 5 $0.00006 $0.00602
Haiku 4.5 $0.00003 $0.00301

Measured 2d ago against content hash ce8f436e4d4c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

extract-lib 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 2d 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.

.claude/skills/extract-lib/SKILL.md · 298 lines

How it starts

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

extract-lib

複数プロジェクトのコードを横断解析し、共通要素を抽出してライブラリ設計・スケルトン生成を行う。


Step 0: 規約ファイルを読み込む

.claude/rules/coding-standards.md.claude/rules/project-conventions.md を Read する。

どちらも存在しない場合: 以下を表示して終了する:

規約ファイルが見つかりません。先に /setup を実行してプロジェクト規約を設定してください。

存在する場合: 以下を抽出して以降のステップで使用する:

  • 使用言語・フレームワーク(ファイル拡張子含む)
  • 命名規則(クラス名・関数名・定数名のパターン)
  • ファイル・ディレクトリ構成の慣習
  • その他の重要な規約

Step 1: 解析対象プロジェクトのパスを収集する

1回目のパス入力

AskUserQuestion ツール:

{
  "questions": [{
    "question": "解析対象の1つ目のプロジェクトの絶対パスを入力してください(例: C:/work/project-a)"
  }]
}

Glob で {入力パス}/** を検索してパスが存在するか確認する。存在しない場合は「パスが見つかりません」と伝えて再入力させる。

2回目以降のパス追加

AskUserQuestion ツール:

{
  "questions": [{
    "question": "別のプロジェクトを追加しますか?",
    "header": "パス追加",
    "options": [
      { "label": "追加する", "description": "さらに別のプロジェクトパスを入力する" },
      { "label": "これで完了", "description": "入力済みのプロジェクトで解析を開始する" }
    ]
  }]
}

「追加する」の場合は続けてパスを入力・検証し、「これで完了」になるまで繰り返す。 入力済みプロジェクトが1つのみの状態で「これで完了」が選ばれた場合は「最低2プロジェクト必要です」と伝えて再度選択させる。


Step 2: 出力形式を確認する

AskUserQuestion ツール:

{
  "questions": [{
    "question": "解析結果をどの形式で出力しますか?",
    "header": "出力形式",
    "options": [
      { "label": "設計のみ", "description": "共通化候補リストとライブラリ設計案をレポートとして出力する" },
      { "label": "設計 + スケルトン生成", "description": "設計案に加えてライブラリのスケルトンコードも生成する" }
    ]
  }]
}

「設計 + スケルトン生成」が選ばれた場合、続けて出力先を確認する:

{
  "questions": [{
    "question": "生成するライブラリの出力先ディレクトリの絶対パスを入力してください(例: C:/work/shared-lib)"
  }]
}

Step 3: 解析エージェントを起動する

Agent ツールで解析を実行する。以下のプロンプトを使用する:

あなたはコードベース横断解析エージェントです。
以下の複数プロジェクトを解析し、共通化すべき要素を抽出してください。

## 解析対象プロジェクト
{収集したプロジェクトパスのリスト}

## プロジェクト規約(.claude/rules/coding-standards.md / .claude/rules/project-conventions.md より)
{Step 0 で抽出した言語・フレームワーク・命名規則・その他規約}

## 解析手順

各プロジェクトについて順に以下を調査する。

### 1. ディレクトリ構造の把握
Glob で `{パス}/**/*.{言語の拡張子}` を検索してファイル一覧を取得する。
規約で複数言語が使われている場合はそれぞれの拡張子で検索する。

### 2. 定数・設定値の収集
規約に合わせた定数定義パターンで Grep する。
検索例(言語に合わせて調整すること):
- TypeScript/JavaScript: `const [A-Z_]+ =`
- Java/C#: `static final|const|static readonly`
- Python: `^[A-Z_]+ =`

マジック値として使われる文字列・数値・タイムアウト値・URL パターン等も収集する。

### 3. ユーティリティ関数の収集
小規模ヘルパー関数を Grep で特定する。
特に以下に注目する:
- 文字列操作・日付操作・数値フォーマット
- バリデーション処理(入力検証・型チェック等)
- 変換処理(型変換・フォーマット変換・エンコード等)

類似した関数が複数プロジェクトに存在する場合は内容を Read して比較する。

### 4. 共通ロジックの収集
ビジネスロジック上の繰り返しパターンを調査する:
- エラーハンドリングの共通パターン
- ログ出力のラッパー処理
- 外部APIコール・HTTP通信の共通処理
- ページネーション・ソート・フィルタリングの共通処理

### 5. 型・インターフェース定義の収集(静的型付き言語の場合)
型定義・インターフェース・データクラス・DTO等を Grep で収集し、
複数プロジェクトで同一概念のものが個別定義されていないか確認する。

## 出力形式

以下の形式で結果をまとめること。

---

## 共通化候補リスト

### 高優先度(完全一致・ほぼ同一のコードが複数プロジェクトに存在)
| 種別 | 内容 | 発見場所(プロジェクト名:ファイルパス) |
|---|---|---|
| 定数 | ... | ProjectA: path, ProjectB: path |

### 中優先度(類似ロジック・命名が異なるが同一目的)
| 種別 | 内容 | 発見場所 | 差異の概要 |
|---|---|---|---|

### 低優先度(概念的共通・共通化は任意)
| 種別 | 内容 | 備考 |
|---|---|---|

## ライブラリ設計案

**推奨ライブラリ名**: {プロジェクト規約の命名規則に基づいた名前}

**ディレクトリ構成**:

{ライブラリ名}/ ├── {モジュール1}/ │ ├── {ファイル} │ └── ... ├── {モジュール2}/ └── ...


**公開API一覧**:
| モジュール | 名前 | 種別 | 責務 |
|---|---|---|---|

**移行時の注意点**: {既存プロジェクトからライブラリへ移行する際の注意事項}

---

Read the full file on GitHub · 298 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. 2d ago First seen · 298 lines · 32 tokens per session scan A ce8f436e4d4c

Subscribe to this mod's changes

extract-lib is a skill published in the GitHub repository satoh-y-0323/claude-code-conductor (1 stars, last pushed 3d ago), licensed MIT. It adds 32 tokens to every session and 3,008 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-04.