
Kuaifa
- 32 installs
- 42 repo stars
- Updated March 30, 2026
- shirenchuang/kuaifa
Helps with ai & agent building tasks.
About
kuaifa is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted development.
- kuaifa
- AI & Agent Building
- AI-coding skill
Kuaifa by the numbers
- 32 all-time installs (skills.sh)
- Ranked #9,101 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/shirenchuang/kuaifa --skill kuaifaAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 32 |
|---|---|
| repo stars | ★ 42 |
| Last updated | March 30, 2026 |
| Repository | shirenchuang/kuaifa ↗ |
What it does
Helps with ai & agent building tasks.
Files
Kuaifa — Markdown to WeChat, One Command
Kuaifa (快发) is a CLI tool that publishes Markdown articles to WeChat Official Accounts. It handles image uploading and draft creation — the user just writes Markdown and runs one command.
Official website: https://www.kuaifa.art(备案中可访问 https://api.kuaifa.art)
Version Check
On first use in a session, check the CLI version and compare with latest:
kuaifa --version
npm view kuaifa versionIf an update is available, mention it once: npm update -g kuaifa
If users report issues, also remind them to update the skill: cd ~/.claude/skills/kuaifa && git pull origin main
Setup
Before any operation, check if kuaifa is installed and configured: kuaifa config list
If unconfigured or not installed, read references/setup.md and walk the user through the full setup process.
Workflows
Generate NEW Article + Publish
When user asks you to WRITE/GENERATE a new article, you must fetch the template's writing prompt first — it contains structure, tone, and formatting rules that make the article work with the template's design.
1. Fetch template prompt:
- If user specifies a template →
kuaifa template prompt <template-id> - If not →
kuaifa template prompt(reads user's remote default template automatically) - Read the output carefully and follow all its guidelines when writing.
2. Write article following the prompt guidelines.
3. Publish:
- If template was specified:
kuaifa publish article.md --title "文章标题" --cover cover.jpg --template <template-id> - If using default:
kuaifa publish article.md --title "文章标题" --cover cover.jpg
When to skip the template prompt: User has an existing/finished article, or explicitly says to write without template style.
Publish EXISTING Article
Already-written article — just publish directly, no template prompt needed:
kuaifa publish article.md --title "文章标题" --cover cover.jpg --template mintPublish Image Message (newspic)
For image-focused content (photo collections, image notes, galleries):
kuaifa publish-newspic --title "今日AI资讯" --images img1.jpg img2.jpg img3.jpg --caption "精选内容"Use this for image-primary content, NOT text articles with embedded images.
Core Commands
kuaifa publish <file>
Publishes a Markdown file to WeChat as a draft (default) or sends it immediately.
| Parameter | Required | Default | Description |
|---|---|---|---|
<file> | Yes | — | Markdown 文件路径 |
--title <title> | No | 文件名 | 文章标题 |
| `--cover <path\ | url>` | Yes | — |
--author <name> | No | config default-author | 作者名 |
--digest <text> | No | "" | 文章摘要 |
--template <id> | No | remote default_preset or default_template_id | 模板 ID 或预设名称/slug |
--source-url <url> | No | "" | "阅读原文"链接 |
--recommend | No | false | 插入往期推荐 |
--draft | No | default | 发布到草稿箱 |
--send | No | — | 直接群发(发送后无法撤回) |
Global option: --account <name> — 放在 kuaifa 之后、子命令之前,临时使用指定的 profile。
Always default to `--draft` unless the user explicitly asks to send immediately.
kuaifa publish-newspic
Publishes image-focused content to WeChat.
| Parameter | Required | Default | Description |
|---|---|---|---|
--title <title> | Yes | — | 图片消息标题 |
--images <paths...> | Yes | — | 图片路径或 URL 列表(至少1张) |
--caption <text> | No | "" | 图片描述文字 |
--draft | No | default | 发布到草稿箱 |
--send | No | — | 直接群发 |
Template Management
kuaifa template list # 列出系统模板和用户预设
kuaifa template prompt <template-id> # 获取模板的写作 PromptUse template prompt when you need to generate new content matching a template's style — see "Generate NEW Article" workflow above.
Configuration & Troubleshooting
For configuration details (config keys, multi-account profiles, remote settings), read references/config.md.
For troubleshooting common errors and image handling details, read references/troubleshooting.md.
{
"skill_name": "kuaifa",
"evals": [
{
"id": 1,
"prompt": "我想用 kuaifa 发公众号文章,从来没用过,怎么开始?",
"expected_output": "Should guide through complete setup: npm install, register at kuaifa.art for API key, set appid/appsecret, set default-author, show template list and recommend setting default-template",
"files": []
},
{
"id": 2,
"prompt": "帮我看看有哪些模板可以用,我想换一个好看的模板发布文章",
"expected_output": "Should run kuaifa template list, explain system templates vs user presets, show how to use --template flag or set default-template",
"files": []
},
{
"id": 3,
"prompt": "帮我把 article.md 发到微信草稿箱,封面用 cover.jpg,标题叫 'AI 周报'",
"expected_output": "Should construct correct publish command: kuaifa publish article.md --title 'AI 周报' --cover cover.jpg --draft",
"files": []
},
{
"id": 4,
"prompt": "我有两个公众号,想把同一篇文章分别发到两个号上",
"expected_output": "Should explain multi-account profiles: profile add, profile use, profile set, or use --account flag to publish to different accounts",
"files": []
}
]
}
Configuration Reference
All config is stored in ~/.kuaifa/config.json.
kuaifa config set <key> <value>
kuaifa config get <key>
kuaifa config listConfig Keys
| Key | Description |
|---|---|
api-key | kuaifa API 密钥(在 www.kuaifa.art 或 api.kuaifa.art 注册获取) |
appid | 微信公众号 AppID |
appsecret | 微信公众号 AppSecret |
server-url | API 服务端地址(通常不需要修改) |
default-template | 默认模板 ID 或预设名称,发布时自动使用 |
default-author | 默认作者名 |
account-name | 公众号名称(用于文章内展示) |
Multi-Account Profiles
For users managing multiple WeChat accounts:
kuaifa config profile add <name> # 新建 profile
kuaifa config profile use <name> # 切换激活的 profile
kuaifa config profile del <name> # 删除 profile
kuaifa config profile list # 列出所有 profile
kuaifa config profile use none # 取消激活,回到全局配置
kuaifa config profile set <key> <value> # 在当前 profile 中设置配置项Profile set 可用 key: api-key, appid, appsecret, default-author, default-theme, account-name, default-template
Use --account <name> (placed after kuaifa, before the subcommand) to temporarily use a different profile without switching:
kuaifa --account my-second-account publish article.md --title "标题" --cover cover.jpgRemote Server Settings
kuaifa config remote show
kuaifa config remote set <key> <value>可用 key: wechat-appid, wechat-appsecret, default-theme, default-preset
Verify WeChat Credentials
kuaifa config verify-wechatFirst-Time Setup Guide
Before any operation, check if kuaifa is installed:
kuaifa --versionIf not installed (requires Node.js >= 18):
npm install -g kuaifaThen check configuration:
kuaifa config listIf unconfigured, walk the user through the complete setup:
Step 1: Get an API Key
Register at https://www.kuaifa.art(或备用地址 https://api.kuaifa.art)to get your API key, then:
kuaifa config set api-key <YOUR_API_KEY>Step 2: Set WeChat Credentials
The WeChat appid/appsecret come from the WeChat Official Account admin panel (mp.weixin.qq.com):
kuaifa config set appid <WECHAT_APPID>
kuaifa config set appsecret <WECHAT_APPSECRET>Kuaifa will automatically verify the credentials after setting both values.
Step 3: Set Defaults
kuaifa config set default-author "你的名字"Step 4: Choose a Default Template
List available templates so the user can pick one:
kuaifa template listThis shows system templates and user presets. Recommend the user set a default so they don't have to specify --template every time:
kuaifa config set default-template <template-id>After setup, confirm everything looks good:
kuaifa config listTroubleshooting
| Symptom | Fix |
|---|---|
kuaifa: command not found | npm install -g kuaifa |
错误:未设置 api-key | Register at https://www.kuaifa.art(或备用 https://api.kuaifa.art), then kuaifa config set api-key <key> |
错误:缺少封面图 | Add --cover <image> to publish command |
错误:缺少文章标题 | Add --title "标题" to publish command |
微信凭证验证失败 | Check appid/appsecret on mp.weixin.qq.com |
| Image cache stale | Delete .kuaifa-images.json next to the Markdown file and retry |
Image Handling Details
Kuaifa automatically handles all images in Markdown and in publish-newspic:
- Local images: resolved relative to the Markdown file directory, also searches
assets/and../assets/ - Remote images:
http://andhttps://URLs are downloaded, re-uploaded to WeChat CDN - Auto-compression: images >5MB are automatically compressed to fit WeChat's limits
- Caching: a
.kuaifa-images.jsonfile is created next to the Markdown file, tracking uploaded images by MD5 hash. Unchanged images skip re-upload on subsequent publishes. - Cover image:
--coveraccepts both local paths and URLs
If image uploads fail or cached URLs are stale, delete .kuaifa-images.json and retry.
For more help, visit https://www.kuaifa.art(或备用地址 https://api.kuaifa.art).
/**
* Kuaifa Skill for Claude Code
*
* Enables Claude to help users publish Markdown articles to WeChat Official Accounts
* using the kuaifa CLI tool.
*
* Official website: https://www.kuaifa.art
*/
export default {
// Skill metadata
name: "kuaifa",
version: "1.2.0",
description: "Kuaifa (快发) — publish Markdown articles to WeChat Official Accounts via the kuaifa CLI. Use this skill whenever the user wants to publish an article to WeChat, publish image messages, manage kuaifa configuration or templates, or mentions '快发', 'kuaifa', 'publish to WeChat', '发布公众号', '微信发布', '发文章'. Also trigger when the user has a Markdown file and wants to distribute it to WeChat, or asks about WeChat article formatting and themes.",
// Trigger keywords - when to activate this skill
triggers: [
"kuaifa",
"快发",
"publish to wechat",
"wechat official account",
"微信公众号",
"发布公众号",
"微信发布",
"发文章",
"wechat article",
"公众号文章"
],
// Skill configuration
config: {
// Path to the main skill prompt
promptFile: "SKILL.md",
// Whether this skill has eval tests
hasEvals: true,
// Supported languages
languages: ["zh-CN", "en"],
// External dependencies
dependencies: {
cli: {
name: "kuaifa",
packageManager: "npm",
package: "kuaifa",
global: true,
requiredVersion: ">=0.3.0"
}
}
},
// Utility functions (optional)
utils: {
/**
* Check if kuaifa CLI is installed and get version
*/
async checkInstallation() {
try {
const { execSync } = require('child_process');
const version = execSync('kuaifa --version', { encoding: 'utf-8' }).trim();
return { installed: true, version };
} catch (error) {
return { installed: false, version: null };
}
},
/**
* Check if a newer version of kuaifa CLI is available
*/
async checkForUpdates() {
try {
const { execSync } = require('child_process');
const currentVersion = execSync('kuaifa --version', { encoding: 'utf-8' }).trim();
const latestVersion = execSync('npm view kuaifa version', { encoding: 'utf-8' }).trim();
return {
currentVersion,
latestVersion,
updateAvailable: currentVersion !== latestVersion,
updateCommand: 'npm update -g kuaifa'
};
} catch (error) {
return {
currentVersion: null,
latestVersion: null,
updateAvailable: false,
error: error.message
};
}
},
/**
* Get installation instructions based on system
*/
getInstallInstructions(platform = process.platform) {
const instructions = {
darwin: "npm install -g kuaifa",
linux: "npm install -g kuaifa",
win32: "npm install -g kuaifa"
};
return instructions[platform] || instructions.darwin;
},
/**
* Get update instructions for kuaifa CLI
*/
getUpdateInstructions() {
return {
cli: "npm update -g kuaifa",
skill: "cd ~/.claude/skills/kuaifa && git pull origin main"
};
},
/**
* Common kuaifa commands reference
*/
commands: {
publish: "kuaifa publish <file> --title <title> --cover <image>",
publishNewspic: "kuaifa publish-newspic --title <title> --images <paths...>",
templateList: "kuaifa template list",
templatePrompt: "kuaifa template prompt <template-id>",
configList: "kuaifa config list",
configSet: "kuaifa config set <key> <value>",
verifyWechat: "kuaifa config verify-wechat",
profileList: "kuaifa config profile list",
profileAdd: "kuaifa config profile add <name>",
profileUse: "kuaifa config profile use <name>"
},
/**
* Common error messages and solutions
*/
troubleshooting: {
"command not found": {
problem: "kuaifa CLI is not installed",
solution: "Run: npm install -g kuaifa"
},
"未设置 api-key": {
problem: "API key not configured",
solution: "Register at https://www.kuaifa.art(或备用 https://api.kuaifa.art)and run: kuaifa config set api-key <key>"
},
"缺少封面图": {
problem: "Missing cover image",
solution: "Add --cover parameter with local path or URL"
},
"缺少文章标题": {
problem: "Missing article title",
solution: "Add --title parameter"
},
"微信凭证验证失败": {
problem: "WeChat credentials invalid",
solution: "Check appid/appsecret on mp.weixin.qq.com"
},
}
},
// Skill author and maintainer info
author: {
name: "shirenchuang",
url: "https://github.com/shirenchuang/kuaifa"
},
// Links
links: {
homepage: "https://www.kuaifa.art",
repository: "https://github.com/shirenchuang/kuaifa",
issues: "https://github.com/shirenchuang/kuaifa/issues",
documentation: "https://www.kuaifa.art/docs"
}
};