extract-excerpt

Generates YAML excerpt fields for translated Chinese Markdown articles from body paragraphs.

4.7k|260|Updated Dec 29, 2021
One-click install
npx skills add https://github.com/beatai-org/beatai --skill extract-excerpt
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: extract-excerpt
Source: https://github.com/beatai-org/beatai/tree/main/.claude/skills/extract-excerpt
Command: npx skills add https://github.com/beatai-org/beatai --skill extract-excerpt

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill fills the missing frontmatter excerpt field in translated Chinese Markdown articles by choosing the real opening body paragraph when the author did not provide a subtitle.

Core Features & Use Cases

  • Detect existing excerpt and avoid overwriting: Skips articles that already have an excerpt unless overwrite is explicitly requested.
  • Extract and rank candidate opening paragraphs: Uses helper logic to skip non-body elements like headings, images, code blocks, and CTA lines, then provides candidates for semantic selection.
  • Write excerpt back into YAML frontmatter: Inserts or replaces the excerpt field in the correct location (after translated and before tags) without modifying the article body.

Quick Start

Use the extract-excerpt skill to fill excerpt for slugs you provide under a target_root by invoking it with explicit slugs and target_root, and optionally set max_chars and overwrite.

Frequently Asked Questions about extract-excerpt

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automatically generate frontmatter excerpts for translated markdown articles?

To automatically generate frontmatter excerpts for translated markdown articles, this skill selects the first real body paragraph and writes it into the YAML excerpt field. It requires explicit slugs and a target root directory from the caller to process single or batch backfill workflows.

How does excerpt extraction identify the opening paragraph in markdown?

Excerpt extraction identifies the opening paragraph by skipping non-body elements like headings, images, code blocks, and CTA lines. It then ranks the remaining candidate paragraphs to perform semantic selection, picking the first real body content to use as the excerpt.

Can I batch backfill missing excerpt fields in YAML frontmatter?

Yes, you can batch backfill missing excerpt fields in YAML frontmatter by providing explicit slugs and a target root. The skill processes multiple articles, skipping any that already have an excerpt unless you explicitly set the overwrite option.

Will generating markdown excerpts modify my existing content or translation?

Generating markdown excerpts will not modify your existing content or translation. The skill writes the excerpt back into the YAML frontmatter without translating the text, changing dates, or altering any non-excerpt fields in the markdown file.

What are the limitations of using yml yaml excerpt generation for content formatting?

A limitation of yml yaml excerpt generation is that it requires explicit slugs and target root inputs from the caller. Additionally, it only inserts or replaces the excerpt field in a specific location and does not translate the text or process non-excerpt frontmatter fields.