fabric-rlm

fabric-rlm is a skill for Claude Code from monotykamary/pi-fabric. It costs 44 tokens per session (1,886 once invoked), scanned A, original, MIT.

A method for breaking very large coding tasks into smaller tasks handled by separate agents with fresh context. It is meant for work whose files and findings do not fit comfortably in one context window.

In plain words
What is it for?
Use it for whole-repository audits, large codebase analysis, and multi-file refactors that need separate, non-overlapping investigations.
Why use it?
It prevents oversized repository work from exceeding an agent’s available context and keeps each investigation bounded.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter.

Good fit Use it for whole-repository audits, large codebase analysis, and multi-file refactors that need separate, non-overlapping investigations.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/monotykamary/pi-fabric/fabric-rlm
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add monotykamary/pi-fabric --skill fabric-rlm
Clone the repo
git clone --depth 1 https://github.com/monotykamary/pi-fabric

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 fabric-rlm

README.md
[![agentmods](https://agentmods.dev/badge/skills/monotykamary/pi-fabric/fabric-rlm/github.svg)](https://agentmods.dev/skills/monotykamary/pi-fabric/fabric-rlm)
Your own site
<a href="https://agentmods.dev/skills/monotykamary/pi-fabric/fabric-rlm"><img src="https://agentmods.dev/badge/skills/monotykamary/pi-fabric/fabric-rlm/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for fabric-rlm

Your own site · 80×15
<a href="https://agentmods.dev/skills/monotykamary/pi-fabric/fabric-rlm"><img src="https://agentmods.dev/badge/skills/monotykamary/pi-fabric/fabric-rlm.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,886 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00044 $0.01886
Opus 5 $0.00022 $0.00943
Sonnet 5 $0.00009 $0.00377
Haiku 4.5 $0.00004 $0.00189

Measured 5d ago against content hash 971e9f0b453d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

fabric-rlm 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 5d 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.

skillsets/python/fabric-rlm/SKILL.md · 121 lines

How it starts

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

Fabric Recursive Decomposition — Python

Use recursion for context size, not mere difficulty. Pass only the objective as payloads.task. Orient → delegate non-overlapping context-sized partitions → combine in one Python fabric_exec. Python calls agents.run(runner="pi", recursive=True, ...) directly for oversized partitions, not guest callback helpers. Plain leaves explicitly use recursive=False.

Context is an external variable

Keep source handles, partitions, and intermediate findings guest-local for this invocation. Children inspect paths or receive bounded slices, never the whole corpus. Guest bindings end with each call. For continuation across turns, persist JSON under root-scoped rlm/<rootId>/bindings/... mesh keys; send keys rather than values. For values above the mesh event limit use project-relative files plus digests. Mesh data is project-visible with no automatic TTL: no secrets; clean it up after completion. state is for claims and evidence, not scratch data.

import asyncio
import json

async def ask(task, name, recursive=False, output_schema=None):
    request = {"task": task, "name": name, "runner": "pi", "recursive": recursive, "tools": ["read", "grep", "find", "ls"]}
    if output_schema:
        request["schema"] = output_schema
    result = await agents.run(request)
    if result["status"] != "completed":
        raise RuntimeError(result.get("error") or result["status"])
    return result["value"] if result.get("value") is not None else result["text"]

partition_schema = {"type": "object", "properties": {"partitions": {"type": "array", "maxItems": 12, "items": {"type": "object", "properties": {"label": {"type": "string"}, "paths": {"type": "array", "items": {"type": "string"}}, "recursive": {"type": "boolean"}}, "required": ["label", "paths", "recursive"], "additionalProperties": False}}}, "required": ["partitions"], "additionalProperties": False}
scope = await ask("Partition relevant material into at most 12 non-overlapping context-sized groups. Set recursive=true only if a group cannot fit a child context.\nTask:\n" + π.task, "scope", output_schema=partition_schema)
proposed = scope["partitions"]
failures = []
candidates = []
for index in range(len(proposed)):
    partition = proposed[index]
    label = partition["label"].strip() or "partition-" + str(index + 1)
    paths = []
    for raw in partition["paths"]:
        value = raw.strip().replace("\\", "/")
        while value.startswith("./"):
            value = value[2:]
        while "//" in value:
            value = value.replace("//", "/")
        paths.append(value.rstrip("/"))
    invalid = not paths or any(not value or value in [".", "~"] or value.startswith("~/") or value.startswith("/") or value[1:3] == ":/" or ".." in value.split("/") for value in paths)
    if invalid:
        failures.append({"partition": label, "paths": paths, "status": "not_started", "error": "partition paths must be non-empty project-relative paths without '~' or '..'"})
        continue
    for value in paths:
        candidates.append([len(value.split("/")), len(value), index, label, value])
selected = []
grouped = {}
promoted = []
merged = []
for candidate in sorted(candidates):
    index, label, value = candidate[2], candidate[3], candidate[4]
    covered = None
    for entry in selected:
        if value == entry["path"] or value.startswith(entry["path"] + "/"):
            covered = entry
            break
    if covered:
        merged.append({"partition": label, "path": value, "coveredBy": covered["path"]})
        if proposed[index]["recursive"]:
            promoted.append(covered["index"])
        continue
    selected.append({"path": value, "index": index})
    if index not in grouped:
        grouped[index] = []
    grouped[index].append(value)
partitions = []
for index in range(len(proposed)):
    if index in grouped:
        partitions.append({"label": proposed[index]["label"].strip() or grouped[index][0], "paths": grouped[index], "recursive": proposed[index]["recursive"] or index in promoted})
normalization = {"proposed": len(proposed), "effective": len(partitions), "dispatched": 0, "mergedOverlaps": merged}
if not partitions:
    return {"status": "failed" if proposed else "success", "coverage": {"requested": len(proposed), "dispatched": 0, "completed": 0}, "failures": failures, "normalization": normalization, "result": None if proposed else "No relevant partitions were found."}
runnable = []
recursive_roots = 0
for partition in partitions:
    if partition["recursive"] and recursive_roots >= 2:
        failures.append({"partition": partition["label"], "paths": partition["paths"], "status": "not_started", "error": "recursive root limit reached"})
        continue
    if partition["recursive"]:
        recursive_roots += 1
    runnable.append(partition)

async def analyze(partition):
    task = "Analyze this bounded partition using paths as external context. Return compact evidence-backed findings.\nPartition: " + partition["label"] + "\nPaths:\n" + "\n".join(partition["paths"]) + "\nObjective:\n" + π.task
    try:
        finding = await ask(task, (("recurse " if partition["recursive"] else "analyze ") + partition["label"])[:50], recursive=partition["recursive"])
        return {"partition": partition["label"], "status": "completed", "finding": finding}
    except Exception as error:
        return {"partition": partition["label"], "paths": partition["paths"], "status": "failed", "error": str(error)}

outcomes = []
for offset in range(0, len(runnable), 4):
    batch = runnable[offset:offset + 4]
    settled = await asyncio.gather(*[analyze(partition) for partition in batch])
    outcomes.extend(settled)
    if all(item["status"] == "failed" for item in settled):
        failures.extend([{"partition": item["label"], "paths": item["paths"], "status": "not_started", "error": "not started after an all-failed batch"} for item in runnable[offset + len(batch):]])
        break
completed = [item for item in outcomes if item["status"] == "completed"]
failures.extend([item for item in outcomes if item["status"] == "failed"])
normalization["dispatched"] = len(outcomes)
coverage = {"requested": len(proposed), "dispatched": len(outcomes), "completed": len(completed)}
if not completed:
    return {"status": "failed", "coverage": coverage, "failures": failures, "normalization": normalization, "result": None}
if len(completed) == 1:
    return {"status": "partial" if failures else "success", "coverage": coverage, "failures": failures, "normalization": normalization, "result": completed[0]["finding"], "synthesisSkipped": "One partition completed"}
try:
    result = await ask("Synthesize only completed findings, reconcile duplicates and contradictions, drop unsupported claims, and never infer failed partitions.\nObjective:\n" + π.task + "\nFindings:\n" + json.dumps(completed), "combine")
    return {"status": "partial" if failures else "success", "coverage": coverage, "failures": failures, "normalization": normalization, "result": result}
except Exception as error:
    return {"status": "partial", "coverage": coverage, "failures": failures, "normalization": normalization, "result": None, "synthesisError": str(error), "fallback": completed}

Read the full file on GitHub · 121 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. 5d ago Changed · -164 lines 971e9f0b453d
  2. 13d ago First seen · 285 lines · 44 tokens per session scan A f67aada4a23b

Subscribe to this mod's changes

fabric-rlm is a skill published in the GitHub repository monotykamary/pi-fabric (213 stars, last pushed yesterday), licensed MIT. It adds 44 tokens to every session and 1,886 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-08-30.

Related

Other skills, from other repositories

research-crewai

Multi-agent orchestration framework for autonomous AI collaboration. Use when building teams of specialized agents working together on complex tasks, when you need role-based agent collaboration wi...

GrayCodeAI/starling · 36 tokens

agent-framework-py-release

Use when cutting a Python release for the microsoft/agent-framework monorepo. Triggers on "bump py versions", "cut a python release", "prepare release PR for python", "release py packages", "bump python to X.Y.Z", or similar requests to bump Python package versions and prepare a release PR. Handles all four lifecycle…

microsoft/agent-framework · 103 tokens

crewai-multi-agent

Multi-agent orchestration framework for autonomous AI collaboration. Use when building teams of specialized agents working together on complex tasks, when you need role-based agent collaboration with memory, or for production workflows requiring sequential/hierarchical execution. Built without LangChain dependencies…

davila7/claude-code-templates · 61 tokens

python-package-management

Guide for managing packages in the Agent Framework Python monorepo, including creating new connector packages, versioning, and the lazy-loading pattern. Use this when adding, modifying, or releasing packages.

microsoft/agent-framework · 43 tokens

foundry-hosted-agent-validation

Step-by-step process for validating a Python Foundry hosted agent sample (under python/samples/04-hosting/foundry-hosted-agents/) end to end — running it locally (native runtime and azd ai agent run) and after deploying it to an Azure AI Foundry project with azd. Use this when asked to validate a hosted agent sample.

microsoft/agent-framework · 82 tokens

verify-samples-tool

How to use the verify-samples tool to run, verify, and manage sample definitions in the Agent Framework repository. Use this when adding, updating, or running sample verification.

microsoft/agent-framework · 40 tokens