make-blog-post
它能做什么
把一段代码转换成博客文章,并以作者本人的写作风格来撰写。它会聚焦于某个具体的函数、脚本、类或工具,并配有通用示例和使用示例。
适用场景
- ✓当你想把可以正常运行的代码变成一篇文章时。
- ✓当你想请 AI 写一篇关于某段代码片段的教程或指南时。
- ✓当你希望 AI 借助你的旧文章中的示例,并以你的风格撰写博客文章时。
技能链接
https://github.com/github/awesome-copilot/blob/main/skills/make-blog-post/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“把这段代码写成一篇博客文章,用我的风格,并保存到 /my-blog。”
每周 5 个新技能,1 分钟读完。
工作原理
AI 会先弄清楚你想把代码的哪一部分写成文章。然后,它会根据你提供的旧文章或已发布的文章来学习你的写作风格。最后,它会生成一份草稿,供你审阅确认。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Make Blog Post
Turn code from the current session into a blog post that reads as if its author wrote it: one walkthrough of one function, script, class, or tool, built around a generalized sample and a usage example.
This skill runs only when the user asks for a post. The natural moment is the end of a turn, once the code works: /make-blog-post, optionally followed by what to cover, where the post goes, and links or files of the author's past posts.
When to Use This Skill
- The user asks to write, draft, or turn code into a blog post, article, tutorial, walkthrough, or gist.
- The user invokes
/make-blog-post, with or without naming the subject, the destination, or writing samples.
Do not use it for API reference, READMEs, changelogs, or release notes, or for a post that needs several unrelated examples or a multi-file walkthrough.
Examples
/make-blog-post
/make-blog-post the retry helper in src/http.ts
/make-blog-post the slugify function, as a gist
/make-blog-post put it in the blog, match https://example.com/posts/one and https://example.com/posts/two
Workflow
Work through the steps in order. Nothing is written to disk until the draft is approved in step 5.
1. Pick the subject
- Use what the user named: a function, file, selection, snippet, or topic. Code pasted into the conversation is in scope too.
- Otherwise, take the code written or changed in this session. When more than one piece qualifies, list up to three, each with a one-line purpose, and ask which one to write up.
- Check that the subject works as a standalone post. It should:
- Solve one clear, general-purpose problem.
- Fit in one self-contained example.
- Not depend on project-specific state, services, or configuration that cannot be replaced with a stand-in.
- Not be trivial. A one-line wrapper or a lone standard-library call does not qualify.
- When a check fails, say which one and suggest an angle that works, such as the technique behind the code. Proceed with the original subject if the user still wants it.
2. Resolve the destination
Consider only what the user said, the current workspace, and paths the user provides. Do not assume any folder exists, and do not walk parent or sibling directories looking for one.
- The user named a destination (a local path, the current workspace repository, a venue such as a gist, or "just show me"): use it, and do not move the post elsewhere because another place fits conventions better. If the user names another repository, ask for its local checkout path; do not clone or modify it remotely. A partial name such as "the blog" resolves against the current workspace only. If the workspace is not that blog, ask for the path.
- The workspace is a blog or site: take the posts folder from the generator's own configuration, and match an existing post's folder, extension, file naming, and front matter. See references/blog-platforms.md for detection and each generator's contract.
- Otherwise: write no file. Deliver the post in chat and offer to save it to a path the user names.
A default destination or voice profile recorded in the user's custom instructions counts as named by the user. That is the place for a personal workflow, such as a folder where every post is archived.
When writing to a named path:
- Create missing subfolders under a root that exists. If the root itself does not exist, ask instead of building a tree that may be a typo.
- If the path breaks the detected generator's contract (the wrong folder for the collection, a missing date prefix), state in one line what would break, offer the compatible path, and ask which to use.
- If the request conflicts with the site's conventions, say so once, then follow the request. The security rules and the approval gate still apply.
3. Learn the author's voice
A post that reads like generic documentation is not the author's post. Before drafting, collect three to five samples of the author's own writing, from these sources in order:
- Samples named in the request: files, folders, URLs, or pasted text.
- A saved voice profile the user points to, in the request or in their custom instructions.
- When step 2 resolved a blog repository, the most recent posts by this author in its posts folder.
…
常见问题
如果我没有旧文章供 AI 学习我的风格,会怎样?
AI 可以使用中性的风格,或者先问你几个简单的问题,以了解你的写作偏好。
AI 能在一篇文章中同时写多段不同的代码吗?
不能。这个功能每次只专注于一段代码,这样文章会更清晰,也更有重点。
文章会保存到哪里?
这取决于你的请求。它可以保存到你指定的位置或你的博客中;如果没有设置保存位置,就直接在聊天窗口中展示。
详情
作者的原始描述
Turn code from the current session into a blog post written in the voice of its author. Covers one function, script, class, or tool as a focused walkthrough with a generalized sample and a usage example, learns tone and structure from existing posts or writing samples by the same author, takes the destination from what the user names or the blog repository in use instead of assumed folders, and sa
repo: github/awesome-copilot
热度
- GitHub 星标
- 40k
- 排名
- #7273
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …
同一仓库的更多技能
acquire-codebase-knowledge
40k帮你的智能体理解并编写现有代码项目的文档。它有助于新成员快速上手,或者快速了解项目架构。
acreadiness-assess
40k让你的智能体评估一个项目对 AI 的准备程度,并生成报告。它有助于了解项目在使用 AI 工具方面的准备情况。
acreadiness-generate-instructions
40k帮你的智能体根据评估结果编写 AI 工具的指令文件。它有助于改善 AI 与代码的交互方式,并弥补已发现的不足。
acreadiness-policy
40k让你的智能体协助制定或应用 AI 项目评估的政策。它有助于规范项目的评估方式,并确保合规。