技能圖譜SKILLSGROVE
技能圖譜/效率工具/aiworkskills/wechat-article-skills/aws-wechat-article-assets

aws-wechat-article-assets

安裝

$npx skills add https://github.com/aiworkskills/wechat-article-skills --skill aws-wechat-article-assets
$git clone --depth 1 https://github.com/aiworkskills/wechat-article-skills.git /tmp/wechat-article-skills && mkdir -p ~/.claude/skills && cp -r /tmp/wechat-article-skills/skills/aws-wechat-article-assets ~/.claude/skills/aws-wechat-article-assets
請幫我安裝這個 Agent Skill:https://github.com/aiworkskills/wechat-article-skills/tree/ca036f75f4bac4fcefe6eaedd8d22d97bf8c92ca/skills/aws-wechat-article-assets ,先閱讀它的 SKILL.md 和指令碼,確認安全後再安裝到我的技能目錄。

簡介

原文描述 · Apache-2.0公众号素材|业务资料库|预设包|.aws 预设包|主题包|品牌包|aiworkskills.cn — 用户业务资料库与预设包管理:业务资料按产品名组织在 `.aws-article/products/{产品名}/`(介绍 .md 直挂产品根 + 配图归 `images/` 子目录含同名说明 .md),AI 与用户对话产出业务介绍内容时引导用户保存;图片入库走 `product_image_ingest.py --product <产品名> --stem <中文名>`。导入 .aws ZIP 预设包(本地文件或 `https://aiworkskills.cn/**/*.aws` URL)合并主题/配色/字体配置到 `.aws-article/presets/`;`config.yaml` 仅本地不存在时从包内复制,已存在则 stdout 输出差异 JSON 不覆盖。面向内容运营、品牌团队、设计支持岗。触发词:「素材库入库」「stock images」「上传图到素材库」「.aws」「预设包」「导入预设」「主题包」「aiworkskills.cn 链接」「.aws 下载地址」。
以下 SKILL.md 內容轉載自 aiworkskills/wechat-article-skills(提交 ca036f7),依據 Apache-2.0 許可證轉載正文(文字未改動;僅省略檔案頭後設資料、將圖片顯示為連結,超長內容會截斷);版權歸 owner or entity authorized by 所有。許可證:LICENSE。僅展示說明檔案,附帶指令碼請在原倉庫檢視。

用户业务资料库与预设(Assets)

业务资料按产品名分目录 — .aws-article/products/{产品名}/ 直挂业务介绍 .md、images/ 存配图(含同名说明 .md)。写涉及用户自身业务的文章/配图前必须先查这里;新生成的业务介绍内容应引导用户保存到这里。预设包合并到 .aws-article/presets/。

套件说明 · 本 skill 属 aws-wechat-article-* 一条龙套件(共 9 个 slug,入口 aws-wechat-article-main)。跨 skill 的相对引用依赖同一 skills/ 目录,建议一并 clawhub install 全套。源码:https://github.com/aiworkskills/wechat-article-skills

能力披露(Capabilities)

本 skill 管理本地业务资料库与预设包,可选从 aiworkskills.cn 域下载 .aws 预设包(ZIP)。

  • 凭证:无(但导入 .aws 会把包内密钥写进仓库根 aws.env,见下)
  • 网络:可选 https://*.aiworkskills.cn/**/*.aws 下载预设包。白名单强制:仅 HTTPS + aiworkskills.cn 及其子域,非白名单直接报错退出。--allow-any-host 可放宽,调试用
  • 文件读:用户指定的本地图片或 .aws 文件;引导入库前会 ls .aws-article/products/ 看已有产品名
  • 文件写:
    • .aws-article/products/{产品名}/*.md(业务介绍,AI 用 Write 工具直接落库)
    • .aws-article/products/{产品名}/images/*(图片 + 同名 .md,由脚本写)
    • .aws-article/presets/<白名单子目录>/*、.aws-article/downloads/*.aws、.aws-article/tmp/*
    • 仓库根 aws.env:导入 .aws 时按映射表增量写入密钥(覆盖现有键前自动备份 aws.env.bak.{ts},stderr 只打印键名不打印值)
  • 归档安全:解压 .aws(ZIP)到 .aws-article/tmp/。已内置 ZIP slip 防御——逐项校验成员路径,拒绝绝对路径、.. 段、或解析后指向解压目录外的路径,任一违反立即退出且不写入任何文件
  • shell:仅 {python} {baseDir}/scripts/ 下的 product_image_ingest.py、import_presets_aws.py

除 aws.env 外,所有写入都限制在仓库根的 .aws-article/ 内。

单独安装可用:两个脚本都不依赖兄弟 skill,只要有 .aws-article/ 目录就能工作。

三件事

能力 说明
业务介绍 .md 入库 对话中产出的业务介绍 → products/{产品名}/<文件名>.md(Write 工具直接落库,无脚本)
业务图入库 用户业务图 → products/{产品名}/images/ + 同名说明 .md(脚本,--product 必填)
预设包 .aws ZIP(本地文件或 https://aiworkskills.cn/**/*.aws)→ 合并 presets/ 白名单子目录

