一键导入
blog-delete-post
Delete blog posts with interactive selection, automatic cleanup of images, and immediate deployment
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Delete blog posts with interactive selection, automatic cleanup of images, and immediate deployment
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Generate or execute Git commits on Windows with a required emoji prefix, conventional commit type, and short Chinese summary. Use when the user asks to write a commit message, create a commit, submit local changes, or "帮我提交/生成 git commit". Apply this skill when Codex needs to inspect changed files, choose a commit type, build a message in the required `emoji + type + 描述` format, commit with Windows-side Git in PowerShell, and then ask whether to review the patch quality for patch-on-patch cleanup or refactoring.
用于管理 wzh001create Hugo 站点的内容发布流程。适用于导入、编辑、发布或删除 `content/posts/` 下的 Markdown 文章并同步 front matter 与图片;新增或更新独立 HTML 页面及其 `content/specials/` 包装页;以及创建、更新、发布 `skills/` 下的可复用技能,补齐 `skill.json`、`agents/openai.yaml`、生成技能库页面、zip 压缩包与上线校验。
用于通过 OpenOCD 和 ST-Link 对 STM32 目标进行烧录、复位或基础调试。Use this skill for OpenOCD plus ST-Link flashing, reset handling, verified programming, and basic debug bring-up on STM32 targets.
用于 Windows 上的 Qt/C++ 项目构建、环境排错、qmake/CMake 识别、MinGW/Qt 路径修复、VSCode tasks.json 和 launch.json 生成、编译后在 VSCode 中打开并进入调试。适用于需要处理 Qt 构建失败、PATH 污染、uic/moc/rcc 缺失、g++/cc1plus 不可用、区分 qmake 与 CMake、为现有 Qt 项目补齐 VSCode 调试配置的场景。Keywords: Qt, qmake, CMake, MinGW, MSVC, VSCode, launch.json, tasks.json, debug, build.
用于 STM32 固件工程的 CMake 或 CMakePresets 检查、配置、编译与产物确认。Use this skill for STM32 firmware projects that need CMake preset inspection, configure/build loops, and artifact validation on Windows PowerShell.
用于通过 UART 日志确认 STM32 固件运行状态或分析运行时问题。Use this skill for STM32 runtime validation from UART logs, baud selection, startup checks, timestamp correlation, and structured serial analysis.
| name | blog-delete-post |
| description | Delete blog posts with interactive selection, automatic cleanup of images, and immediate deployment |
Delete blog posts with interactive selection, automatic cleanup of associated images, and immediate deployment to GitHub.
Use this skill when the user wants to:
IMPORTANT: You MUST always display the complete list of articles, even if the user specified a keyword in their request. This gives the user context and confirms what will be deleted.
Use the Bash and Read tools to discover all posts:
cd ~/wzh_blog/my-blog/content/posts
ls -1 *.md
For each .md file found, extract the title from front matter:
grep "^title:" <filename> | head -1
Present the list to the user in a clean, numbered format:
📚 当前博客文章列表:
1. Docker 化迁移实战:将 C++ 项目容器化
文件: my-first-post.md
2. Kubernetes 入门教程
文件: kubernetes-tutorial.md
3. Python 最佳实践指南
文件: python-best-practices.md
共 3 篇文章
Ask the user which post to delete. Accept multiple input formats:
If the user already specified in their original request (e.g., "删除 Docker 那篇文章"), match it against the list automatically.
Matching logic:
Before deleting, always confirm with the user:
⚠️ 确认删除以下文章?
标题: Kubernetes 入门教程
文件: content/posts/kubernetes-tutorial.md
图片: static/images/kubernetes-tutorial/ (如果存在)
此操作将:
1. 删除 markdown 文件
2. 删除图片目录(如果存在)
3. 自动提交并推送到 GitHub
4. 文章将从网站上移除
确认删除?(y/N):
Only proceed if user confirms with 'y' or 'yes'.
Delete the markdown file:
cd ~/wzh_blog/my-blog
rm "content/posts/<filename>"
Check and delete image directory:
# Check if image directory exists
if [ -d "static/images/<article-name>/" ]; then
rm -rf "static/images/<article-name>/"
echo "✓ 已删除图片目录"
else
echo "ℹ️ 没有找到对应的图片目录"
fi
The article name is the filename without the .md extension.
Automatically commit and push the changes:
cd ~/wzh_blog/my-blog
git add -A
git commit -m "chore: 删除文章《<article-title>》"
git push
Important: Use the article title in the commit message, not the filename.
Show a clear success message:
✅ 删除成功!
✓ 已删除 content/posts/kubernetes-tutorial.md
✓ 已删除 static/images/kubernetes-tutorial/
✓ 已提交更改到 Git
✓ 已推送到 GitHub
🚀 GitHub Actions 正在部署...
文章已从博客移除,几分钟后生效:
https://wzh001create.github.io/
剩余文章数: 2
~/wzh_blog/my-blog/~/wzh_blog/my-blog/content/posts/~/wzh_blog/my-blog/static/images/https://wzh001create.github.io/If content/posts/ is empty or has no .md files:
ℹ️ 博客中没有文章
你可以使用 blog-import-post skill 来添加文章。
If user says 'n' or 'no' to confirmation:
✓ 已取消删除操作
文章未被删除。
If the selected file doesn't exist (shouldn't happen, but handle gracefully):
❌ 错误: 文件不存在
content/posts/<filename> 未找到。
请重新运行并选择有效的文章。
If git push fails (network issue, auth problem, etc.):
❌ 推送失败
文件已在本地删除,但未能推送到 GitHub。
错误信息: <error-output>
请检查网络连接和 Git 认证,然后手动推送:
cd ~/wzh_blog/my-blog
git push
User input:
删除文章
Your response:
📚 当前博客文章列表:
1. Docker 化迁移实战:将 C++ 项目容器化 (my-first-post.md)
2. Kubernetes 入门教程 (kubernetes-tutorial.md)
请输入要删除的文章序号或标题:
User input:
2
Your response:
⚠️ 确认删除《Kubernetes 入门教程》?
文件: content/posts/kubernetes-tutorial.md
图片: static/images/kubernetes-tutorial/
确认删除?(y/N):
User input:
y
Your response:
正在删除文章...
✓ 已删除 content/posts/kubernetes-tutorial.md
✓ 已删除 static/images/kubernetes-tutorial/
✓ 已提交: chore: 删除文章《Kubernetes 入门教程》
✓ 已推送到 GitHub
🚀 GitHub Actions 正在部署...
✅ 删除成功!文章已从博客移除:
https://wzh001create.github.io/
User input:
删除 Docker 那篇文章
Your response:
📚 找到匹配的文章:
1. Docker 化迁移实战:将 C++ 项目容器化 (my-first-post.md)
⚠️ 确认删除《Docker 化迁移实战:将 C++ 项目容器化》?
文件: content/posts/my-first-post.md
图片: static/images/my-first-post/ (如果存在)
确认删除?(y/N):
Remember: