File To Article Generator logo

File To Article Generator

Community
LingyiChen-AI
file-to-article-generator

解析用户上传的文件(PDF/Word/图片),提取文本内容和图片并保存到本地,使用图像识别能力理解图片内容,根据文件内容和用户需求判断文章类型(品牌动向/产品动态/政策规则/营销战役/客户证言/行业资讯),使用不同prompt生成Markdown格式的文章,使用Markdown语法引用图片,确保配图与文章内容契合,并对生成结果进行质量打分。适用于需要从现有文档生成各类品牌和产品内容的场景,如品牌报道、产品发布、政策公告、营销宣传、客户案例等。

Overview

PublisherLingyiChen-AI
RepositoryOpenSkills
Skill namefile-to-article-generator
Stars
69
Forks
5
Bundled files
21
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 21 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by LingyiChen-AI on GitHub. Read the source before you install it.

Installation

Install the File To Article Generator AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/LingyiChen-AI/OpenSkills.git /tmp/OpenSkills
mkdir -p .claude/skills
cp -r /tmp/OpenSkills/examples/file-to-article-generator .claude/skills/file-to-article-generator
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable File To Article Generator in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads File To Article Generator on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so File To Article Generator is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

文件解析与文章生成器

任务目标

  • 本 Skill 用于:从用户上传的文件(PDF/Word/图片)中提取内容,将图片保存到本地,根据需求和内容生成文章
  • 能力包含:多格式文件解析、图片提取与保存、图片内容智能理解、6种文章类型智能判断(品牌动向/产品动态/政策规则/营销战役/客户证言/行业资讯)、多类型文章生成(Markdown格式)、配图契合度检查、质量评分评估
  • 触发条件:用户上传文件并要求生成品牌或产品相关文章时

前置准备

  • 依赖说明:
    PyMuPDF==1.23.8      # PDF文件解析和图片提取
    python-docx==0.8.11  # Word文件解析和图片提取
    Pillow==10.0.0       # 图片处理和格式转换
  • 非标准文件/文件夹准备:创建输出目录
    bash
    mkdir -p output/images

操作步骤

标准流程

1. 文件解析

使用 [INVOKE:parse_file] 调用脚本处理用户上传的文件:

  • 输入:通过 stdin 传递 JSON 格式的参数 {"file_path": "文件路径"}
  • 输出目录:/home/gem/output/images/(脚本会自动创建)
  • 输出:JSON格式的解析结果,包含文本内容、图片列表(含本地路径)、元数据
  • 支持格式:PDF、DOCX、常见图片格式(JPG/PNG等)

调用方式: 在回复中包含以下格式来触发脚本执行:

[INVOKE:parse_file({"file_path": "/home/gem/uploads/文件名.pdf"})]

图片保存说明

  • 脚本会自动从文件中提取图片并保存到 /home/gem/output/images/ 目录
  • 图片命名格式:image_001.png, image_002.png
  • 返回的JSON中包含图片的本地路径,可直接用于Markdown引用
2. 需求收集

向用户询问生成文章的具体需求:

  • 目标受众:文章面向谁阅读?(如:技术人员、普通用户、管理层)
  • 文章用途:用于什么场景?(如:技术博客、产品介绍、新闻稿、内部报告)
  • 特殊要求:字数限制、语言风格、重点内容、格式偏好等
3. 图片内容理解

如果解析结果包含图片,对每个图片进行内容理解:

  • 使用图像识别能力分析图片内容(主题、场景、元素、风格等)
  • 提取图片的核心信息和视觉特征
  • 判断图片与原文内容的关联度
4. 类型判断

根据解析的文件内容、图片内容和用户需求,判断文章类型:

  • 参考 references/article-types.md 中的类型定义和判断标准
  • 智能体分析文件内容特征和用户需求关键词
  • 确定最匹配的文章类型(如:新闻报道、技术文档、产品介绍、教程指南等)
5. 文章生成

根据确定的文章类型,使用对应的prompt模板生成内容:

  • references/generation-prompts.md 选择对应类型的prompt
  • 替换prompt中的变量:
    • {ORIGINAL_TEXT}: 原文件提取的文本内容
    • {USER_REQUIREMENTS}: 用户的具体需求描述
    • {TARGET_AUDIENCE}: 目标受众
    • {IMAGES_INFO}: 图片信息列表(包含图片内容理解结果和本地路径)
  • 生成文章主体内容
  • 使用Markdown语法插入图片:![图片描述](./images/image_001.png)
  • 确保配图与文章内容契合,避免随意插入图片
6. 结果打分(必须执行)

