xberg-extracting-tables
하는 일
이 스킬은 레이아웃 인식을 사용해 문서에서 표를 가져오는 방법을 보여 줍니다. 재무제표, 청구서, 연구 표를 쓸 수 있는 형태로 얻어야 하는 사람을 위한 것입니다.
사용하는 경우
- ✓PDF 보고서, 청구서, 재무제표에서 표가 필요할 때.
- ✓AI가 읽을 수 있도록 표 데이터를 깔끔한 마크다운으로 얻고 싶을 때.
- ✓다른 소프트웨어가 쓸 수 있도록 정확한 셀 값을 구조화된 파일로 얻어야 할 때.
스킬 링크
https://github.com/xberg-io/xberg/blob/main/plugin/.ai-rulez/skills/xberg-extracting-tables/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“이 재무제표 PDF의 모든 표를 스프레드시트에서 열 수 있는 구조화된 파일로 뽑아 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 도구가 표 경계를 찾도록 레이아웃 감지를 켠 뒤, 선택한 출력 형식에 따라 텍스트 안의 마크다운 표나 셀의 구조화된 목록을 돌려줍니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Extracting tables
Use this when the user wants structured tabular data — financial statements, scientific tables, invoices, spreadsheet-style PDFs. Xberg detects tables via a layout model (RT-DETR v2) and reconstructs cell structure with a configurable table model.
Basic usage
# Markdown tables embedded in the content stream
xberg extract report.pdf --layout --content-format markdown
# Structured JSON output, tables appear under result.tables
xberg extract report.pdf --layout --format json
--layout turns on layout-aware extraction; without it, tables fall back
to plain text reflow and you lose cell boundaries.
Output shapes
Two surfaces, picked via --format (CLI shape) and --content-format
(content rendering):
- Markdown tables in
content—--content-format markdown. Tables appear inline as| col | col |blocks. Good for LLM ingestion. - Structured
tablesarray —--format json. Each entry hascells[][](rows × cols),markdown(pre-rendered),page_number,bounding_box. Use this when downstream code needs exact cell access. (bounding_boxis omitted when no position data is available.)
Both are populated at once when --layout is on. The tables array is
always structured; the content stream switches representation.
xberg extract financials.pdf --layout --format json \
| jq '.result.tables[] | {page: .page_number, rows: (.cells | length)}'
Table models
--layout-table-model picks the reconstruction backend:
| Model | Best for | Notes |
|---|---|---|
tatr |
dense complex tables (academic, financial) | Default. Heaviest, highest accuracy. |
slanet_auto |
dispatches per-table to wired/wireless | Good when table styles are mixed. |
slanet_wired |
tables with visible borders | Faster than tatr. |
slanet_wireless |
tables without borders (whitespace-separated) | For invoices, simple grids. |
slanet_plus |
hybrid wired / wireless | Lighter than slanet_auto. |
disabled |
layout detection only, no table structure | Use to skip table model cost. |
xberg extract bank-statement.pdf \
--layout --layout-table-model tatr --content-format markdown
Drop --layout-confidence when the layout model misses tables (default
threshold ~0.5):
xberg extract noisy-scan.pdf --layout --layout-confidence 0.3
Spreadsheets
.xlsx, .ods, .csv, .tsv are extracted by dedicated parsers — no
layout model needed. Each sheet becomes a markdown table (or structured
table) automatically:
xberg extract workbook.xlsx --content-format markdown
xberg extract data.csv --format json
Pass --no-cache=true only when iterating on the same file with different
configs.
Config file alternative
# `output_format` in config files equals `--content-format` on the CLI.
output_format = "markdown"
[layout]
confidence_threshold = 0.5
table_model = "tatr"
Then:
xberg extract report.pdf --format json
Programmatic access
From Python, structured tables live on the document in the result envelope
(result.results[0].tables):
from xberg import ExtractInput, extract, ExtractionConfig, LayoutDetectionConfig
config = ExtractionConfig(
layout=LayoutDetectionConfig(table_model="tatr"),
output_format="markdown",
)
result = await extract(ExtractInput(uri="report.pdf"), config)
for table in result.results[0].tables:
print(table.markdown) # rendered markdown
print(table.cells[0][0]) # cell access
Node.js mirrors this (extract, output.results[0].tables, camelCase fields).
See ../../references/python-api.md and ../../references/nodejs-api.md for full type signatures.
Known limitations
- Merged cells — reconstructed as repeated values across the spanned region; the merge is not preserved as metadata.
- Rotated tables — enable
--ocr-auto-rotate truefor image-based PDFs before extraction. - Nested tables — flattened. Detection succeeds; structural nesting is lost.
- **Multi-page table
자주 묻는 질문
레이아웃 설정을 왜 켜나요?
이 설정이 없으면 표가 일반 텍스트로 흘러 나오고 셀의 경계가 사라집니다.
어떤 출력을 골라야 하나요?
마크다운 표는 AI가 읽기에 적합하고, 구조화된 목록은 정확한 셀이 필요한 소프트웨어에 적합합니다.
표를 항상 정확히 얻나요?
아니요. 이 스킬은 알려진 한계를 적어 두므로, 결과를 원본 문서와 대조해 확인하세요.
상세 정보
작성자의 원본 설명
Use when extracting tabular data from PDFs, spreadsheets, or images. Covers layout-aware table detection, table model selection, output formats (markdown / JSON cells), and known limits.
repo: xberg-io/xberg
인기도
- GitHub 스타
- 9.5k
- 순위
- #12271
- 라이선스
- MIT
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
xberg-batch-extraction
9.5k에이전트가 Xberg로 많은 문서를 한 번에 처리하도록 돕습니다. 공통 옵션을 쓰고, 실패한 파일이 나머지를 멈추지 않게 합니다.
xberg-chunking
9.5k에이전트가 긴 문서 텍스트를 AI 프롬프트나 검색 색인에 맞게 작은 조각으로 나누도록 돕습니다. 크기와 겹침을 정할 수 있습니다.
xberg-extracting-keywords
9.5k에이전트가 문서에서 핵심 키워드나 핵심 구문을 뽑고 문서의 언어를 감지하도록 돕습니다. Xberg의 키워드 설정을 사용합니다.
xberg-extracting-with-ocr
9.5k에이전트가 텍스트 층이 없는 스캔 PDF, 사진, 이미지에서 OCR로 글자를 읽도록 돕습니다. 언어 팩을 선택적으로 쓸 수 있습니다.
비슷한 스킬
feishu-doc
394k에이전트가 문서 도구를 사용해 텍스트, 이미지, 표를 포함한 Feishu 클라우드 문서를 읽고, 만들고, 편집하도록 돕습니다.
feishu-drive
394k에이전트가 봇과 공유된 Feishu 클라우드 폴더의 파일을 찾아보고, 정리하고, 댓글을 달도록 돕습니다.
feishu-perm
394k에이전트가 요청을 충족하는 가장 작은 권한을 골라, Feishu 파일에 누가 접근할 수 있는지 확인하고 바꾸도록 돕습니다.