jh-edit

IMA OpenAPI unified skill — note management, knowledge base operations, and public-account typesetting/publishing. Trigger words include: knowledge base, resource library, notes, memos, record, upload file, add webpage, search knowledge base, typeset, push; fuzzy intents (e.g. “help me remember”, “save as note”, “format an article”) should also trigger it.

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "jh-edit" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-236f29dc2c50358834321875e5097e97d98b853385a815c53f977d2182331365. Verify the upstream source and version against https://skillhub.cn/skills/user_142c54b3/jh-edit before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

skillhub.cn

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

IMA OpenAPI unified skill — note management, knowledge base operations, and public-account typesetting/publishing. Trigger words include: knowledge base, resource library, notes, memos, record, upload file, add webpage, search knowledge base, typeset, push; fuzzy intents (e.g. “help me remember”, “save as note”, “format an article”) should also trigger it.

0 Downloads

Introduction source: third_party · user_142c54b3 · 2.5.0 Reference

SkillPi interpretation

Tasks
Translation pending; see source documentation.
Audience
Not specified in the source documentation.
Inputs and outputs
Not specified in the source documentation.
Software, accounts and paid services
Not specified in the source documentation.
Limits and differences
Not specified in the source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: jh-edit
description: IMA OpenAPI 统一技能 — 笔记管理 + 知识库操作 + 公众号排版推送。触发词:知识库、资料库、笔记、备忘录、记事、上传文件、添加网页、搜索知识库、排版、推送。模糊意图("帮我记一下"、"保存为笔记"、"排一篇文章")也应触发。

jh-edit v2.5

一站式 IMA 内容工具:从知识库取笔记 → 排版(米白金风)→ 推送到微信公众号草稿箱,全链路打通。

文件结构

jh-edit/
├── SKILL.md                    # 本文件(技能说明)
├── ima_api.cjs                 # IMA OpenAPI 调用引擎(Node.js)
├── knowledge-base/             # 知识库模块
│   ├── SKILL.md                #   知识库 API 详细文档
│   ├── references/api.md       #   完整 API 参考
│   └── scripts/                #   预处理 / COS 上传脚本
├── notes/                      # 笔记模块
│   ├── SKILL.md                #   笔记 API 详细文档
│   └── references/api.md       #   完整 API 参考
├── templates/                  # 1 套米白金样板(2026-08-05 起唯一认可)
│   └── sample_经营管理.html      #   排版结构标准(参考)
└── _meta.json / meta.json      # skill 注册元数据(ima_skill_create 生成)

🔐 安全铁律(最高优先级)

凭证管理

# 规则
S1 禁止从文件系统读取凭证
S2 禁止从环境变量自动读取凭证
S3 必须通过交互式提示让用户输入 clientId 和 apiKey
S4 每次会话输入一次,内存持有,会话结束丢弃
S5 不落盘、不写配置、不记日志

数据安全

# 规则
D1 笔记内容/网页 URL 必须由用户交互式提供
D2 文件上传仅传路径,不做额外内容读取

🚀 完整工作流

流 A:取笔记 → 排版 → 推送

知识库搜索 → 获取笔记内容 → 选栏目/主题 → 排版(模板替版 或 Markdown转换)
→ 微信兼容 HTML → 草稿箱推送

流 B:即时操作

"记个笔记" → notes 模块
"搜知识库" → knowledge-base 模块
"上传文件" → knowledge-base 模块

📦 模块决策

用户意图 模块 操作
搜索/新建/追加/列出笔记 notes 读 notes/SKILL.md
上传文件/添加网页/搜索/浏览知识库 knowledge-base 读 knowledge-base/SKILL.md
排版文章/推送公众号 本文件(见下方排版章节) 双路径:模板或 Markdown

🎨 公众号排版 — 统一米白金风(唯一认可风格)

用户 2026-08-03 确认:只有「米白金手工风」合格,其余模板全部废弃。 所有栏目统一使用同一视觉,仅更换头部栏目名与 slogan。

视觉规范(硬编码)

