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.
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.
[](https://agentmods.dev/skills/lingyichen-ai/openskills/file-to-article-generator)<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>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.
| Model | Per session | Once 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 |
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.
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.
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语法插入图片:
 - 确保配图与文章内容契合,避免随意插入图片
6. 结果打分(必须执行)
根据 references/evaluation-prompts.md 中的评估Prompt对生成的文章进行质量评估:
- 重要:此步骤为必须执行,不可跳过
- 根据文章类型选择合适的评估角色(老板/客服总监)
- 评估标题点击欲望(50分):痛点匹配度、结果确定性、去空泛化
- 评估全文阅读价值(50分):落地性、迁移性、决策支持
- 计算总分并给出刻薄但真实的评估报告
- 提供标题改写建议和内容缺憾分析
7. 输出交付
按照 assets/output-template.md 的格式输出最终结果:
- 原文摘要
- 生成的完整文章内容(使用Markdown语法引用图片)
- 质量评估报告(必须包含在文章最后)
- 图片清单(索引、本地路径、描述)
- 文件下载说明
What ships with it
21 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- assets/output-template.md 1.9 KB
- demo.py 7.4 KB runs code
- output/generated_article.md 7.6 KB
- output/images/image_001.png 14 KB
- output/images/image_002.png 313 KB
- output/images/image_003.png 1448 KB
- output/images/image_004.png 232 KB
- output/images/image_005.png 422 KB
- output/images/image_006.png 35 KB
- output/images/image_007.png 725 KB
- output/images/image_008.png 457 KB
- output/images/image_009.png 57 KB
- output/images/image_010.png 97 KB
- output/images/image_011.png 128 KB
- output/images/image_012.png 719 KB
- references/article-types.md 5.9 KB
- references/evaluation-prompts.md 6.1 KB
- references/file-formats.md 6.3 KB
- references/generation-prompts.md 22 KB
- references/scoring-criteria.md 8.1 KB
- scripts/parse_file.py 10 KB runs code
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.
- 8d ago First seen · 179 lines · 138 tokens per session scan A 4e3322107dcd
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.
Other skills, from other repositories
pydicom
Use pydicom to read, inspect, write, transform, and safely preflight local DICOM datasets and pixel data. Applies to DICOM metadata, transfer syntaxes, compression plugins, frames, private elements, JSON, and bounded de-identification review.
foundry-hosted-agent-validation
Step-by-step process for validating a Python Foundry hosted agent sample (under python/samples/04-hosting/foundry-hosted-agents/) end to end — running it locally (native runtime and azd ai agent run) and after deploying it to an Azure AI Foundry project with azd. Use this when asked to validate a hosted agent sample.
skill-doc-delivery
Convert markdown to DOCX, PPTX, XLSX, PDF office documents — use when you need exportable deliverables.
pdf-extract-create-workflow
Complete PDF lifecycle: download, extract, and generate structured documents with reportlab.
document-direct-python
Use direct Python execution for reliable document creation including spreadsheets, PDFs, and structured reports.
pdf-text-extraction-fallback-85d5ca
Fallback workflow for extracting text from PDFs when readfile returns binary data.