Skip to content
Back to skills

Scratchpad

ASecurity

Use for non-visual temporary, intermediate, or throwaway files — scratch scripts, test fixtures, downloaded data, analysis output, notes between steps, or anything you would otherwise put in /tmp or the working tree. Also use when asked only where the scratchpad is, what is in it, or to clean it up. Do not use this general skill for UI, design, screenshots, rendered variants, image inspection, or visual regressions; those must use visual-scratchpad instead.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 20, 2026
ai-agentsgogit

Security analysis

A100/100

Scanned October 20, 2026

npx -y skills add hacksurvivor/scratchpad --skill scratchpad --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Scratchpad?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Scratchpad
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/hacksurvivor-scratchpad/badge)](https://www.skillsdirectory.com/skills/hacksurvivor-scratchpad)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: scratchpad
description: Use for non-visual temporary, intermediate, or throwaway files — scratch scripts, test fixtures, downloaded data, analysis output, notes between steps, or anything you would otherwise put in /tmp or the working tree. Also use when asked only where the scratchpad is, what is in it, or to clean it up. Do not use this general skill for UI, design, screenshots, rendered variants, image inspection, or visual regressions; those must use visual-scratchpad instead.
metadata:
  trigger: Creating temp files, intermediate results, throwaway scripts, or scratch output
---

# Scratchpad

Every session gets its own working directory, outside the user's project.
Use it for anything that is not a deliverable.

## Get the path

If the exact session path is already present in context, use it directly. If it
is not, call `scratchpad` only when a temporary file is actually needed. It
returns an absolute path that already exists:

```
scratchpad()                    -> /tmp/codex-501/<project-slug>/<session>/scratchpad
scratchpad(subpath: "out.json") -> /tmp/codex-501/.../scratchpad/out.json
```

Passing `subpath` also creates the parent directories, so you can write to the
returned path immediately.

## What belongs here

- Intermediate results and data between steps of a multi-step task
- Throwaway scripts, config files, and test fixtures
- Output that does not belong in the user's project
- Working files during analysis or processing
- Anything that would otherwise go to `/tmp`

## What does not

- Files the user asked you to produce. Those go where the user expects them.
- Anything you need after this session ends. The directory is swept after seven
  days, and its name is tied to this session.

## Why it matters

The directory sits outside the repository, so nothing written there appears in
`git status` or risks being committed by accident. It is also scoped to this
session, so parallel work on the same project does not collide.

Write there directly — do not `mkdir` first, and do not check whether it exists.

## Housekeeping

- `scratchpad_list` — show what is in the current scratchpad, with sizes
- `open_html` — open one self-contained HTML file as a sandboxed interactive
  artifact for the user
- `show_image` — return one exact rendered image inline to the user without
  file links or Web Preview
- `scratchpad_clean(scope: "current")` — empty this session's directory
- `scratchpad_clean(scope: "old")` — remove directories from previous sessions

Only use `/tmp` directly if the user explicitly asks for it.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.