install
source · Clone the upstream repo
git clone https://github.com/yogyoho/Pisuan-Know
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/yogyoho/Pisuan-Know "$T" && mkdir -p ~/.claude/skills && cp -r "$T/src/skills/skill_template_inserter" ~/.claude/skills/yogyoho-pisuan-know-skill-template-inserter && rm -rf "$T"
manifest:
src/skills/skill_template_inserter/SKILL.mdsource content
模板内容插入技能 (Template Inserter Skill)
概述
本技能用于在编辑器中插入模板内容,支持:
- 位置控制: 光标位置、文档末尾、指定位置
- 模板获取: 根据模板ID获取模板内容
- 格式转换: 支持HTML、Markdown等格式
- 插槽标记: 保留模板中的插槽标记供后续填充
核心功能
1. 在光标位置插入
from src.skills.skill_template_inserter import TemplateInserterSkill skill = TemplateInserterSkill() result = await skill.execute( template_id="env_impact_chapter_7", position="cursor", )
2. 在文档末尾插入
result = await skill.execute( template_id="conclusion_template", position="end", )
3. 在指定位置插入
result = await skill.execute( template_id="table_template", position="specific", target_position={ "line": 100, "column": 0, }, )
4. 直接插入内容
result = await skill.execute( content="<p>直接插入的内容</p>", position="cursor", )
参数说明
| 参数 | 类型 | 必需 | 默认值 | 说明 |
|---|---|---|---|---|
| template_id | string | 否* | - | 模板ID |
| content | string | 否* | - | 直接插入的内容 |
| position | string | 否 | "cursor" | 插入位置(cursor/end/specific) |
| target_position | object | 否 | - | 指定位置(position为specific时必需) |
| format | string | 否 | "html" | 内容格式(html/markdown/text) |
*注:template_id 和 content 至少提供一个
返回结果
{ "success": true, "data": { "inserted": true, "content": "<p>插入的内容...</p>", "position": "cursor", "slots": ["project_name", "total_area"] } }
相关技能
- skill-slot-replacer - 插槽替换技能
- skill-retriever - 知识库检索技能