设计意图(必读)⛔

.aws-article/products/{产品名}/ 是用户自家业务(卖货 / 卖软件 / 卖服务 / 自媒体 IP)的资料库——既是 AI 写业务相关内容时的底稿来源,也是 AI 与用户协作产出新介绍时的保存目的地。

.aws-article/products/{产品名}/
├─ 项目介绍.md                # 业务介绍 .md 直挂产品根(命名按用户行业:服务介绍.md / 品牌介绍.md…)
├─ (其他业务文档.md)
└─ images/
   ├─ 配置首页.png
   └─ 配置首页.md             # 图片说明 .md(同名)

双向触发:

方向 触发条件 行为
读 当前任务涉及用户自家业务(对外介绍 / 教程 / 案例 / 自家安利 / 业务配图) 先 ls .aws-article/products/,识别相关产品,读它根下的 *.md、查 images/ 同名 .md,把已有素材当底稿与配图候选
写 AI 刚生成或改写的内容语义属于用户业务介绍 走下面「业务介绍 .md 入库」;用户说「保存为产品介绍」等也走这条

什么时候不要触发见 branches.md「一」。

一、业务介绍 .md 入库

无需脚本,AI 用 Write 工具直接落库。两种触发:

  • AI 主动识别:刚生成/改写的内容明确属于用户自家业务介绍(产品 / 服务 / 品牌 / 项目 / 团队 / 业务范围)时提示用户:

    「这段是 [产品名] 的业务介绍,要不要保存到产品资料库?我可以存到 .aws-article/products/{产品名}/{文件名}.md,下次写涉及业务的文章时会自动用上。」

  • 用户主动指令:「保存为产品介绍 / 业务介绍 / 服务介绍 / 入库到产品 / 存到产品资料库」等。

保存流程:

  1. 确认产品名:ls .aws-article/products/,已有目录提示复用;新产品向用户拿名字。
  2. 确认文件名:默认 项目介绍.md;可改成贴用户行业的 产品介绍.md / 服务介绍.md / 品牌介绍.md。
  3. 建目录:mkdir -p .aws-article/products/{产品名}/images/(即便暂时为空也把骨架建齐)。
  4. 写入:Write 工具落到 .aws-article/products/{产品名}/{文件名}.md。
  5. 反馈:「已存到 <完整路径>,下次涉及 [产品名] 业务的文章会自动用上」。

二、业务图入库

脚本不会读图——读图定文件名、写画面描述是 Agent 的活,入库命令要带 --content:

{python} {baseDir}/scripts/product_image_ingest.py <源图片路径> \
  --product "公众号AI运营助手" --stem "配置首页" \
  --content "客观中文描述,一两句即可"

--product / --stem 必填,产品目录与 images/ 不存在时自动创建。产出 配置首页.png + 配置首页.md。

不传 --content 会写占位句(预期行为,不是故障)、.md 的固定格式,见 branches.md「二」。

三、预设包导入(.aws)

扩展名 .aws,实质是 ZIP。包根应含与仓库一致的预设文件夹(可以多出别的文件,脚本只处理白名单):

closing-blocks、cover-styles、formatting、image-styles、sticker-styles、structures、title-styles

另可有根级 config.yaml、writing-spec.md。不在白名单的目录会被跳过并打日志——components/ 与 review-rules.yaml 就不由 .aws 管理,原因见 branches.md「三」。

工作流:

  1. 准备来源:本地 .aws 文件,或符合白名单的 HTTPS URL。
  2. 先 --dry-run 看将写入哪些路径。
  3. 在仓库根执行:
# 本地路径
{python} {baseDir}/scripts/import_presets_aws.py path/to/bundle.aws
{python} {baseDir}/scripts/import_presets_aws.py path/to/bundle.aws --dry-run