元素 值
底色 #fcf8f3(米白)
金色 #b8915e(短线/左边线/作者名/slogan)
深色 #2c1810(结尾收束块底)
标题 24px/700/#2c1810,居中
作者 12px/#b8915e,居中 — 紫川祛魅 —
引言 #f5efe6 底 + 4px 金左边线
小节标题 17px/600/#5c4a3a + 3px 金左边线
正文 15px/#3d2e1e,行高1.9,首行缩进2em
金句 16-17px/600/#8b6914 居中,上下 #e8dcc8 分隔线
排比块 #f5efe6 底,✦ 符号列表
收束块 #2c1810 底白字金 slogan

栏目映射(视觉统一,仅头部文字不同)

栏目 头部文字 Slogan
投资笔记 投 资 笔 记 好收益=好产品+好价格+长期持有
热点快评 热 点 快 评 于不确定中,看见确定性
读史札记 读 史 札 记 读史明智,鉴往知来
认知成长 认 知 成 长 慢富,才是可靠路径
科技前沿 科 技 前 沿 AI时代,主动成为对的人
商业洞察 商 业 洞 察 在错误的路上,奔跑也没有用
生活研究所 生 活 研 究 所 最重要的事,只有一件
诗意生活 诗 意 生 活 在寻常里,看见诗意
经营管理 经 营 管 理 管理是手艺,更是认知!

头部写法:width:40px;height:3px 金短线 + font-size:11px;letter-spacing:6px;color:#b8915e 栏目名(字间空格)。

结构模板(参考 output/ 中已认可的 true_growth.html / midlife_wisdom.html):

