Install
openclaw skills install hot-swap-contextBuildable Bring Your Own Context system for AI agents. Use for: creating user-owned or org-owned context vaults, scaffolding typed memory systems, generating MCP-native context layers, building portable bundle workflows, migrating context across runtimes, and auditing long-running agent memory systems.
openclaw skills install hot-swap-contextUse this skill to build, audit, or migrate a Bring Your Own Context system for agents. Treat durable context as infrastructure that should outlive any one model, chat product, or agent runtime.
Use this skill when the user wants any of the following:
Do not use this skill for simple one-chat personalization. Use it when the problem is architectural, portable, or long-running.
Do not stop at guidance when the user wants a working system. Build the workspace, generate the MCP server, validate the output, and leave behind runnable artifacts.
Apply these shifts before building anything.
Choose the path that matches the task.
| Situation | Action |
|---|---|
| Building a new context system | Follow the Creation workflow and run the builder script |
| Auditing an existing agent or product | Follow the Audit workflow |
| Packaging or migrating context between tools or teams | Follow the Migration workflow |
Follow these steps in order.
Identify the ownership mode first: personal, team, or enterprise.
Then map the six minimum design inputs:
Read references/context_architecture.md before proposing any storage or retrieval design.
Do not allow the system to collapse into one generic memory blob.
Define at least these categories unless there is a clear reason not to:
Use templates/memory_object.md to define each memory object class.
Specify the following components explicitly:
Use templates/context_manifest.yaml to record the architecture and ownership model.
When the user wants a real system, run:
python /home/ubuntu/skills/portable-context-os/scripts/init_context_os.py <output_dir> --name <system_name> --ownership <personal|team|enterprise> --goal <goal> --source-runtime <source> --target-runtime <target>
This builder must generate all of the following inside the target workspace:
| Output | Purpose |
|---|---|
context_manifest.yaml | Architecture, ownership, routing, and runtime definition |
governance_policy.md | Memory rules and policy surface |
eval_scorecard.md | Evaluation and feedback-loop baseline |
feedback_log.md | Retrieval misses, corruption risks, governance failures, portability failures |
memory_objects/ | Typed memory storage |
artifacts/ | First-class artifact store |
tools/build_context_bundle.py | Local bundle rebuild utility |
mcp_server/server.py | Working MCP server scaffold |
mcp_server/requirements.txt | Runtime dependency list |
Write rules for:
Use templates/governance_policy.md and read references/evaluation_and_governance.md.
Do not declare success after file generation alone. Validate that the generated server loads and can inspect the workspace.
Run:
python <workspace>/mcp_server/server.py --dry-run
If the user wants the server fully runnable in the current environment, install runtime dependencies and validate again.
Run:
python <workspace>/tools/build_context_bundle.py <workspace>
Use the generated bundle manifest for handoff, migration, or review.
Replace placeholder values, refine routing rules, add real memory objects, and populate the artifact store. Treat the generated workspace as a working starter system, not as final truth.
Use this path when the user already has an agent, product, or memory system.
references/evaluation_and_governance.md.context_manifest.yaml and eval_scorecard.md.init_context_os.py.Use this path when the user wants to move context across models, tools, teams, or employers.
Use scripts/build_context_bundle.py after normalizing the source materials.
The generated MCP server should expose a usable BYOC interface rather than a placeholder.
At minimum, the generated server should support:
| Capability | Why it matters |
|---|---|
| Describe context system | Confirms the server sees the manifest and workspace |
| List memory objects | Enables typed retrieval |
| Get memory object | Enables precise inspection |
| Upsert memory object | Enables writeback into the context vault |
| Delete or tombstone memory object | Enables governance and forgetting |
| List artifacts | Preserves artifacts as first-class memory |
| Build portable bundle | Keeps portability live, not theoretical |
| Append feedback log | Maintains the self-improving loop |
Prefer tools for state changes, resources for readable workspace files, and prompts for controlled memory-review flows.
Activate this loop whenever the skill runs.
When using this skill, produce deliverables that are inspectable, editable, and runnable.
At minimum, aim to leave behind:
| Deliverable | Purpose |
|---|---|
context_manifest.yaml | Architecture, ownership, interfaces, and routing summary |
| memory object definitions | Typed memory model |
| governance policy | Rules for creation, retention, access, and deletion |
| evaluation scorecard | Retrieval, portability, and trust metrics |
| portable bundle manifest | Reviewable handoff and migration artifact |
| working MCP server scaffold | Live interface into the owned context system |
Read resources only when needed.
references/context_architecture.md when designing the system shape.references/paradigm_shifts.md when the user wants the deeper conceptual framing or a strategy memo.references/evaluation_and_governance.md when auditing trust, deletion, portability, or evaluation.templates/ files as editable starting points.scripts/init_context_os.py to build a new workspace and MCP server.scripts/build_context_bundle.py to summarize and package a workspace.Optimize for owned, typed, governed, portable context. Do not optimize for the illusion of memory if the resulting system still traps the user inside one runtime.