scratchpad
npx machina-cli add skill filmicgaze/MiChat-desktop/scratchpad --openclawThis skill covers how to use the scratchpad tools (mechanics), basic etiquette, and how to avoid accidental context bloat.
Precedence: – The system prompt overrides this skill. – If another instruction explicitly specifies different scratchpad behaviour for the current task/profile, follow the more specific instruction; otherwise use this baseline for tool usage and safety.
What the scratchpad is:
- A shared workspace surface alongside the transcript (drafting, restructuring, whole-document work). Both the user and the assistant can see and edit its contents via the scratchpad UI.
- It persists across turns while the app is open, but does not survive app restarts. Don’t treat it as long-term profile memory.
- If something must persist beyond this app session, either (a) quote the relevant excerpt into chat, or (b) save it to a document explicitly.
Context discipline (why this matters):
- Context is a limited resource; treat it that way.
- Scratchpad text is not automatically in the model’s context.
- Tool outputs are in context. Large
scratchpad_getcalls or dumping the whole pad into chat will bloat context fast. - Prefer navigation (
scratchpad_meta,scratchpad_find) and small, targeted reads. Pull only what you need for the next step.
Default etiquette (defaults, not hard laws):
- Prefer to summarize and orient in chat (what changed, where to look) rather than re-streaming the full scratchpad contents the user can already see.
- Don’t paste the entire scratchpad into chat by default; it can bloat context and is usually redundant. Quote small, relevant snippets or show specific diffs when that clearly helps.
- Open/edit the scratchpad only when the user asks, or when it’s clearly the cleanest way to work (long text, restructuring, whole-document edits).
- Prefer reading before overwriting; do not silently erase. If clearing or replacing, say so briefly.
- When you’re asked to put an existing doc into the scratchpad for editing, use the actual content of that doc as the
scratchpad_settext. Don’t substitute placeholders; the whole point is to have the working text there. - Remember: the user can see and edit the scratchpad. Treat it as a joint workbench, not a private notebook.
Recommended flow (default):
- Orient with
scratchpad_meta()when you’re unsure of size or whether it changed. - Locate with
scratchpad_find(query, ...)when you need a specific passage/heading. - Read minimally with
scratchpad_get(start=..., max_chars=...)and page as needed.
When to ask “are you sure?” (gentle check):
- If the user asks to paste/echo the entire scratchpad into chat or to retrieve a very large chunk via
scratchpad_get, mention that it may bloat context and is usually redundant with the scratchpad UI, and suggest:- quoting only the relevant section, or
- keeping it in the scratchpad and working by headings/sections, or
- saving to / editing via documents tools if it’s a stable file.
Writing and size limits:
scratchpad_set/scratchpad_appendmay enforce a size cap. If a write fails due to the cap, say so and suggest reducing content or clearing first.
Allowed tools:
- scratchpad_open
- scratchpad_meta
- scratchpad_find
- scratchpad_get
- scratchpad_set
- scratchpad_append
- scratchpad_clear
Source
git clone https://github.com/filmicgaze/MiChat-desktop/blob/main/profiles/_global/skills/scratchpad/SKILL.mdView on GitHub Overview
The scratchpad is a shared workspace alongside the transcript for drafting, restructuring, and whole-document work. It persists across turns while the app is open but does not survive app restarts, so it isn't long-term memory. Use proper context discipline and etiquette to avoid unnecessary context bloat while collaborating on content.
How This Skill Works
The scratchpad is a joint, editable surface visible to both user and assistant. It persists only during the app session; scratchpad content is not automatically loaded into the model context. Use targeted tools (scratchpad_meta, scratchpad_find, scratchpad_get) and avoid dumping the entire pad; follow the recommended flow to read, locate, and edit content without overloading context.
When to Use It
- To orient on size or recent changes, run scratchpad_meta() before acting.
- To locate a specific passage or heading, use scratchpad_find(query, ...).
- To read a small portion for the next step, use scratchpad_get(start=..., max_chars=...) and page as needed.
- To edit or overwrite the scratchpad content, use scratchpad_set or scratchpad_append (mind the size cap).
- When handling an external document for editing, load exact content into the scratchpad with scratchpad_set rather than placeholders.
Quick Start
- Step 1: Orient with scratchpad_meta() to check size and changes.
- Step 2: Locate needed content with scratchpad_find(query, ...).
- Step 3: Read just what you need with scratchpad_get(start=..., max_chars=...) and page as needed.
Best Practices
- Orient first with scratchpad_meta() to gauge size and changes.
- Use scratchpad_find() for targeted navigation to a passage or heading.
- Read minimally with scratchpad_get(start, max_chars) to avoid context bloat.
- Quote small, relevant snippets or diffs rather than dumping the whole scratchpad.
- Open/edit the scratchpad only when asked or when it’s the clearest way to work; clearly state if you clear or replace content.
Example Use Cases
- Collaborative product spec: locate the 'Pricing' section with scratchpad_find and quote the change without pasting the entire doc.
- Long user guide: read in small chunks via scratchpad_get to move forward without bloating context.
- Editing an external document: load the exact content into the scratchpad with scratchpad_set for targeted edits.
- Starting fresh: clear the scratchpad and summarize the plan in chat before drafting anew.
- Summarizing edits: provide a brief orientation note of changes in chat rather than reprinting the full scratchpad.