顶部金短线+栏目名 → 标题 → 作者 → 引言块 → 小节(金左边线) → 金句分隔 →
排比块(#f5efe6) → hr(#e8dcc8) → 深色收束块(#2c1810白字+slogan)

⚙️ 排版参数速查

参数 推荐值
正文字号 15px
行间距 1.8
字间距 1px
正文颜色 #4f4f4f(极简)/ #3a3a4a(投资报告)

🔍 原创验证(排版前必做)

步骤 操作
1. 网络搜索 用 search(source="web") 搜索排版稿的核心金句+标题,扫描是否有高度相似文章
2. 判定风险 若核心论点/金句已在多平台广泛流传(≥3个不同平台),判定为高风险;若网络多为客观报道、本版有原创视角框架,判定为低风险
3. 输出建议 告知用户风险等级及建议:高风险→发布时不勾原创;低风险→可申原创
4. 发布时执行 推送草稿箱后在公众号后台发布时,按建议手动勾选/不勾原创声明

🔍 已发布去重(排版前必做)

步骤 操作
1. 搜知识库 搜索目标知识库中是否存在同标题笔记带 --已发布 后缀
2. 搜公众号 让用户提供已发布文章链接或搜索确认(freepublish/batchget 不可用,依赖用户确认+历史记忆)
3. 已发处理 若已发布:只加知识库 --已发布\|YYYY年M月D日 后缀,不重复推送;用 rename_knowledge(旧头名)改名
4. 未发处理 正常排版→推送→存档,存档时内容首行标题直接带后缀(因 import_doc title 不生效)

📤 公众号推送 SOP(4 步法)

Step 1 排版前:原创验证 + 去重

检查 方法 结论
原创验证 search(source="web") 搜核心金句+标题 高风险(≥3 平台广泛流传)→ 不勾原创;低风险(多客观报道+本版有原创框架)→ 可勾原创
知识库去重 搜同标题是否带 --已发布 后缀 已发布:只补后缀,不重复推送
公众号去重 freepublish/batchget 返回 48001(api unauthorized),依赖本地台账(agent_md) 已发布:跳过推送

Step 2 排版:统一米白金风

视觉规范见上方"🎨 公众号排版"章节。结构固定为: 金短线+栏目名 → 标题 → 作者(—紫川祛魅—) → 引言块 → 小节金左边线 → 金句 → 排比块(#f5efe6) → hr(#e8dcc8) → 深色收束块+slogan

Step 3 推送:draft/add 7 个必填字段

字段 来源 硬约束
title 文章主标题 精炼去冗余虚词
author 默认"紫川祛魅" 文内明示其他作者则尊重原文
digest 一句话核心观点 90–117 字(微信限频,过长报 45004)
content 米白金 HTML 全文 ensure_ascii=False,全量中文
thumb_media_id 见下方封面匹配 4 级优先级
content_source_url kb_id 或外部源 URL "阅读原文"
need_open_comment / only_fans_can_comment 留言策略 见下表

留言策略:

栏目 only_fans_can_comment
投资笔记 / 认知成长 / 诗意生活 / 读史札记 / 商业洞察 / 生活研究所 / 经营管理 0(公开)
热点快评 / 科技前沿 1(仅粉丝)

日期前缀(仅读史札记):标题用 2026年 · 读史札记,只写年份。

Slogan:不自主创新,严格用栏目对应既定的(见上方栏目映射表)。

审核闸门:推送草稿箱前必须等用户审核。

Step 4 推送后:验证 + 存档

操作 接口 注意
验证草稿 draft/get 核 title/author/digest
监控数量 draft/count 超 15 篇提醒清理
错误回退 draft/delete 推送异常删除重推
存档到知识库 import_doc → add_knowledge 标题必须写进内容首行

存档标题规范(关键,因 import_doc 的 title 参数不生效):

# 文章标题 --已发布|2026年8月5日

正文...

重命名 API:知识库 rename_knowledge 必须用旧头名 ima-openapi-clientid / ima-openapi-apikey;新头名 401。

预览链接:provide_file 生成的 URL 默认带 response-content-disposition=attachment 强制下载;去掉该参数即为内联预览(text/html)。


🖼 封面匹配(4 级优先级)

优先级 素材 适用 media_id
1 cover_zipianchuan.png(作者专属) 默认首选 <your_brand_cover_media_id>
2 中文名人物封面 引用人物名时 动态查 material/batchget_material
3 cover_XX_标题名.png 同主题旧文章 自建命名约定
4 moren.png(兜底) 无匹配时 <your_default_cover_media_id>

方法:material/batchget_material(type=image) → 按 name 字段匹配 → 取 media_id。


🔗 API 调用

所有请求为 HTTP POST + JSON Body,发往 https://ima.qq.com。

使用 ima_api.cjs 统一调用:

SKILL_DIR="$(cd "$(dirname "${BASH_SOURCE[0]:-$0}")" && pwd)"

OPTS='{"clientId":"<用户输入>","apiKey":"<用户输入>"}'

# stdout = 响应 JSON;stderr = 结构化错误
node "$SKILL_DIR/ima_api.cjs" "<apiPath>" '<jsonBody>' "$OPTS" 2>/tmp/ima_err

错误处理

  • 脚本层(非0退出):-100 程序错误 / -200 需更新
  • 业务层(code=0):code=0 成功,code≠0 展示 msg

📐 UTF-8 / PowerShell 规则

见子模块 knowledge-base/SKILL.md 和 notes/SKILL.md 中的详细说明。

Current listing version

2.5.0

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value88/100

Highlights

  • 一站式解决笔记管理、知识库操作、公众号排版推送全链路需求
  • 覆盖内容创作者高频刚需场景,实用价值明确
Trigger Precision92/100

Highlights

  • 触发词覆盖全面,包含模糊意图处理机制
  • 边界清晰,减少误触/漏触风险
Structure and Standards75/100

Areas to improve

  • 文档过长 Reported severity: Minor

    主文档 SKILL.md 约 600+ 行,超过 500 行建议长度

    Recommendation: 可将部分章节(如 API 调用细节、UTF-8 规则)下沉至子模块文档,主文件保留核心流程

Highlights

  • Phase/步骤划分清晰,SOP 完整
  • 包含端到端示例和审核闸门设计
Execution Reliability85/100

Highlights

  • 凭证管理严格遵循安全铁律(交互式输入、不落盘)
  • 原创验证与去重机制完善,降低发布风险
  • 草稿验证与错误回退机制保障推送可靠性
Evidence Verifiability (mean of the first four)85/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

Domains or addresses referenced in the document

These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.

  • ima.qq.com

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Not specified in the source documentation.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.