skills/output-style-manager/SKILL.md
读取和写入输出风格目录的工具技能。当用户需要:(1)读取输出风格文件,(2)写入/创建输出风格文件,(3)管理输出风格目录,(4)解析风格文件格式时使用。
npx skillsauth add dwsy/agent output-style-managerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
读取和写入输出风格目录的工具,用于操作输出风格文件。
| 范围 | 路径 |
|-----|------|
| 全局 | ~/.pi/output-styles/ |
| 项目 | .pi/output-styles/ |
cat ~/.pi/output-styles/<style-name>.md
cat .pi/output-styles/<style-name>.md
ls -la ~/.pi/output-styles/
ls -la .pi/output-styles/
cat ~/.pi/output-styles/active.json
cat .pi/output-styles/active.json
cat > ~/.pi/output-styles/<style-name>.md << 'EOF'
---
name: style-name
description: Style description
keepCodingInstructions: true
---
Your style content here.
EOF
trash ~/.pi/output-styles/<style-name>.md
trash .pi/output-styles/<style-name>.md
echo '{"name": "style-name"}' > ~/.pi/output-styles/active.json
echo '{"name": "style-name"}' > .pi/output-styles/active.json
---
name: my-style
description: My custom output style
keepCodingInstructions: true
---
Your custom output style instructions here.
Frontmatter 字段:
name(必需):风格名称description(可选):风格描述keepCodingInstructions(必需):true/falsetest -f ~/.pi/output-styles/<name>.md && echo "exists" || echo "not found"
awk '/^---$/{if(p)exit;p=1;next}p' ~/.pi/output-styles/<name>.md
sed -n '/^---$/,/^---$/p' ~/.pi/output-styles/<name>.md | head -n -1 | tail -n +2
for style in style1 style2 style3; do
cat > ~/.pi/output-styles/$style.md << EOF
---
name: $style
description: Description for $style
keepCodingInstructions: true
---
Content for $style.
EOF
done
tar -czf output-styles-backup.tar.gz ~/.pi/output-styles/
tar -czf output-styles-backup.tar.gz .pi/output-styles/
这些风格在扩展代码中定义,不在文件系统中:
| 名称 | 描述 |
|-----|------|
| default | 高效完成编码任务 |
| explanatory | 解释实现选择 |
| learning | 实践练习模式 |
| coding-vibes | 充满活力的编码伙伴 |
| structural-thinking | 结构化思维 |
当用户请求创建输出风格但未明确指定风格特征时,使用以下 CoT 链路进行语义识别和风格生成。
分析用户的对话历史和当前请求,识别以下维度:
| 维度 | 检测指标 | 可能值 | |-----|---------|--------| | 语言风格 | 表达方式、语气、用词 | 正式/随意/活泼/严肃 | | 详细程度 | 回复长度、解释深度 | 简洁/中等/详细 | | 交互偏好 | 提问方式、反馈需求 | 直接/引导式/协作式 | | 情感倾向 | 情绪表达、鼓励需求 | 中性/积极/鼓励 | | 技术深度 | 术语使用、抽象程度 | 实用/理论/平衡 | | 结构偏好 | 信息组织方式 | 自由/结构化/分步骤 |
分析用户消息示例:
关键词映射: | 关键词 | 推断风格 | |-------|---------| | 解释、为什么、原理 | explanatory | | 学习、练习、试试 | learning | | 简洁、快速、直接 | default | | 嘿、兄弟、哈哈 | coding-vibes | | 架构、设计、模块 | structural-thinking |
根据识别结果,选择最匹配的内置风格:
| 用户特征 | 推荐风格 |
|---------|---------|
| 简洁、高效、直接 | default |
| 需要解释、理解原理 | explanatory |
| 学习导向、动手实践 | learning |
| 轻松、活泼、鼓励 | coding-vibes |
| 架构设计、结构化思维 | structural-thinking |
如果内置风格不匹配,按以下格式生成:
---
name: <生成的风格名称>
description: <基于用户特征生成的描述>
keepCodingInstructions: true
---
<根据识别维度生成的风格指令>
生成模板:
---
name: <风格名称>
description: <一句话描述>
keepCodingInstructions: true
---
<语言风格指令>
<详细程度指令>
<交互偏好指令>
<情感倾向指令>
<技术深度指令>
<结构偏好指令>
生成示例:
---
name: friendly-mentor
description: 友好的导师风格,平衡详细和简洁
keepCodingInstructions: true
---
保持友好和鼓励的语气。
提供清晰的解释,但不过于冗长。
在关键步骤暂停,确认用户理解。
使用简单的类比帮助理解复杂概念。
提供代码示例后,询问是否需要更多细节。
验证生成的风格是否满足用户需求:
将验证通过的风格写入文件:
cat > ~/.pi/agent/output-styles/<style-name>.md << 'EOF'
---
name: <style-name>
description: <description>
keepCodingInstructions: true
---
<style-content>
EOF
激活新风格并向用户确认:
echo '{"name": "<style-name>"}' > ~/.pi/output-styles/active.json
反馈示例:
已为你创建并激活风格 "<style-name>"
描述:<description>
基于你的对话风格,这个风格会:<简要说明>
如需调整,使用 /output-style:edit <style-name>
"我想要一个适合我的风格,我喜欢详细解释但不要太啰嗦"
步骤 1:语义识别
步骤 2:生成风格
---
name: balanced-explanatory
description: 平衡的详细解释风格,清晰但不冗长
keepCodingInstructions: true
---
提供清晰的解释说明代码意图。
使用要点列表组织信息。
每个主要步骤后简要说明原因。
避免过度解释显而易见的内容。
关键概念使用类比帮助理解。
保持回复结构化,使用标题分段。
步骤 3:验证
步骤 4-5:写入并激活
已为你创建并激活风格 "balanced-explanatory"
描述:平衡的详细解释风格,清晰但不冗长
基于你的对话风格,这个风格会:提供清晰解释但控制长度
如需调整,使用 /output-style:edit balanced-explanatory
testing
Best practices for writing and maintaining high-quality role memories.
documentation
工作文档枢纽,强制执行 SSOT(Single Source of Truth)原则,管理 `docs/` 目录下的架构决策、设计文档、Issues(任务规划)、PRs(变更记录)。支持 GitHub 协作开发模式。
tools
Allows to interact with web pages by performing actions such as clicking buttons, filling out forms, and navigating links. It works by remote controlling Google Chrome or Chromium browsers using the Chrome DevTools Protocol (CDP). When Claude needs to browse the web, it can use this skill to do so.
development
Vercel 设计指南 - 构建高质量 Web 应用的最佳实践,包含现代 UI/UX 原则、性能优化和无障碍标准。