scratchpad

Extracts JSDoc examples from TypeScript source files into scratchpad files.

1|1|Updated May 11, 2026
One-click install
npx skills add https://github.com/taxmaxi/taxmaxi --skill scratchpad-taxmaxi
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: scratchpad
Source: https://github.com/taxmaxi/taxmaxi/tree/main/repos/effect/.agents/skills/scratchpad
Command: npx skills add https://github.com/taxmaxi/taxmaxi --skill scratchpad-taxmaxi

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Manually copying JSDoc code examples out of Effect source files to try them is tedious and error-prone. This Skill locates the example nearest your cursor or selection and writes it to a ready-to-use TypeScript file in the scratchpad directory. ## Core Features & Use Cases - Nearest-example extraction: Selects the JSDoc **Example** block containing the cursor line, or the closest following or preceding example. - Automatic runner handling: Detects existing Effect runners, appends Effect.runPromise(program) when a top-level program binding exists, or asks how to proceed when no runner is found. - Safe file creation: Generates descriptive filenames from the source file and example title, and never overwrites existing scratchpad files by appending numeric suffixes. - Use Case: While reading packages/effect/src/Schedule.ts, you want to experiment with the retrying example. Invoke the skill at that line and get scratchpad/Schedule-retrying-and-repeating-effects.ts ready to run. ## Quick Start Ask the assistant to extract the JSDoc example at your current cursor position in the active TypeScript file into the scratchpad.

Frequently Asked Questions about scratchpad

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extract a JSDoc example from a TypeScript file into a scratchpad?▼

Run the extraction script with the source path and line number: node .agents/skills/scratchpad/scripts/extract-example.mjs <source-path> <line>. It finds the nearest JSDoc Example block and writes it as a TypeScript file in the scratchpad directory.

How does the script choose which JSDoc example to extract?▼

It selects the example whose section contains the given line. If none contains it, it picks the first example after the line, and otherwise falls back to the nearest previous example in the file.

What happens if the extracted example has no Effect runner?▼

In auto mode the script exits with code 2 and reports that a runner is needed. You can rerun with --mode preserve to keep the example exactly, or --runner <identifier> to append Effect.runPromise for a specific value.

Does the scratchpad extraction overwrite existing files?▼

No. Existing files are never overwritten. When a filename collision occurs, the script appends a numeric suffix such as -2 to create a unique output path.

Can I extract an example without running it automatically?▼

Yes. The skill only creates the scratchpad file and reports its path as a clickable link. The generated file is not executed unless you explicitly ask for it.