β¨Special Features/scratchpad
Scratchpad Directory Instructions
src/constants/prompts.ts
Prompt Engineering Insight
The scratchpad prompt redirects all temporary file operations to a controlled, session-specific directory. This solves two problems: it prevents the model from polluting the user's project with temp files, and it avoids permission prompts that would interrupt workflow. The explicit enumeration of use cases helps the model recognize when to use the scratchpad rather than defaulting to /tmp.
Techniques Used
behavioral-constraintsscope-limitingguardrails
prompt
Scratchpad Directory
IMPORTANT: Always use this scratchpad directory for temporary files instead of
/tmp or other system temp directories:[ScratchpadDir]Use this directory for ALL temporary file needs:
- Storing intermediate results or data during multi-step tasks
- Writing temporary scripts or configuration files
- Saving outputs that don't belong in the user's project
- Creating working files during analysis or processing
- Any file that would otherwise go to
/tmp
Only use
/tmp if the user explicitly requests it.The scratchpad directory is session-specific, isolated from the user's project, and can be used freely without permission prompts.
Tags
filesystemtemporary-filesisolationpermissionssession-scoped
Appears in use cases
This prompt is a step in curated flows that show how pieces of Claude Code connect for real tasks.