# URL(仅 aiworkskills.cn 及子域)
{python} {baseDir}/scripts/import_presets_aws.py https://aiworkskills.cn/bundles/brand-a.aws

三条要先知道的语义 ⛔:

  • 预设目录是替换式:包内有该子目录 → 先清空本地同名目录再写;包内没有 → 本地保持不动。
  • config.yaml 不覆盖:本地已有时只把差异以 JSON 打到 stdout,须问过用户再手改。本地没有才复制。
  • 密钥会进 aws.env:包内 wechat_appid / wechat_appsecret / writing_model.api_key / image_model.api_key 按映射增量写入,覆盖前备份 aws.env.bak.{ts}。

完整规则(映射表、写入策略、包根优先级、URL 白名单、tmp 语义)见 branches.md「三~五」。

脚本

脚本 参数
product_image_ingest.py source、--product(必填)、--stem(必填)、--content、--repo
import_presets_aws.py bundle(路径或白名单 URL)、--dry-run、--repo、--allow-any-host(调试)

分支与细则

不该入库的情况、业务图入库两步、.aws 合并语义、密钥映射、URL 白名单 → references/branches.md。

过程文件

场景 产出
业务介绍 .md 入库 .aws-article/products/{产品名}/{文件名}.md(同时 mkdir images/)
业务图入库 .aws-article/products/{产品名}/images/*.{png,…} + 同名 *.md
.aws 导入 .aws-article/presets/** 更新;config.yaml 首次复制或 stdout 差异 JSON;密钥增量写入 aws.env(覆盖前备份);解压缓存在 .aws-article/tmp/
.aws URL 导入 下载缓存 .aws-article/downloads/*.aws;其余同本地导入
檢視許可證全文(Apache-2.0)
                                 Apache License
                           Version 2.0, January 2004
                        http://www.apache.org/licenses/

   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

   1. Definitions.

      "License" shall mean the terms and conditions for use, reproduction,
      and distribution as defined by Sections 1 through 9 of this document.

      "Licensor" shall mean the copyright owner or entity authorized by
      the copyright owner that is granting the License.

      "Legal Entity" shall mean the union of the acting entity and all
      other entities that control, are controlled by, or are under common
      control with that entity. For the purposes of this definition,
      "control" means (i) the power, direct or indirect, to cause the
      direction or management of such entity, whether by contract or
      otherwise, or (ii) ownership of fifty percent (50%) or more of the
      outstanding shares, or (iii) beneficial ownership of such entity.

      "You" (or "Your") shall mean an individual or Legal Entity
      exercising permissions granted by this License.

      "Source" form shall mean the preferred form for making modifications,
      including but not limited to software source code, documentation
      source, and configuration files.

      "Object" form shall mean any form resulting from mechanical
      transformation or translation of a Source form, including but
      not limited to compiled object code, generated documentation,
      and conversions to other media types.

      "Work" shall mean the work of authorship, whether in Source or
      Object form, made available under the License, as indicated by a
      copyright notice that is included in or attached to the work
      (an example is provided in the Appendix below).

      "Derivative Works" shall mean any work, whether in Source or Object
      form, that is based on (or derived from) the Work and for which the
      editorial revisions, annotations, elaborations, or other modifications
      represent, as a whole, an original work of authorship. For the purposes
      of this License, Derivative Works shall not include works that remain
      separable from, or merely link (or bind by name) to the interfaces of,
      the Work and Derivative Works thereof.

      "Contribution" shall mean any work of authorship, including
      the original version of the Work and any modifications or additions
      to that Work or Derivative Works thereof, that is intentionally
      submitted to the Licensor for inclusion in the Work by the copyright owner
      or by an individual or Legal Entity authorized to submit on behalf of
      the copyright owner. For the purposes of this definition, "submitted"
      means any form of electronic, verbal, or written communication sent
      to the Licensor or its representatives, including but not limited to
      communication on electronic mailing lists, source code control systems,
      and issue tracking systems that are managed by, or on behalf of, the
      Licensor for the purpose of discussing and improving the Work, but
      excluding communication that is conspicuously marked or otherwise
      designated in writing by the copyright owner as "Not a Contribution."

      "Contributor" shall mean Licensor and any individual or Legal Entity
      on behalf of whom a Contribution has been received by the Licensor and
      subsequently incorporated within the Work.

   2. Grant of Copyright License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      copyright license to reproduce, prepare Derivative Works of,
      publicly display, publicly perform, sublicense, and distribute the
      Work and such Derivative Works in Source or Object form.

   3. Grant of Patent License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      (except as stated in this section) patent license to make, have made,
      use, offer to sell, sell, import, and otherwise transfer the Work,
      where such license applies only to those patent claims licensable
      by such Contributor that are necessarily infringed by their
      Contribution(s) alone or by combination of their Contribution(s)
      with the Work to which such Contribution(s) was submitted. If You
      institute patent litigation against any entity (including a
      cross-claim or counterclaim in a lawsuit) alleging that the Work
      or a Contribution incorporated within the Work constitutes direct
      or contributory patent infringement, then any patent licenses
      granted to You under this License for that Work shall terminate
      as of the date such litigation is filed.

   4. Redistribution. You may reproduce and distribute copies of the
      Work or Derivative Works thereof in any medium, with or without
      modifications, and in Source or Object form, provided that You
      meet the following conditions:

      (a) You must give any other recipients of the Work or
          Derivative Works a copy of this License; and

      (b) You must cause any modified files to carry prominent notices
          stating that You changed the files; and

      (c) You must retain, in the Source form of any Derivative Works
          that You distribute, all copyright, patent, trademark, and
          attribution notices from the Source form of the Work,
          excluding those notices that do not pertain to any part of
          the Derivative Works; and

      (d) If the Work includes a "NOTICE" text file as part of its
          distribution, then any Derivative Works that You distribute must
          include a readable copy of the attribution notices contained
          within such NOTICE file, excluding any notices that do not
          pertain to any part of the Derivative Works, in at least one
          of the following places: within a NOTICE text file distributed
          as part of the Derivative Works; within the Source form or
          documentation, if provided along with the Derivative Works; or,
          within a display generated by the Derivative Works, if and
          wherever such third-party notices normally appear. The contents
          of the NOTICE file are for informational purposes only and
          do not modify the License. You may add Your own attribution
          notices within Derivative Works that You distribute, alongside
          or as an addendum to the NOTICE text from the Work, provided
          that such additional attribution notices cannot be construed
          as modifying the License.

      You may add Your own copyright statement to Your modifications and
      may provide additional or different license terms and conditions
      for use, reproduction, or distribution of Your modifications, or
      for any such Derivative Works as a whole, provided Your use,
      reproduction, and distribution of the Work otherwise complies with
      the conditions stated in this License.

   5. Submission of Contributions. Unless You explicitly state otherwise,
      any Contribution intentionally submitted for inclusion in the Work
      by You to the Licensor shall be under the terms and conditions of
      this License, without any additional terms or conditions.
      Notwithstanding the above, nothing herein shall supersede or modify
      the terms of any separate license agreement you may have executed
      with Licensor regarding such Contributions.

   6. Trademarks. This License does not grant permission to use the trade
      names, trademarks, service marks, or product names of the Licensor,
      except as required for reasonable and customary use in describing the
      origin of the Work and reproducing the content of the NOTICE file.

   7. Disclaimer of Warranty. Unless required by applicable law or
      agreed to in writing, Licensor provides the Work (and each
      Contributor provides its Contributions) on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
      implied, including, without limitation, any warranties or conditions
      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
      PARTICULAR PURPOSE. You are solely responsible for determining the
      appropriateness of using or redistributing the Work and assume any
      risks associated with Your exercise of permissions under this License.

   8. Limitation of Liability. In no event and under no legal theory,
      whether in tort (including negligence), contract, or otherwise,
      unless required by applicable law (such as deliberate and grossly
      negligent acts) or agreed to in writing, shall any Contributor be
      liable to You for damages, including any direct, indirect, special,
      incidental, or consequential damages of any character arising as a
      result of this License or out of the use or inability to use the
      Work (including but not limited to damages for loss of goodwill,
      work stoppage, computer failure or malfunction, or any and all
      other commercial damages or losses), even if such Contributor
      has been advised of the possibility of such damages.

   9. Accepting Warranty or Additional Liability. While redistributing
      the Work or Derivative Works thereof, You may choose to offer,
      and charge a fee for, acceptance of support, warranty, indemnity,
      or other liability obligations and/or rights consistent with this
      License. However, in accepting such obligations, You may act only
      on Your own behalf and on Your sole responsibility, not on behalf
      of any other Contributor, and only if You agree to indemnify,
      defend, and hold each Contributor harmless for any liability
      incurred by, or claims asserted against, such Contributor by reason
      of your accepting any such warranty or additional liability.

   END OF TERMS AND CONDITIONS

   Copyright 2025 AI Work Skills

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.