根据 references/evaluation-prompts.md 中的评估Prompt对生成的文章进行质量评估:

  • 重要:此步骤为必须执行,不可跳过
  • 根据文章类型选择合适的评估角色(老板/客服总监)
  • 评估标题点击欲望(50分):痛点匹配度、结果确定性、去空泛化
  • 评估全文阅读价值(50分):落地性、迁移性、决策支持
  • 计算总分并给出刻薄但真实的评估报告
  • 提供标题改写建议和内容缺憾分析
7. 输出交付

按照 assets/output-template.md 的格式输出最终结果:

  • 原文摘要
  • 生成的完整文章内容(使用Markdown语法引用图片)
  • 质量评估报告(必须包含在文章最后)
  • 图片清单(索引、本地路径、描述)
  • 文件下载说明

注意:评估结果必须附加在文章内容的最后,作为文章质量的重要参考。

  • 质量评分报告(各维度得分、总分、改进建议)

下载说明

  • 文章保存为Markdown格式文件:./output/article.md
  • 图片保存在:./images/ 目录(相对于文章位置)
  • 用户可下载整个 ./output/ 目录,包含文章和所有图片

可选分支

  • 当文件仅包含图片(无文本):标记为图片型内容,根据图片描述生成相关文章
  • 当用户需求不明确:提供几个常见类型的示例,让用户选择
  • 当评分较低(<60分):询问用户是否需要重新生成,并提供改进方向

资源索引

注意事项

  • 文件解析必须通过脚本完成,确保准确提取文本和图片信息
  • 图片会被自动保存到沙箱,引用时使用相对路径 ./images/xxx.png
  • 图片内容理解必须使用图像识别能力,提取图片的主题、场景、元素和风格特征
  • 配图必须与文章内容契合,根据图片理解结果和文章主题合理插入图片,使用Markdown格式 ![描述](路径),避免随意配图
  • 文章类型判断、内容生成均由智能体完成,充分利用自然语言理解和创作能力
  • 结果打分步骤为必须执行,不可跳过,必须使用老板或主管角色对文章进行评估
  • 评估结果必须附加在文章内容的最后,作为文章质量的重要参考
  • 当评分较低(<60分)时,可根据评估报告中的标题改写建议和内容缺憾分析重新生成
  • 最终输出包括Markdown格式的文章、评估报告和所有图片文件,用户可一起下载

使用示例

示例1:品牌动向报道

  • 功能说明:将品牌发布会资料转换为品牌动向报道文章
  • 执行方式
    1. 解析品牌发布会文件
    2. 询问受众(公众/合作伙伴/媒体)和重点(品牌战略/合作亮点/活动氛围)
    3. 判断为品牌动向类型(brand-event)
    4. 使用品牌动向prompt生成文章
    5. 打分并输出结果
  • 关键参数:受众=公众,用途=品牌宣传,风格=积极正面

示例2:产品动态发布

  • 功能说明:将产品更新文档转换为产品动态文章
  • 执行方式
    1. 解析产品版本更新说明文件
    2. 询问重点功能和技术亮点
    3. 判断为产品动态类型(product-feature)
    4. 使用产品动态prompt生成文章
    5. 打分并输出结果
  • 关键参数:受众=用户,用途=功能介绍,风格=专业易懂

示例3:营销战役宣传

  • 功能说明:将促销活动资料转换为营销战役宣传文章
  • 执行方式
    1. 解析活动策划文件
    2. 询问活动优惠和目标用户
    3. 判断为营销战役类型(product-campaign)
    4. 使用营销战役prompt生成文章
    5. 打分并输出结果
  • 关键参数:受众=潜在用户,用途=活动宣传,风格=有吸引力

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the File To Article Generator AI skill do?

解析用户上传的文件(PDF/Word/图片),提取文本内容和图片并保存到本地,使用图像识别能力理解图片内容,根据文件内容和用户需求判断文章类型(品牌动向/产品动态/政策规则/营销战役/客户证言/行业资讯),使用不同prompt生成Markdown格式的文章,使用Markdown语法引用图片,确保配图与文章内容契合,并对生成结果进行质量打分。适用于需要从现有文档生成各类品牌和产品内容的场景,如品牌报道、产品发布、政策公告、营销宣传、客户案例等。

Why use File To Article Generator on TypingMind?

Because you install it once and use it with any model. File To Article Generator is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install File To Article Generator in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/LingyiChen-AI/OpenSkills/tree/main/examples/file-to-article-generator. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use File To Article Generator?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with File To Article Generator?

As many as you like. As long as a model supports skills, you can use File To Article Generator with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the File To Article Generator AI skill free?

Yes. It is published on GitHub by LingyiChen-AI under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