Continuation Prompt#
Generate a continuation prompt that captures conversation state for resuming work in a new session.
Description#
The cprompt skill snapshots the current conversation context into a structured prompt, writes it to a markdown file, prints it to stdout, and attempts to copy it to the system clipboard when a supported clipboard tool is available. The prompt is written as instructions to a future agent session so work can resume without re-discovery.
Three detail levels control how much context is captured:
short (default) – branch, task, current state, next steps.
medium – adds completed work, decisions, files touched, blockers.
long – full context dump with rationale, ruled-out approaches, open questions, and file paths with line numbers.
Triggers#
Explicit invocation only:
/wf:cprompt
/wf:cprompt short
/wf:cprompt m
/wf:cprompt long
Arguments#
One optional positional argument:
Argument |
Aliases |
Description |
|---|---|---|
|
|
(default) Minimum context to resume: branch, task, next step. |
|
|
Adds: completed work, decisions, files touched, blockers. |
|
|
Full dump: rationale, ruled-out approaches, open questions, file paths with line numbers. |
Workflow#
Parse argument
Normalise the input to lowercase and match against valid options.
Default to
shortif omitted.Reject unrecognised values with a list of valid options.
Gather context
Uses only information already in the conversation – no tool calls, no git commands, no file reads.
Collects: branch, repo, task summary, work completed, decisions, files touched, current state, next steps, blockers, and (for long) ruled-out approaches and key file locations.
Generate prompt
Builds a markdown prompt using the template for the requested detail level.
Written in second person imperative as instructions to a future session.
Write markdown file
Writes to
./resources/agent-docs/CPROMPT.mdwhen./resources/agent-docsexists as a writable directory.Falls back to
/tmp/CPROMPT.mdotherwise.Reports the path that was written.
Copy to clipboard
Auto-detects the available clipboard tool in order:
wl-copy(Wayland),xclip,xsel,pbcopy.Reports a warning if no clipboard tool is found.
Display
Prints the generated prompt to the conversation.
Reports the markdown file path.
Reports clipboard copy success or failure.
Output Format#
The prompt follows a structured markdown template. Example (short):
## Continue: Add cprompt skill to llm-workflow plugin
**Branch:** dev
**Repo:** /home/user/code/llm-workflow
### Status
SKILL.md created and registered. Docs written. Ready for testing.
### Next Steps
- Reload plugins and test `/wf:cprompt` at all three lengths
- Commit changes
Example Usage#
Quick save before clearing context:
> /wf:cprompt
Medium detail before exiting for the day:
> /wf:cprompt m
Full context dump before a long break:
> /wf:cprompt long
Clipboard Detection#
The skill tries clipboard tools in this order:
wl-copy– Wayland compositorxclip -selection clipboard– X11xsel --clipboard --input– X11 (fallback)pbcopy– macOS
If none are found, the prompt is still displayed in the conversation for manual copying.
File Output#
The prompt is also saved as markdown:
./resources/agent-docs/CPROMPT.mdwhen that directory exists and is writable./tmp/CPROMPT.mdwhen./resources/agent-docsis unavailable.
The file is overwritten on each run so it always contains the latest continuation prompt.
Limits#
Conversation context only: Does not run commands or read files. If the conversation has limited context, the prompt reflects that.
Snapshot: The prompt captures state at invocation time. It does not update if work continues afterward.
No auto-exit/clear: The skill generates and copies the prompt. The user must manually run
/exitor/clearafterward.