Claude Code Plugins

Community-maintained marketplace

Feedback

create-blog-post-from-url

@celery94/celery94.github.io
0
0

从给定 URL 抽取信息并生成新的博客 Markdown 文章、资源目录和 frontmatter。

Install Skill

1Download skill
2Enable skills in Claude

Open claude.ai/settings/capabilities and find the "Skills" section

3Upload to Claude

Click "Upload skill" and select the downloaded ZIP file

Note: Please verify skill by going through its instructions before using it.

SKILL.md

name create-blog-post-from-url
description 从给定 URL 抽取信息并生成新的博客 Markdown 文章、资源目录和 frontmatter。

当用户提供一个文章 URL 并要求创建博客时,按以下流程执行。

输入

  • 必需: 原文 URL
  • 可选: 指定标题、发布日期、标签、是否需要图片

1. 收集信息

  • 使用 playwright/web 打开 URL,获取标题、作者/来源、发布日期、主旨摘要、章节结构。
  • 只保留与主题相关的关键段落,避免整段无差别搬运。
  • 若需要配图,优先选择文中主图或关键示意图并下载到本地。

2. 生成 ID 与 Slug

  • src/data/blog 中读取已有文件名,解析 {ID}- 数字前缀并递增。
  • 将 ID 保持为 3 位数字(例如 095 -> 096)。
  • Slug 使用 kebab-case;如果标题为中文,转成简短英文/拼音短语并保持唯一。

3. 处理图片资源

  • 创建 src/assets/{ID}/ 目录保存图片资源。
  • 图片文件名使用 kebab-case,例如 clean-architecture-diagram.png
  • 在 Markdown 中使用相对路径引用: ../../assets/{ID}/image-name.png
  • 为每张图片提供简洁、具体的 alt 文本。

4. 生成 Markdown 文件

  • 文件路径: src/data/blog/{ID}-{slug}.md
  • 使用以下 frontmatter 模板并填充内容:
---
pubDatetime: YYYY-MM-DD
title: "文章标题"
description: "80-160 字摘要,概括文章核心观点"
tags: ["Tag1", "Tag2"]
slug: "{slug}"
source: "{original_url}"
---
# {Title}

## 背景

## 关键要点

## 实践建议

5. 质量检查

  • 说明文字清晰、段落结构合理,避免冗长。
  • tags 保持 2-6 个,包含技术主题(如 .NET, Azure, Architecture)。
  • source 必须指向原始 URL。
  • 文章中图片路径与目录保持一致。