بنقرة واحدة
scratchpad
// Extract the JSDoc example nearest the active source selection or cursor into ./scratchpad as a TypeScript file. Use when the user asks to dump, copy, open, or try a source example in scratchpad.
// Extract the JSDoc example nearest the active source selection or cursor into ./scratchpad as a TypeScript file. Use when the user asks to dump, copy, open, or try a source example in scratchpad.
| name | scratchpad |
| description | Extract the JSDoc example nearest the active source selection or cursor into ./scratchpad as a TypeScript file. Use when the user asks to dump, copy, open, or try a source example in scratchpad. |
Use this skill to create a scratchpad TypeScript file from the JSDoc **Example**
nearest the user's active source cursor or selection.
Determine the source path and line:
Run:
node .agents/skills/scratchpad/scripts/extract-example.mjs <source-path> <line>
If the script exits with code 2 because there is no obvious runner, ask the user whether to preserve the example exactly, name an Effect value to run, or cancel.
--mode preserve.--runner <identifier>.Report the created path as a clickable file link. This is the deterministic way to open it in the code pane.
Do not run the scratchpad file unless the user explicitly asks.
The script chooses the example whose **Example** section contains the line;
otherwise it chooses the first following example; otherwise the nearest
previous example.
Filenames are derived from the source file and example title, for example
scratchpad/Schedule-retrying-and-repeating-effects.ts.
Existing files are not overwritten. The script appends a numeric suffix.
In auto mode, if a top-level program binding exists, the script appends:
Effect.runPromise(program).then(console.log, console.error)
If the example already contains an Effect runner, the script preserves it.
Write, insert, or update Effect public API JSDoc so it satisfies the jsdocs oxlint rule. Use when adding or fixing JSDoc comments, resolving jsdocs diagnostics, preparing docs for JSON extraction, or reviewing public API documentation.
Interview the user about a plan or design until reaching shared understanding, resolving each branch of the decision tree. Use when user wants to stress-test a plan, get grilled on their design, or mentions "grill me".