Content Parser logo

Content Parser

Organization
cas-bigdatalab
content_parser

内容解析预处理工具。读取采集后的 JSONL、JSON 或 TXT 文本记录,执行轻量内容解析,输出带标题、段落结构和内容类型的统一解析记录文件。 当用户提到接入内容解析、采集后预处理、提取标题和段落、识别 plain/markdown/html 内容结构等需求时使用此 skill。 即使用户没有明确说出"内容解析",只要任务涉及把已采集文本内容解析成统一结构,就应该使用此 skill。 不负责文件采集、表格抽取、内容清洗、质量校验、过滤筛选或格式转换。

Overview

Publishercas-bigdatalab
Repositorypiflow
Skill namecontent_parser
Stars
541
Forks
172
Bundled files
3
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.

  • 3 bundled files

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

  • Open source

    Published by cas-bigdatalab on GitHub. Read the source before you install it.

Installation

Install the Content Parser 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.
    https://github.com/cas-bigdatalab/piflow/tree/master/workspace/skills/content_parser
  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/cas-bigdatalab/piflow.git /tmp/piflow
mkdir -p .claude/skills
cp -r /tmp/piflow/workspace/skills/content_parser .claude/skills/content_parser
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Content Parser 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 Content Parser 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 Content Parser 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.

Content Parser 内容解析预处理 Skill

功能概述

本 skill 用于读取采集后的文本记录,对 text 字段做轻量内容解析,识别 plain、markdown、html 内容类型,并输出标题、段落结构、字符数、词数等解析结果。

触发条件

当用户请求以下任务时,应使用此 skill:

  • 接入内容解析
  • 采集后预处理
  • 提取文本标题和段落结构
  • 识别 plain、markdown、html 内容类型
  • 将已采集文本内容转为统一解析记录

不适用于文件采集、表格抽取、内容清洗、质量校验、过滤筛选或格式转换;这些任务需要使用对应的采集、清洗、校验、过滤或转换 skill。

核心参数说明

必需参数

参数说明
--input输入文件路径,支持 jsonl/json/txt
--output输出文件路径

可选参数

参数说明默认值
--parse_mode解析模式,支持 auto、plain、markdown、htmlauto
--extract_title是否提取标题True
--extract_paragraphs是否提取段落列表True
--output_format输出格式,支持 jsonl、json、autojsonl

输入文件格式

输入可以是 JSONL、JSON 或 TXT 文件。JSONL/JSON 中每条记录应包含 text 字段;TXT 文件会整体作为一条文本记录处理。

json
{"text": "# Research Note\n\nFirst paragraph..."}
{"text": "<html><title>Report</title><p>HTML paragraph.</p></html>"}

使用方法

自动识别内容类型并输出 JSONL

bash
python scripts/run_content_parser.py \
  --input ./content_records.jsonl \
  --output ./content_parser_output.jsonl \
  --parse_mode auto \
  --extract_title true \
  --extract_paragraphs true \
  --output_format jsonl

按纯文本模式解析 TXT 文件

bash
python scripts/run_content_parser.py \
  --input ./note.txt \
  --output ./content_parser_output.json \
  --parse_mode plain \
  --output_format json

处理示例

输入内容参数效果预期结果
Markdown 标题和段落--parse_mode autocontent_type=markdown,提取标题和段落
HTML title 和 p 标签--parse_mode autocontent_type=html,提取标题和段落
普通文本--parse_mode autocontent_type=plain,首个非空行作为标题
空 text 字段任意模式输出 _parsed.error,不崩溃

输出示例

json
{"_parsed": {"raw_text": "# Research Note...", "content_type": "markdown", "title": "Research Note", "paragraphs": ["Research Note", "First paragraph..."], "paragraph_count": 2, "char_count": 42, "word_count": 5, "parsed_at": "2026-06-12 14:00:00"}, "text": "# Research Note..."}

环境要求

使用仓库内 Python 环境运行;Windows bash 下建议加 PYTHONIOENCODING=utf-8 避免中文控制台编码问题。HTML 解析优先使用 beautifulsoup4,缺少依赖时脚本会退回正则清理。

注意事项

  1. parse_mode=auto 会根据内容特征识别 plain、markdown 或 html。
  2. 输入 JSONL/JSON 记录中缺少 text 或 text 为空时,输出 _parsed.error。
  3. 本 skill 只做轻量解析,不做清洗、过滤或质量判定。

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 Content Parser AI skill do?

内容解析预处理工具。读取采集后的 JSONL、JSON 或 TXT 文本记录,执行轻量内容解析,输出带标题、段落结构和内容类型的统一解析记录文件。 当用户提到接入内容解析、采集后预处理、提取标题和段落、识别 plain/markdown/html 内容结构等需求时使用此 skill。 即使用户没有明确说出"内容解析",只要任务涉及把已采集文本内容解析成统一结构,就应该使用此 skill。 不负责文件采集、表格抽取、内容清洗、质量校验、过滤筛选或格式转换。

Why use Content Parser on TypingMind?

Because you install it once and use it with any model. Content Parser 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 Content Parser in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/cas-bigdatalab/piflow/tree/master/workspace/skills/content_parser. 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 Content Parser?

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 Content Parser?

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

Is the Content Parser AI skill free?

It is published on GitHub by cas-bigdatalab. Check the repository for licensing terms. 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 👇