SuperAPI AI 工具集

technical-blog-writing

写作与研究

查看项目

更新于 10-16 06:57

技能介绍

用途

该技能用于撰写面向开发者受众的技术博客文章,强调结构、代码示例与开发者社区约定。资料将其定位为通过 inference.sh CLI(belt)进行技术博客写作的技能,并给出从选题调研、配图生成到分发的一整套写作规范。

主要能力

资料覆盖以下写作能力:

  • 文章类型:教程/操作指南、深度解析/解释、事故复盘/事件报告、基准测试/对比、架构/系统设计。每种类型都给出推荐结构。
  • 开发者写作规则:语气与措辞的正反示例、开发者反感的内容、代码示例规范、讲解深度与受众假设。
  • 博客结构:标题、头图、TL;DR、问题、解决方案、结果、权衡与限制、结论、延伸阅读,并给出各类型建议字数。
  • 图表与可视化:何时使用序列图、架构图、流程图、ER 图、性能对比图、前后对比图。
  • 分发:自有博客、Dev.to、Hashnode、Hacker News、Reddit、Twitter/X、LinkedIn 的发布方式。
  • 常见错误清单及修正方法。

使用方式

资料给出的安装与运行命令如下(保留原文):

安装 belt CLI 技能:

npx skills add belt-sh/cli

快速开始需要 inference.sh CLI(belt):

belt login

调研主题深度:

belt app run exa/search --input '{
  "query": "building REST API Node.js best practices 2024 tutorial"
}'

生成头图:

belt app run infsh/html-to-image --input '{
"html": "<div style=\"width:1200px;height:630px;background:linear-gradient(135deg,#0f172a,#1e293b);display:flex;align-items:center;padding:60px;font-family:ui-monospace,monospace;color:white\"><p style=\"font-size:18px;color:#38bdf8;margin:0\">// engineering blog</p><h1 style=\"font-size:48px;margin:16px 0;font-weight:800;font-family:system-ui;line-height:1.2\">How We Reduced API Latency by 90% with Edge Caching</h1><p style=\"font-size:20px;opacity:0.6;font-family:system-ui\">A deep dive into our CDN architecture</p></div>"
}'

生成架构图:

belt app run infsh/html-to-image --input '{
  "html": "<div style=\"width:1200px;height:600px;background:#0f172a;display:flex;align-items:center;justify-content:center;padding:40px;font-family:system-ui;color:white\"><div style=\"display:flex;gap:40px;align-items:center\"><div style=\"background:#1e293b;border:2px solid #334155;border-radius:8px;padding:24px;text-align:center;width:160px\"><p style=\"font-size:14px;color:#94a3b8;margin:0\">Client</p><p style=\"font-size:18px;font-weight:bold;margin:8px 0 0\">React App</p></div><div style=\"color:#64748b;font-size:32px\">→</div><div style=\"background:#1e293b;border:2px solid #3b82f6;border-radius:8px;padding:24px;text-align:center;width:160px\"><p style=\"font-size:14px;color:#94a3b8;margin:0\">Edge</p><p style=\"font-size:18px;font-weight:bold;margin:8px 0 0\">CDN Cache</p></div><div style=\"color:#64748b;font-size:32px\">→</div><div style=\"background:#1e293b;border:2px solid #334155;border-radius:8px;padding:24px;text-align:center;width:160px\"><p style=\"font-size:14px;color:#94a3b8;margin:0\">API</p><p style=\"font-size:18px;font-weight:bold;margin:8px 0 0\">Node.js</p></div><div style=\"color:#64748b;font-size:32px\">→</div><div style=\"background:#1e293b;border:2px solid #334155;border-radius:8px;padding:24px;text-align:center;width:160px\"><p style=\"font-size:14px;color:#94a3b8;margin:0\">Database</p><p style=\"font-size:18px;font-weight:bold;margin:8px 0 0\">PostgreSQL</p></div></div></div>"
}'

生成基准图表:

belt app run infsh/python-executor --input '{
  "code": "import matplotlib.pyplot as plt\nimport matplotlib\nmatplotlib.use(\"Agg\")\n\nfig, ax = plt.subplots(figsize=(12, 6))\nfig.patch.set_facecolor(\"#0f172a\")\nax.set_facecolor(\"#0f172a\")\n\ntools = [\"Express\", \"Fastify\", \"Hono\", \"Elysia\"]\nrps = [15000, 45000, 62000, 78000]\ncolors = [\"#64748b\", \"#64748b\", \"#3b82f6\", \"#64748b\"]\n\nax.barh(tools, rps, color=colors, height=0.5)\nfor i, v in enumerate(rps):\n    ax.text(v + 1000, i, f\"{v:,} req/s\", va=\\