file-to-article-generator

file-to-article-generator is a skill for Claude Code, Codex from LingyiChen-AI/OpenSkills. It costs 138 tokens per session (2,358 once invoked), scanned A, original, Apache-2.0.

A document-to-article skill reads PDFs, Word documents, and common image files, extracts their text and pictures, and creates a Markdown article from the content.

In plain words
What is it for?
Use it to create brand or product reports, product updates, policy notices, marketing campaigns, customer stories, or industry news from uploaded files.
Why use it?
It avoids manually copying material from source files and helps match the article type and illustrations to the supplied content.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /home/gem/output.

Good fit Use it to create brand or product reports, product updates, policy notices, marketing campaigns, customer stories, or industry news from uploaded files.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

There is no command for this one: it runs only inside a plugin, and the catalogue could not identify which plugin ships it. The source is linked below.

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for file-to-article-generator

README.md
[![agentmods](https://agentmods.dev/badge/skills/lingyichen-ai/openskills/file-to-article-generator.svg)](https://agentmods.dev/skills/lingyichen-ai/openskills/file-to-article-generator)
Your own site
<a href="https://agentmods.dev/skills/lingyichen-ai/openskills/file-to-article-generator"><img src="https://agentmods.dev/badge/skills/lingyichen-ai/openskills/file-to-article-generator.svg" alt="Measured on agentmods" height="20"></a>
Per session 138 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,358 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00138 $0.02358
Opus 5 $0.00069 $0.01179
Sonnet 5 $0.00028 $0.00472
Haiku 4.5 $0.00014 $0.00236

Measured 8d ago against content hash 4e3322107dcd, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

file-to-article-generator scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (demo.py, scripts/parse_file.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

examples/file-to-article-generator/SKILL.md · 179 lines

How it starts

The opening of the file, as written. The whole thing — 179 lines — stays where its author put it; the contents beside it link to each section on GitHub.

文件解析与文章生成器

任务目标

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

前置准备

  • 依赖说明:
    PyMuPDF==1.23.8      # PDF文件解析和图片提取
    python-docx==0.8.11  # Word文件解析和图片提取
    Pillow==10.0.0       # 图片处理和格式转换
    
  • 非标准文件/文件夹准备:创建输出目录
    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语法引用图片)
  • 质量评估报告(必须包含在文章最后)
  • 图片清单(索引、本地路径、描述)
  • 文件下载说明

Read the full file on GitHub · 179 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 179 lines · 138 tokens per session scan A 4e3322107dcd

Subscribe to this mod's changes

file-to-article-generator is a skill published in the GitHub repository LingyiChen-AI/OpenSkills (68 stars, last pushed 7mo ago), licensed Apache-2.0. It adds 138 tokens to every session and 2,358 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.