Recursive Language Model patterns for Claude Code enable handling massive contexts (10M+ tokens) by treating them as external variables. Ideal for operations teams managing large datasets, it integrates with Claude Code to analyze extensive files without direct tool calls.
git clone https://github.com/richardwhiteii/rlm.gitRLM (Recursive Language Model) is an MCP server that allows Claude Code to process massive contexts—up to 10M+ tokens—by loading files as external variables rather than injecting them directly into prompts. Instead of reading large files into context, Claude uses RLM tools behind the scenes to chunk content strategically, run sub-queries on sections, and aggregate results. This approach handles extensive logs, datasets, and codebases without context overflow. You simply ask Claude to analyze a large file, and RLM manages the decomposition automatically. It's designed for operations teams, data analysts, and developers who need to work with files too large for conventional LLM processing.
1. **Prepare Your Dataset**: Save your large file (e.g., JSON, CSV, or text) in a location accessible to Claude Code. Ensure it’s structured for analysis (e.g., rows/columns for tabular data). 2. **Load the Dataset**: Use the rlm command in Claude Code to treat the file as an external variable. Example: ``` rlm --file-path /path/to/large_dataset.json --context-size 10M ``` 3. **Define Your Analysis**: Craft a prompt that specifies the patterns or insights you need. Use placeholders like [SPECIFIC_PATTERNS] to guide the AI. Example: ``` Analyze the dataset for [ANOMALIES] in [TRANSACTION_COLUMN] and highlight [TRENDS] over [TIME_PERIOD]. ``` 4. **Review and Refine**: Examine the AI’s output for accuracy. If the results are too broad, refine your prompt by narrowing the focus (e.g., "Focus only on transactions >$500"). 5. **Export Insights**: Save the AI’s recommendations or summaries to a new file for further action. Use: ``` rlm --export /path/to/output.json ``` **Tip**: For best results, pre-filter your dataset to reduce noise before using rlm. Combine rlm with Claude Code’s built-in tools (e.g., `grep`, `jq`) for initial data cleaning.
Analyze multi-megabyte log files for error patterns without context limits
Extract structured data from large datasets using regex and Python execution
Perform security audits on extensive codebases by chunking and querying sections
Summarize large documentation or prose files by breaking them into manageable pieces
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/richardwhiteii/rlmCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Use rlm to analyze the [LARGE_DATASET] in [FILE_PATH] by treating it as an external variable. Identify [SPECIFIC_PATTERNS] within the dataset and summarize key insights in a structured format. Focus on [TARGET_AREAS] such as anomalies, trends, or outliers. Provide actionable recommendations based on your findings.
After processing the 12.5M-token dataset in `customer_transactions_2023.json`, the rlm identified three critical patterns: 1. **Fraudulent Activity Spike**: 18% of transactions in Q3 2023 exhibited synthetic behavior, with 92% originating from a single IP range (192.168.1.x). The average transaction value in this cluster was $1,245, compared to $89 for legitimate transactions. The pattern suggests a coordinated attack leveraging stolen credit card data. 2. **Seasonal Demand Shift**: Customer purchases for [PRODUCT_CATEGORY_X] surged by 340% during the holiday season (Nov-Dec 2023), with a 67% drop-off in January. This aligns with historical trends but requires inventory adjustments for 2024 to avoid stockouts. 3. **High-Value Customer Attrition**: 12% of customers with >$10K annual spend reduced their activity by 40% in the last 6 months. Further analysis shows 78% of these customers interacted with competitor promotions via email campaigns. **Recommendations**: - Deploy real-time fraud detection for transactions >$1K from the 192.168.1.x IP range. - Increase [PRODUCT_CATEGORY_X] stock by 25% for Q4 2024 and pre-negotiate supplier lead times. - Launch a win-back campaign targeting high-value customers with personalized offers, including a 15% discount on their next purchase. *Note: The full dataset was processed in 4.2 minutes using rlm, with no direct tool calls to the file system.*
AI assistant built for thoughtful, nuanced conversation
Get more done every day with Microsoft Teams – powered by AI
Automate security compliance and monitor real-time security posture seamlessly.
Automate your spreadsheet tasks with AI power
Agentic AI Workflow platform
Connected workspace for docs, wikis, and projects
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan