AgentSkillsCN

structured-data-formatter

当用户需要按照特定模板或参考格式对提取的数据进行格式化时,尤其是在处理Markdown文件、YAML结构或预定义的输出格式时,该技能会读取参考格式文件,从各类来源中提取原始数据,并依据指定的格式化规则,将其转换为结构一致的输出。当用户提出“格式应参照……”“按格式写入文件”“遵循模板”等需求,或当用户提供了用于输出格式化的参考文件时,该技能便会自动触发。

SKILL.md
--- frontmatter
name: structured-data-formatter
description: When the user needs to format extracted data according to specific templates or reference formats, particularly when working with markdown files, YAML structures, or predefined output formats. This skill reads reference format files, extracts raw data from various sources, and transforms it into consistently structured output following specified formatting rules. It's triggered by keywords like 'format should reference', 'write to file with format', 'following template', or when users provide reference files for output formatting.

Instructions

Primary Objective

Format extracted data into a specified output structure by reading a reference format file and applying its template to raw data.

Core Workflow

  1. Identify the Request: The user will ask to write data to a file, explicitly mentioning a reference format file (e.g., "format should reference format.md") or a specific structure (e.g., "in YAML format").
  2. Locate the Reference Format:
    • First, read the specified reference file (e.g., format.md) to understand the required output structure, headers, syntax (like YAML fences `