Back to Skills

scratch-workspace

verified

Use when creating temporary files, drafts, experiments, or any content that should not be committed to version control. Ensures proper placement in .claude/.scratch with gitignore configuration.

View on GitHub

Marketplace

han

TheBushidoCollective/han

Plugin

jutsu-scratch

Technique

Repository

TheBushidoCollective/han
60stars

jutsu/jutsu-scratch/skills/scratch-workspace/SKILL.md

Last Verified

January 24, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/TheBushidoCollective/han/blob/main/jutsu/jutsu-scratch/skills/scratch-workspace/SKILL.md -a claude-code --skill scratch-workspace

Installation paths:

Claude
.claude/skills/scratch-workspace/
Powered by add-skill CLI

Instructions

# Scratch Workspace Management

This skill covers proper use of the `.claude/.scratch/` directory for temporary, exploratory, and draft work.

## Purpose

The scratch workspace provides a gitignored location for:

- Draft implementations
- Experimental code
- Temporary test files
- Planning documents
- Any work-in-progress that shouldn't be committed

## Setup Checklist

Before creating scratch files:

1. **Ensure directory exists**

   ```bash
   mkdir -p .claude/.scratch
   ```

2. **Verify gitignore**

   Check `.gitignore` contains:

   ```
   .claude/.scratch
   ```

   If missing, add it:

   ```bash
   echo '.claude/.scratch' >> .gitignore
   ```

## Directory Structure

Organize scratch files by purpose:

```
.claude/
├── .scratch/
│   ├── drafts/           # Work-in-progress implementations
│   │   └── feature-x.ts
│   ├── experiments/      # Exploratory code
│   │   └── perf-test.js
│   ├── notes/            # Planning and notes
│   │   └── architecture.md
│   └── temp/             # Truly temporary files
└── settings.json         # Claude settings (NOT scratch)
```

## Best Practices

### DO

- Create subdirectories for organization
- Use descriptive file names
- Clean up when work is complete
- Move finalized code to proper project locations

### DON'T

- Put sensitive data in scratch (still on disk)
- Use scratch for files that should be committed
- Leave stale scratch files indefinitely
- Put scratch files outside `.claude/.scratch/`

## Workflow

### Starting Exploratory Work

```bash
# Create scratch area
mkdir -p .claude/.scratch/experiments

# Work on experiment
# ... create files in .claude/.scratch/experiments/
```

### Promoting to Real Code

When scratch work is ready:

1. Review and refine the code
2. Move to appropriate project location
3. Delete scratch version
4. Commit the promoted code

### Cleanup

Periodically clean scratch:

```bash
# Review what's in scratch
ls -la .claude/.scratch/

# Remove old experiments
rm -rf .claude/.scratch/ex

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
3085 chars