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가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
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
markdownas 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
plainonly when downstream cannot tolerate any markup. - Reach for
djotonly if you're already in a djot/pandoc pipeline. - Reach for
htmlonly when re-rendering for the web. - Reach for
jsonfor a heading-driven content tree, ordoctagsfor 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.
댓글
- …
이 저장소의 다른 스킬
xberg-batch-extraction
9.5k에이전트가 Xberg로 많은 문서를 한 번에 처리하도록 돕습니다. 공통 옵션을 쓰고, 실패한 파일이 나머지를 멈추지 않게 합니다.
xberg-chunking
9.5k에이전트가 긴 문서 텍스트를 AI 프롬프트나 검색 색인에 맞게 작은 조각으로 나누도록 돕습니다. 크기와 겹침을 정할 수 있습니다.
xberg-extracting-keywords
9.5k에이전트가 문서에서 핵심 키워드나 핵심 구문을 뽑고 문서의 언어를 감지하도록 돕습니다. Xberg의 키워드 설정을 사용합니다.
xberg-extracting-tables
9.5k에이전트가 PDF, 스프레드시트, 이미지에서 표를 뽑고, 행과 열을 유지한 채 마크다운이나 구조화된 데이터로 바꾸도록 돕습니다.
비슷한 스킬
feishu-doc
394k에이전트가 문서 도구를 사용해 텍스트, 이미지, 표를 포함한 Feishu 클라우드 문서를 읽고, 만들고, 편집하도록 돕습니다.
feishu-drive
394k에이전트가 봇과 공유된 Feishu 클라우드 폴더의 파일을 찾아보고, 정리하고, 댓글을 달도록 돕습니다.
feishu-perm
394k에이전트가 요청을 충족하는 가장 작은 권한을 골라, Feishu 파일에 누가 접근할 수 있는지 확인하고 바꾸도록 돕습니다.