スキル一覧に戻る
freedom07

rlm-reasoning

by freedom07

AI Studio Claude Code plugin

0🍴 0📅 2026年1月19日
GitHubで見るManusで実行

SKILL.md


name: rlm-reasoning description: Apply RLM (Recursive Language Model) reasoning pattern for large context processing. Use when analyzing large files, codebases, or documents. Triggers on "RLM pattern", "large file analysis", "selective reading", "PROBE EXTRACT CONFIRM", or when dealing with files over 1000 lines. allowed-tools:

  • Read
  • Grep
  • Glob
  • Task
  • Bash

RLM (Recursive Language Model) Reasoning Pattern

Based on Zhang et al., MIT CSAIL (arXiv:2512.24601)

Core Principle: Context Outside, Not Inside

Never load entire large files into context. Instead, keep data "outside" and access selectively.

4-Step Reasoning Pattern

1. PROBE (Explore)

Search for relevant areas using keywords before reading:

Grep for keywords to find relevant lines
Glob to find related files by pattern

Example:

Grep(pattern="authentication", path="src/")
Glob(pattern="**/auth*.py")

2. EXTRACT (Load Selectively)

Only read the specific sections you need:

Read with offset/limit for specific line ranges
Load only chunks that contain matches

Example:

Read(file_path="src/auth/login.py", offset=50, limit=100)

3. CONFIRM (Verify)

Before answering, verify information against the source:

Re-check that found information matches the question
Validate references actually exist
Cross-reference multiple sources if needed

4. ANSWER (Respond)

Provide verified response based on confirmed evidence.

When to Apply This Pattern

SituationAction
File > 1000 linesPROBE first with Grep, never Read entire
Complex analysisDelegate to Task tool sub-agent
Code generationVerify imports/references exist with Grep
Multiple filesUse Glob to find, then selective Read

Anti-Patterns (Avoid)

# BAD: Loading entire file
Read("large_file.py")  # Don't do this!

# GOOD: Search first, then selective read
Grep("function_name", "src/")
Read("src/file.py", offset=150, limit=50)

Sub-Agent Delegation

For complex multi-step analysis, use Task tool:

Task(
    subagent_type="Explore",
    prompt="Find all authentication-related code and summarize the flow"
)

Verification Checklist

Before providing an answer:

  • Did I search before reading?
  • Did I read only necessary sections?
  • Did I verify references exist?
  • Is my answer based on confirmed evidence?

Additional Resources

Quick Commands

Run the RLM agent directly:

python ~/.claude/skills/rlm-reasoning/scripts/rlm_query.py "your question" /path/to/file

スコア

総合スコア

60/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です