关于 paw-cra-setup
用于在项目中安装和配置 Pawbytes Creative Suites 模块的 Skill。它收集偏好设置、写入共享及个人配置、登记模块能力,并创建输出目录。
主要功能
- 01读取模块元数据和默认值
- 02写入共享与个人配置
- 03在帮助系统中登记模块能力
- 04更新前移除过期模块条目
- 05创建配置的输出目录
适用场景
- 01在项目中安装 Creative Suites
- 02更新现有模块配置
- 03将 API 密钥保存到个人设置
安装
复制下面的命令,在终端中运行。
npx skills add https:/ / github.com/ pawbytes/ skill-suites --skill paw-cra-setup安装后在 Claude Code 中输入/paw-cra-setup确认已加载。
包含的文件
除 SKILL.md 外,安装时一起下载的参考资料和脚本。
assets/module-help.csvmodule.yamlscripts/merge-config.pymerge-help-csv.py详细介绍
Pawbytes Creative Suites 安装设置
概述
将 Pawbytes Creative Suites 模块安装并配置到项目中。模块标识(名称、代码、版本)来自 ./assets/module.yaml。收集用户偏好并将其写入 Pawbytes 生态系统配置:
{project-root}/.pawbytes/config/config.yaml— 共享项目配置:根级别包含核心设置,另有包含模块专属值的cra:部分。{project-root}/.pawbytes/config/config.user.yaml— 供个人使用、建议加入 gitignore 的设置:API 密钥,以及./assets/module.yaml中任何标记为user_setting: true的变量。这些值仅存放在此文件中。{project-root}/.pawbytes/config/module-help.csv— 将模块功能注册到帮助系统。
两个配置脚本都使用防僵尸模式——写入新条目之前先移除此模块的现有条目,避免保留过时值。
{project-root} 是配置值中的字面标记——切勿将其替换为实际路径。它提示使用该值的大模型:此值相对于项目根目录,而不是技能根目录。
激活时
- 读取
./assets/module.yaml,获取模块元数据和变量定义(code字段cra是模块标识符)。 - 检查
{project-root}/.pawbytes/config/config.yaml是否存在——如果其中已有cra:部分,告知用户这是一次更新。 - 检查
{project-root}/_bmad/config.yaml中是否存在现有配置(旧版 BMad 格式)。如果存在,告知用户可以将旧版配置迁移到新的 Pawbytes 生态系统格式。
如果用户提供了参数(例如 accept all defaults、--headless,或 user name is Alice, fal key is abc123 这样的内联值),将提供的值映射到配置键,其余使用默认值,并跳过交互式提问。最后仍要显示完整的确认摘要。
收集配置
询问用户需要的值,并在方括号中显示默认值。将所有值放在一起呈现,让用户只需回复想要更改的值即可(例如“将 fal_key 更改为 abc123,其余不变”)。切勿让用户“按回车”或“留空”——在聊天界面中,他们必须输入内容才能回复。
默认值优先级(从高到低):现有配置值 > ./assets/module.yaml 中的默认值。
核心配置(仅当尚无核心键时):user_name(默认值:user)、communication_language 和 document_output_language(默认值:English——只询问一次语言,两项键使用相同答案)。其中,user_name 和 communication_language 仅写入 config.user.yaml。
模块配置:读取 ./assets/module.yaml 中每个带有 prompt 字段的变量。使用该提示及其默认值进行提问。
API 密钥(存储在 config.user.yaml 中,不提交到版本控制):
fal_key— 图片/视频生成的必需项elevenlabs_api_key— 可选,用于 AI 配音pexels_api_key— 可选,用于素材媒体调研
写入文件
将收集到的答案按 {"core": {...}, "module": {...}} 的结构写入临时 JSON 文件。然后运行配置合并脚本:
python3 ./scripts/merge-config.py --config-path "{project-root}/.pawbytes/config/config.yaml" --user-config-path "{project-root}/.pawbytes/config/config.user.yaml" --module-yaml ./assets/module.yaml --answers {temp-file}
接着使用帮助 CSV 合并脚本注册功能:
python3 ./scripts/merge-help-csv.py --target "{project-root}/.pawbytes/config/module-help.csv" --source ./assets/module-help.csv --module-code cra
两个脚本都会将结果以 JSON 输出到 stdout。如果任一脚本以非零状态码退出,则显示错误并停止。
创建输出目录
写入配置后,创建已配置的所有输出目录。进行文件系统操作时,解析 {project-root} 标记并创建每个路径:
mkdir -p "{project-root}/.pawbytes/creative-suites"
mkdir -p "{project-root}/.pawbytes/creative-suites/brands"
mkdir -p "{project-root}/.pawbytes/creative-suites/knowledge"
mkdir -p "{project-root}/.pawbytes/creative-suites/daily"
确认
使用脚本的 JSON 输出,显示写入的内容——已设置的配置值、已写入 config.user.yaml 的用户设置、已添加的帮助条目,以及这是全新安装还是更新。然后显示 ./assets/module.yaml 中的 greeting。
结果
确定用户的 user_name 和 communication_language 后,在会话余下时间始终使用这些设置:使用用户配置的姓名称呼用户,并使用其配置的语言进行交流。
设置后的文件结构
{project-root}/
.pawbytes/
config/
config.yaml # Shared config (committed)
config.user.yaml # User settings (gitignored)
module-help.csv # Capability registry
creative-suites/
index.md # Agency memory index
brands/ # Brand guidelines and assets
knowledge/ # Research and references
daily/ # Activity logs