Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

rlm-query

БесплатноБез исполняемых скриптовНе проверен

Spawn sub-agent to process focused context and return structured result

jmaglyот jmagly★ 233 звезды на GitHub

Об этом скилле

RLM Query

Spawn a focused sub-agent to process a specific portion of context and return a structured result. This is the command equivalent of RLM's llm_query() function.

Core Philosophy

Sub-agents receive ONLY the specified context, not the full conversation history. This prevents context overload and improves output quality by enforcing focused, single-purpose queries.

Usage

/rlm-query <context-file> <sub-prompt>
/rlm-query <glob-pattern> <sub-prompt> --output result.txt
/rlm-query file.ts "extract all function names" --model haiku
/rlm-query "src/**/*.test.js" "count total assertions" --depth 2

Parameters

context-file (required)

File path or glob pattern specifying the context source.

Valid patterns:

  • Single file: src/auth/login.ts
  • Glob pattern: src/**/*.test.ts
  • Multiple files: src/auth/*.ts

Context loading:

  • Files matching pattern are read and provided to sub-agent
  • If pattern matches multiple files, all are included
  • Large file sets (>10 files) should be avoided (use filtering)

sub-prompt (required)

The specific task for the sub-agent. Should be:

  • Focused and specific (single responsibility)
  • Clear output format expectation
  • Self-contained (no references to parent conversation)

Good sub-prompts:

  • "Extract all exported function names as JSON array"
  • "Identify security issues and list in bullet format"
  • "Count total test assertions and return as integer"
  • "Summarize this function's purpose in one sentence"

Poor sub-prompts (avoid):

  • "Analyze this" (too vague)
  • "Look at this and tell me what you think" (no format)
  • "Check if this relates to the earlier discussion" (references parent context)

--model (optional)

Override the default model for the sub-agent.

Available models:

  • opus - Highest capability (expensive, for complex analysis)
  • sonnet - Balanced (default for most queries)
  • haiku - Fast and cheap (for simple extraction)

Model selection guidance (per REF-089 Appendix B; GRADE: LOW, peer-review pending):

  • Use haiku for: counting, extracting simple patterns, yes/no questions
  • Use sonnet for: summarization, moderate analysis, code review
  • Use opus for: complex reasoning, architectural decisions, multi-step analysis

RLM root vs sub-agent: When rlm-query itself dispatches sub-calls (recursion via --depth >1), the root agent should be coding-capable (sonnet or opus). Per REF-089, "Qwen3-8B (non-coder) struggled without sufficient coding capabilities." Sub-agents performing simple extraction can safely be haiku; sub-agents performing analysis or synthesis should be sonnet or higher.

Output token limits: RLM root agents emit code, which can be verbose. Models with output token limits below 4k will underperform. Surface a warning when the configured model has lower limits.

--output (optional)

Save the sub-agent's response to a file instead of returning inline.

Use cases:

  • Intermediate results in multi-stage workflows
  • Large outputs that would clutter conversation
  • Results that need to persist for later reference

Behavior:

  • File is created/overwritten with sub-agent response
  • Command returns path to file instead of full content
  • File can be used as input to subsequent rlm-query calls

--neighbors-of (optional, requires aiwg index)

Resolve the context source from the artifact index's dependency graph instead of from a glob pattern. Pass an artifact ID (path or REF-XXX identifier) — the skill resolves its neighbors and dispatches the sub-prompt over them.

Requires: aiwg index capability available (built and reachable). When the index is unavailable, the skill errors with a remediation pointer.

Resolution:

# At depth=1 (default), maps directly to the index CLI:
aiwg index neighbors --graph <graph> --node <id> --direction <dir> --json

# At depth >1, the skill expands recursively by calling neighbors on each
# result up to <N> hops, deduplicating along the way.

--direction <in|out|both> (optional, with --neighbors-of)

Restrict which side of the dependency graph to traverse. Defaults to both. Aligns with the aiwg index neighbors CLI direction flag.

  • in — upstream (artifacts that depend on the node)
  • out — downstream (artifacts the node depends on)
  • both — both directions (default)

--graph (optional, with --neighbors-of)

Which dependency graph to query. Defaults to project. Valid values match the aiwg index neighbors --graph flag (e.g., framework, project, codebase, or a user-defined graph name).

--no-cache (optional, #1203)

Bypass the result cache: do not read existing cache entries, but still write the result for future calls. Use to force a re-run when you suspect external state has changed in a way the cache key would not capture.

--cache-only (optional, #1203)

Read-only audit: error out if the call would not be a cache hit. Useful to verify reproducibilit

Полный SKILL.md на GitHub

Установить rlm-query в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл rlm-query?

Spawn sub-agent to process focused context and return structured result

Как установить скилл rlm-query?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл rlm-query запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить rlm-query с