iterative-retrieval
サブエージェントのコンテキスト問題を解決するために、コンテキスト取得を段階的に洗練するパターン
Skill by marshall0524
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/marshall0524-iterative-retrieval
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/iterative-retrieval
What's inside
- Skill name
iterative-retrieval- Description
- サブエージェントのコンテキスト問題を解決するために、コンテキスト取得を段階的に洗練するパターン
- License
- MIT
- Instructions
- 199 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# 反復検索パターン
マルチエージェントワークフローにおける「コンテキスト問題」を解決します。サブエージェントは作業を開始するまで、どのコンテキストが必要かわかりません。
## 問題
サブエージェントは限定的なコンテキストで起動されます。以下を知りません:
- どのファイルに関連するコードが含まれているか
- コードベースにどのようなパターンが存在するか
- プロジェクトがどのような用語を使用しているか
標準的なアプローチは失敗します:
- **すべてを送信**: コンテキスト制限を超える
- **何も送信しない**: エージェントに重要な情報が不足
- **必要なものを推測**: しばしば間違い
## 解決策: 反復検索
コンテキストを段階的に洗練する4フェーズのループ:
```
┌─────────────────────────────────────────────┐
│ │
│ ┌──────────┐ ┌──────────┐ │
│ │ DISPATCH │─────▶│ EVALUATE │ │
│ └──────────┘ └──────────┘ │
│ ▲ │ │
│ │ ▼ │
│ ┌──────────┐ ┌──────────┐ │
│ │ LOOP │◀─────│ REFINE │ │
│ └──────────┘ └──────────┘ │
│ │
│ 最大3サイクル、その後続行 │
└─────────────────────────────────────────────┘
```
### フェーズ1: DISPATCH
候補ファイルを収集する初期の広範なクエリ:
```javascript
// 高レベルの意図から開始
const initialQuery = {
patterns: ['src/**/*.ts', 'lib/**/*.ts'],
keywords: ['authentication', 'user', 'session'],
excludes: ['*.test.ts', '*.spec.ts']
};
// 検索エージェントにディスパッチ
const candidates = await retrieveFiles(initialQuery);
```
### フェーズ2: EVALUATE
取得したコンテンツの関連性を評価:
```javascript
function evaluateRelevance(files, task) {
return files.map(file => ({
path: file.path,
relevance: scoreRelevance(file.content, task),
reason: explainRelevance(file.content, task),
missingContext: identifyGaps(file.content, task)
}));
}
```
スコアリング基準:
- **高(0.8-1.0)**: ターゲット機能を直接実装
- **中(0.5-0.7)**: 関連するパターンや型を含む
- **低(0.2-0.4)**: 間接的に関連
- **なし(0-0.2)**: 関連なし、除外
### フェーズ3: REFINE
評価に基づいて検索基準を更新:
```javascript
function refineQuery(evaluation, previousQuery) {
return {
// 高関連性ファイルで発見された新しいパターンを追加
patterns: [...previousQuery.patterns, ...extractPatterns(evaluation)],
// コードベースで見つかった用語を追加
keywords: [...previousQuery.keywords, ...extractKeywords(evaluation)],
// 確認された無関係なパスを除外
excludes: [...previousQuery.excludes, ...evaluation
.filter(e => e.relevance < 0.2)
.map(e => e.path)
],
// 特定のギャップをターゲット
focusAreas: evaluation
.flatMap(e => e.missingContext)
.filter(unique)
};
}
```
### フェーズ4: LOOP
洗練された基準で繰り返す(最大3サイクル):
```javascript
async function iterativeRetrieve(task, maxCycles = 3) {
let query = createInitialQuery(task);
let bestContext = [];
for (let cycle = 0; cycle < maxCycles; cycle++) {
const candidates = await retrieveFiles(query);
const evaluation = evaluateRelevance(candidates, task);
// 十分なコンテキストがあるか確認
const highRelevance = evaluation.filter(e => e.relevance >= 0.7);
if (highRelevance.length >= 3 && !hasCriticalGaps(evaluation)) {
return highRelevance;
}From marshall0524/everythingclaudecode, MIT.
More from marshall0524/everythingclaudecode
- 0.498score
security-scan
marshall0524
AgentShield を使用して、Claude Code の設定(.claude/ ディレクトリ)のセキュリティ脆弱性、設定ミス、インジェクションリスクをスキャンします。CLAUDE.md、settings.json、MCP サーバー、フック、エージェント定義をチェックします。
SkillDFreshness: D★ 41Claude Code +9 - 0.498score
configure-ecc
marshall0524
Everything Claude Code のインタラクティブなインストーラー — スキルとルールの選択とインストールをユーザーレベルまたはプロジェクトレベルのディレクトリへガイドし、パスを検証し、必要に応じてインストールされたファイルを最適化します。
SkillDFreshness: D★ 41Claude Code +9 - 0.495score
security-review
marshall0524
認証の追加、ユーザー入力の処理、シークレットの操作、APIエンドポイントの作成、支払い/機密機能の実装時にこのスキルを使用します。包括的なセキュリティチェックリストとパターンを提供します。
SkillDFreshness: D★ 41Claude Code +9 - 0.495score
java-coding-standards
marshall0524
Spring Bootサービス向けのJavaコーディング標準:命名、不変性、Optional使用、ストリーム、例外、ジェネリクス、プロジェクトレイアウト。
SkillDFreshness: D★ 41Claude Code +9 - 0.495score
continuous-learning
marshall0524
Claude Codeセッションから再利用可能なパターンを自動的に抽出し、将来の使用のために学習済みスキルとして保存します。
SkillDFreshness: D★ 41Claude Code +9 - 0.495score
continuous-learning-v2
marshall0524
フックを介してセッションを観察し、信頼度スコアリング付きのアトミックなインスティンクトを作成し、スキル/コマンド/エージェントに進化させるインスティンクトベースの学習システム。
SkillDFreshness: D★ 41Claude Code +9 - 0.495score
cpp-testing
marshall0524
C++ テストの作成/更新/修正、GoogleTest/CTest の設定、失敗またはフレーキーなテストの診断、カバレッジ/サニタイザーの追加時にのみ使用します。
SkillDFreshness: D★ 41Claude Code +9 - 0.495score
nutrient-document-processing
marshall0524
Nutrient DWS API を使用してドキュメントの処理、変換、OCR、抽出、編集、署名、フォーム入力を行います。PDF、DOCX、XLSX、PPTX、HTML、画像に対応しています。
SkillDFreshness: D★ 41Claude Code +9 - 0.492score
eval-harness
marshall0524
Claude Codeセッションの正式な評価フレームワークで、評価駆動開発(EDD)の原則を実装します
SkillDFreshness: D★ 41Claude Code +9 - 0.486score
coding-standards
marshall0524
TypeScript、JavaScript、React、Node.js開発のための汎用コーディング標準、ベストプラクティス、パターン。
SkillDFreshness: D★ 41Claude Code +9 - 0.486score
python-patterns
marshall0524
Pythonic イディオム、PEP 8標準、型ヒント、堅牢で効率的かつ保守可能なPythonアプリケーションを構築するためのベストプラクティス。
SkillDFreshness: D★ 41Claude Code +9 - 0.483score
python-testing
marshall0524
pytest、TDD手法、フィクスチャ、モック、パラメータ化、カバレッジ要件を使用したPythonテスト戦略。
SkillDFreshness: D★ 41Claude Code +9
Signals
- Stars
- 41
- Forks
- 7
- Open issues
- 0
- Last commit (this folder)
- Feb 20, 2026 (8 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
More from marshall0524
- 0.498score
security-scan
marshall0524
AgentShield を使用して、Claude Code の設定(.claude/ ディレクトリ)のセキュリティ脆弱性、設定ミス、インジェクションリスクをスキャンします。CLAUDE.md、settings.json、MCP サーバー、フック、エージェント定義をチェックします。
SkillDFreshness: D★ 41Claude Code +9 - 0.498score
configure-ecc
marshall0524
Everything Claude Code のインタラクティブなインストーラー — スキルとルールの選択とインストールをユーザーレベルまたはプロジェクトレベルのディレクトリへガイドし、パスを検証し、必要に応じてインストールされたファイルを最適化します。
SkillDFreshness: D★ 41Claude Code +9 - 0.495score
java-coding-standards
marshall0524
Spring Bootサービス向けのJavaコーディング標準:命名、不変性、Optional使用、ストリーム、例外、ジェネリクス、プロジェクトレイアウト。
SkillDFreshness: D★ 41Claude Code +9 - 0.495score
continuous-learning
marshall0524
Claude Codeセッションから再利用可能なパターンを自動的に抽出し、将来の使用のために学習済みスキルとして保存します。
SkillDFreshness: D★ 41Claude Code +9 - 0.495score
continuous-learning-v2
marshall0524
フックを介してセッションを観察し、信頼度スコアリング付きのアトミックなインスティンクトを作成し、スキル/コマンド/エージェントに進化させるインスティンクトベースの学習システム。
SkillDFreshness: D★ 41Claude Code +9 - 0.495score
cpp-testing
marshall0524
C++ テストの作成/更新/修正、GoogleTest/CTest の設定、失敗またはフレーキーなテストの診断、カバレッジ/サニタイザーの追加時にのみ使用します。
SkillDFreshness: D★ 41Claude Code +9
Cite this page
iterative-retrieval skill. Agent Mart. https://agentmart.dev/skills/marshall0524-iterative-retrieval (last updated 2026-10-24)