dr-context-pipeline
Deterministic memory/context pipeline for agents: route a user message, retrieve relevant memory snippets, compress into a cited Context Pack (sources are snippet IDs), lint, and fall back safely. Prerequisite: a file-based memory layout with memory/always_on.md + topic files (works out-of-the-box with dr-memory-foundation). Use when building or standardizing agent memory, reducing prompt bloat, implementing retrieval+compression, creating a context pack, designing a memory pipeline, adding lint gates, or setting up golden regression tests for agent context. After install, users can simply say: Apply dr-context-pipeline as default behavior.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/daniel-refahi-ikara/dr-context-pipelineDR Context Pipeline (retrieval + compression + lint)
Use this skill to standardize how an agent loads memory into its prompt for correctness.
Prerequisites
- A file-based memory layout that includes
memory/always_on.md(policy header + topic catalog) and topic files undermemory/topics/. - Recommended: install dr-memory-foundation (or implement an equivalent structure).
Apply to this workspace
When the user asks to apply this skill (for example: Apply dr-context-pipeline as default behavior), do this:
- Ensure the pipeline files/references are present.
- Inspect
AGENTS.md. - Patch
AGENTS.mdso the context pipeline becomes the default workflow. - Preserve existing content; patch surgically.
- Confirm what changed.
This apply flow should be idempotent: do not duplicate sections if already applied.
Operating procedure (default)
- Load the always-on policy + topic catalog (your
memory/always_on.md). - Route the message deterministically (task type + caps) using
references/router.yml. - Retrieve top relevant snippets from your memory store; emit a Retrieval Bundle JSON (see schema).
- Compress Retrieval Bundle → Context Pack JSON using
references/compressor_prompt.txt.- IMPORTANT: Context Pack
sourcesMUST be snippet IDs only (S1,S2, …).
- IMPORTANT: Context Pack
- Lint the Context Pack. If lint fails, skip compression and fall back to raw retrieved snippets.
- Call the main reasoning model with: always-on policy header + Context Pack (+ raw snippets for high-stakes tasks) + user message.
What to read / use
- Router + caps:
references/router.yml - Compressor prompt:
references/compressor_prompt.txt - Retrieval Bundle schema:
references/schemas/retrieval_bundle.schema.json - Context Pack schema:
references/schemas/context_pack.schema.json - Golden tests starter suite:
references/tests/golden.json
Notes
- Keep “always-on policy header” tiny (invariants only). Put everything else behind retrieval.
- If you need deterministic snippet IDs, follow the stable ordering guidance in
references/deterministic_ids.md.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-daniel-refahi-ikara-dr-context-pipeline": {
"enabled": true,
"auto_update": true
}
}
}Related Skills
dr-api-execution-bootstrap
Installer/enforcer skill for direct API execution workflows. On activation, it immediately applies a direct-first API execution policy to workspace startup/default files, prefers in-session execution, disables subagent fallback unless explicitly requested, keeps responses concise, and validates the setup. Use when you want an agent to run chained API calls directly and consistently with minimal chatter, or when you want to bootstrap a workspace for fast direct API execution by default.
dr-memory-foundation
Opinionated, file-based memory layout for OpenClaw-style agents: dashboards (now/open-loops/automation), topic files, glossary, and an always-on policy+topic catalog. Use when setting up or reorganizing agent memory, creating a memory folder structure, adding always_on.md, building a topic catalog, or preparing memory files so retrieval+compression pipelines work well.