본문으로 건너뛰기
Skillpedia
PDF, Word, 슬라이드9.5k · #12273

xberg-picking-a-format

하는 일

이 스킬은 문서에서 텍스트를 추출할 때 어떤 출력 형식을 고를지 설명합니다. 결과를 AI 도구, 검색 데이터베이스, 다른 소프트웨어에 넣는 사람을 위한 것입니다.

사용하는 경우

  • ✓추출한 텍스트를 깔끔하게 정리해 AI 모델에 보내려 할 때.
  • ✓벡터 저장소나 검색 색인에 문서를 넣을 때.
  • ✓다른 프로그램이 읽을 수 있는 구조화된 출력이 필요할 때.

스킬 링크

https://github.com/xberg-io/xberg/blob/main/plugin/.ai-rulez/skills/xberg-picking-a-format/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/xberg-io/xberg/blob/main/plugin/.ai-rulez/skills/xberg-picking-a-format/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“AI 챗봇을 위해 문서를 추출하려 합니다. 어떤 출력 형식을 써야 할까요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트는 출력을 받는 대상에 맞는 형식과 콘텐츠 형식 설정을 고릅니다. 예를 들어 AI 모델에는 마크다운, 프로그램에는 JSON을 쓰고, 불필요한 공백을 제거할 수도 있습니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Picking a format

Xberg has two orthogonal format knobs. Get them right up front and the downstream code stays simple.

Knob What it controls Values Default
--format How the CLI prints the result text, json, toon text (extract), json (batch)
--content-format How extracted content is rendered inside result plain, markdown, djot, html, json, doctags plain
--token-reduction Strip whitespace / boilerplate for LLM contexts off, light, moderate, aggressive, maximum off

--format json returns an envelope wrapping the ExtractedDocument — the document lives under .result for extract and under .results[] for batch, with content, metadata, tables, and images as fields of that nested document. --format text prints just content. --content-format is what shows up inside that content field.

Decision tree

Who consumes the output?
├── LLM (Claude, GPT, Gemini, local) — embed/prompt context
│       --format text --content-format markdown
├── Vector store / RAG indexer
│       --format json --content-format markdown
│       (markdown preserves structure for chunking)
├── Downstream parser that expects machine-readable JSON
│       --format json --content-format plain
│       (cleanest text + structured metadata)
├── Human review / archival
│       --format text --content-format markdown
├── HTML re-rendering / web display
│       --format json --content-format html
├── Lossless intermediate for pandoc / academic tooling
│       --format json --content-format djot
└── Token-budget-constrained pipeline
        --format text --content-format plain
        (drops markup; add --token-reduction moderate for further savings)

Examples

Feed a PDF directly into an LLM:

xberg extract paper.pdf --content-format markdown

Index a corpus into a RAG store with tables and headings preserved:

xberg batch docs/*.pdf --format json --content-format markdown \
  | jq -c '.result | {content: .content, tables: .tables}'

Strip a file to bare text for a token-tight summarizer:

xberg extract long.pdf \
  --content-format plain \
  --token-reduction moderate

Pull metadata only, ignore content:

xberg extract file.pdf --format json | jq '.result.metadata'

When in doubt

  • Default to markdown as the content format. It is the best compromise across LLMs, RAG, and human review, and Xberg has the most faithful renderer for it.
  • Reach for plain only when downstream cannot tolerate any markup.
  • Reach for djot only if you're already in a djot/pandoc pipeline.
  • Reach for html only when re-rendering for the web.
  • Reach for json for a heading-driven content tree, or doctags for Docling-compatible output.

Token-reduction (orthogonal)

--token-reduction collapses whitespace, strips repeated headers/footers, and trims boilerplate. It composes with any --content-format:

  • off (default), light, moderate, aggressive, maximum.

Use moderate as a safe starting point for LLM context windows. maximum is lossy — verify before relying on it.

See ../../references/cli-reference.md for the full flag set and ../../references/configuration.md for the equivalent output_format and token_reduction keys in xberg.toml.

자주 묻는 질문

형식과 콘텐츠 형식의 차이는 무엇인가요?

형식은 명령이 결과를 출력하는 방식을 정하고, 콘텐츠 형식은 그 안의 텍스트를 어떻게 쓸지 정합니다.

어떤 형식이 AI 모델에 적합한가요?

이 스킬은 AI 모델의 문맥에는 텍스트나 마크다운 출력을 권장합니다.

토큰 줄이기는 무엇을 하나요?

불필요한 공백과 상투적인 문구를 꺼짐부터 최대까지 단계별로 제거해서, AI 프롬프트의 공간을 아껴 줍니다.

상세 정보

작성자의 원본 설명

Use when choosing an output format for extracted documents — plain text, markdown, djot, HTML, JSON, or DocTags. Maps consumer (LLM, parser, archive) to the right `--format` / `--content-format` pair.

repo: xberg-io/xberg

인기도

GitHub 스타
9.5k
순위
#12273
라이선스
MIT
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