From mjmendo-plugins
Write effective standalone prompts for cmux subagents. Subagents have no memory of the current conversation — every prompt must be a self-contained spec.
How this skill is triggered — by the user, by Claude, or both
Slash command
/mjmendo-plugins:cmux-agents-promptsThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
**1. Files to read first** — list in order, with purpose
1. Files to read first — list in order, with purpose
Read these files before writing anything:
- bots/shared/guardrails.py (style reference — follow this pattern)
- bots/tech-support/rtvi_server.py (the file you are extending)
2. Files to create — exact absolute paths, no ambiguity
Create exactly these files (no others):
- /Users/.../bots/shared/working_memory.py
- /Users/.../bots/tech-support/memory_server.py
3. File ownership — what the agent must NOT touch
Do NOT modify any existing file.
Do NOT touch: bots/shared/vector_memory.py (owned by a parallel agent)
4. Output contract — exact class names, method signatures, key behaviors
Class ConversationSummaryProcessor(FrameProcessor):
- intercepts LLMMessagesFrame between user_agg and llm
- fires when len(messages) > compress_threshold (default: 10)
- calls gpt-4o-mini, replaces old messages with summary system message
- logs: [MEMORY] ConversationSummaryProcessor: compressing N messages → M
5. Style anchor — point to an existing file that exemplifies the expected pattern
Follow the exact style of bots/shared/guardrails.py:
- Same logger format: logger.warning(f"[TAG] ClassName ACTION | ...")
- Same docstring structure (class docstring explains FrameProcessor vs BaseObserver)
- Same copy-extend pattern for server files (copy guardrails_server.py, add imports)
| Anti-pattern | Problem | Fix |
|---|---|---|
| "Implement the memory module" | Too vague — agent guesses | Specify every class and method |
| Relying on conversation context | Agent has none | Inline all necessary context |
| "Agent B reads Agent A's file" when parallel | A's file may not exist yet | Describe A's API in B's prompt by spec |
| Long inline prompt string | Shell quoting breaks on special chars | Always write to temp file with heredoc |
Back to orchestration → /cmux-agents
For isolation decisions → /cmux-agents-isolation
npx claudepluginhub mjmendo/claude-plugins --plugin mjmendo-pluginsCompresses subagent prompts into ≤200-word briefs before spawning to avoid excessive token costs from cold-start re-tokenization.
Guides Claude Code subagent development: agent files, YAML frontmatter, tool/model config, lifecycle/resumption, CLI/SDK usage, priority, built-in agents, troubleshooting via docs delegation.
Guides agent development for Claude Code plugins: file format, YAML frontmatter (name, description, model, color, tools), triggering examples, naming rules, and best practices.