Agent SkillsMapleTechLabs/maple › scratchpad

scratchpad

GitHub

从源码光标或选中位置附近的 JSDoc 示例中提取 TypeScript 代码,保存至 scratchpad 目录。支持自动处理 Effect 运行器、保留原样及文件命名冲突处理,便于用户快速查看和测试代码片段。

.context/effect/.agents/skills/scratchpad/SKILL.md MapleTechLabs/maple

触发场景

用户要求提取或复制源码中的 JSDoc 示例 用户请求在 scratchpad 中打开或尝试某个源示例

安装

npx skills add MapleTechLabs/maple --skill scratchpad -g -y
更多选项

非标准路径

npx skills add https://github.com/MapleTechLabs/maple/tree/main/.context/effect/.agents/skills/scratchpad -g -y

不安装直接使用

npx skills use MapleTechLabs/maple@scratchpad

指定 Agent (Claude Code)

npx skills add MapleTechLabs/maple --skill scratchpad -a claude-code -g -y

安装 repo 全部 skill

npx skills add MapleTechLabs/maple --all -g -y

预览 repo 内 skill

npx skills add MapleTechLabs/maple --list

SKILL.md

Frontmatter
{
    "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:

    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:

    Effect.runPromise(program).then(console.log, console.error)
    
  • If the example already contains an Effect runner, the script preserves it.

版本历史

  • 01a5dc6 当前 2026-07-05 18:15

同 Skill 集合

.agents/skills/clickhouse-architecture-advisor/SKILL.md
.agents/skills/clickhouse-best-practices/SKILL.md
.agents/skills/clickhousectl-cloud-deploy/SKILL.md
.agents/skills/clickhousectl-local-dev/SKILL.md
.agents/skills/coss-particles/SKILL.md
.agents/skills/coss/SKILL.md
.agents/skills/react-doctor/SKILL.md
.agents/skills/tinybird-cli-guidelines/SKILL.md
.agents/skills/tinybird-python-sdk-guidelines/SKILL.md
.agents/skills/tinybird-typescript-sdk-guidelines/SKILL.md
.agents/skills/tinybird/SKILL.md
.context/effect/.agents/skills/grill-me/SKILL.md
.context/effect/.agents/skills/jsdocs/SKILL.md
.factory/skills/react-doctor/SKILL.md
skills/maple-audit/SKILL.md
skills/maple-csharp-style/SKILL.md
skills/maple-effect-style/SKILL.md
skills/maple-go-style/SKILL.md
skills/maple-java-style/SKILL.md
skills/maple-kotlin-style/SKILL.md
skills/maple-nextjs-style/SKILL.md
skills/maple-nodejs-style/SKILL.md
skills/maple-onboard/SKILL.md
skills/maple-onboarding-style/SKILL.md
skills/maple-python-style/SKILL.md
skills/maple-rust-style/SKILL.md
.agents/skills/chdb-datastore/SKILL.md
.agents/skills/chdb-sql/SKILL.md
.agents/skills/maple-telemetry-conventions/SKILL.md
.agents/skills/onboarding-cro/SKILL.md
skills/maple-dashboard-widgets/SKILL.md

元信息

文件数
0
版本
01a5dc6
Hash
400186c9
收录时间
2026-07-05 18:15

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-07-14 00:03
浙ICP备14020137号-1 $访客地图$