Skip to main content

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.

설치로 이동

소스 정보

저장소
TuYv/ccpm
최근 소스 활동
2026년 6월 28일 00:16
감지된 SKILL.md 언어
영어
스타
1
포크
2

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

파일 탐색기
2 개 파일

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
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. ## Workflow 1. Determine the source path and line: - Use the IDE active file and selection/cursor line when present. - Use an explicit file and line when the user provides them. - If no line or selection is available, ask for it. 2. Run: ```sh node .agents/skills/scratchpad/scripts/extract-example.mjs <source-path> <line> ``` 3. 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. - To preserve exactly, rerun with `--mode preserve`. - To run a specific Effect value, rerun with `--runner <identifier>`. 4. Report the created path as a clickable file link. This is the deterministic way to open it in the code pane. 5. Do not run the scratchpad file unless the user explicitly asks. ## Behavior - 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: ```ts Effect.runPromise(program).then(console.log, console.error) ``` - If the example already contains an Effect runner, the script preserves it.
GitHub에서 보기