A standardized prompt assembly framework designed to guarantee AI agent stability by preventing token overflow through intelligent memory orchestration.
The fastest way to install a skill directly from the registry.
npx clawhub@latest install prompt-assemble
Copy the skill folder to one of these locations
~/.openclaw/skills/ <project>/skills/ Priority: Workspace > Local > Bundled
Copy this prompt to OpenClaw to install it automatically.
Help me install prompt-assemble using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).
Get the raw skill files in a ZIP archive.
Prompt Assemble provides a robust foundation for building reliable agents within the Openclaw Skills ecosystem. It addresses the common challenge of API failures caused by context window exhaustion by implementing a Two-Phase Context Construction strategy. This framework treats memory as a discardable enhancement rather than a rigid dependency, ensuring that critical instructions and user inputs are always preserved while supplementary context is managed dynamically.
By centralizing token budget decisions at the assembly layer, Prompt Assemble allows developers to maximize the utility of large context windows in models like Claude 3.5 or GPT-4o without the risk of hitting hard limits. This approach is essential for any production-grade implementation of Openclaw Skills that relies on long-term memory retrieval or complex dialogue histories.
To integrate this framework into your agent, copy the implementation script and configure your model limits. This is a core component for maintaining stable Openclaw Skills.
# Copy the prompt assembler to your project
cp scripts/prompt_assemble.py ./src/agents/utils/
# Basic usage in your agent logic
from prompt_assemble import build_prompt
final_prompt = build_prompt(user_input, memory_search_fn, get_recent_dialog_fn)
| Variable | Default Value | Purpose |
|---|---|---|
MAX_TOKENS |
204,000 | The hard limit of the target model context window |
SAFETY_MARGIN |
0.75 * MAX | The threshold where memory injection is halted |
MEMORY_TOP_K |
3 | Maximum number of memory segments to retrieve |
MEMORY_SUMMARY_MAX |
3 lines | Maximum summarization length for each memory segment |
Loading
A hardware-aware advisor that detects system specs to recommend the best-fitting local LLMs with optimal quantization and speed estimates.

An intelligent proxy that classifies incoming requests by complexity and routes them to the most cost-effective LLM provider.

Conduct multi-source deep research with verifiable citations and interactive follow-up chat via the Caesar API.

A historical mapping tool to explore the legacy of entertainment, nightlife, and cultural venues in Tel Aviv and Haifa.

An automated morning intelligence agent that collects, verifies, and distills high-impact business, technology, and financial news from premium global sources.

A specialized text editor designed to identify and eliminate artificial writing patterns from Polish text to ensure authentic, human-like communication.








































