본문으로 건너뛰기
cccskills
무료GitHub에 공개

data-formats

Working with diverse data formats: binary, text, structured, and custom

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md2.8 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Data Formats

How to work with diverse and unknown data formats.

Format Detection

Always inspect before parsing:

file <filename>                    # MIME type detection
xxd <filename> | head -5           # hex dump (first bytes)
head -3 <filename>                 # text preview
python3 -c "
with open('<filename>', 'rb') as f:
    h = f.read(16)
    print(h, h.hex())
"

Common Formats

Binary

  • Magic bytes: Most binary formats start with a signature (ELF: \x7fELF, PNG: \x89PNG)
  • Endianness: Check if little-endian or big-endian (struct.unpack('<I', ...) vs '>I')
  • Alignment: Fields are often aligned to 4 or 8 bytes
  • Offsets: Binary headers often contain offsets to other sections

Structured text

  • CSV/TSV: Check delimiter (comma, tab, pipe), quoting, header row
  • JSON: python3 -c "import json; json.load(open('f'))"
  • YAML: Check indentation, anchors/aliases
  • TOML: python3 -c "import tomllib; ..."
  • XML: Check encoding declaration, namespaces

Checkpoints / Model files

  • PyTorch: .pt, .pth → torch.load(f, map_location='cpu')
  • TensorFlow: .ckpt → index + data files, use tf.train.load_checkpoint()
  • NumPy: .npy, .npz → numpy.load()
  • HuggingFace: config.json + model.safetensors
  • ONNX: onnx.load()

Database files

  • SQLite: file says "SQLite 3.x database" → sqlite3 <file> ".tables"
  • WAL files: SQLite write-ahead log — recover with sqlite3 PRAGMA
  • CSV dumps: Often need schema inference

Parsing Strategies

Unknown binary format

  1. Hex dump first 256 bytes: xxd file | head -16
  2. Look for magic bytes, version numbers, string tables
  3. Check file size — does it suggest a pattern? (e.g., N * record_size)
  4. Look for documentation of the format online
  5. Write a minimal parser, test on known values

Large structured files

  1. Never load entirely — sample first: head, tail, shuf -n 10
  2. Check consistency: are all lines the same format?
  3. Count fields: head -1 file | awk -F',' '{print NF}'
  4. Watch for: mixed types, missing values, encoding issues

Multi-file datasets

  1. List all files and sizes
  2. Look for manifest/index files (often JSON or CSV)
  3. Check naming patterns — timestamps, sequence numbers, shards
  4. Process one file first, then generalize

Common Pitfalls

  • Assuming UTF-8 when the file is Latin-1 or binary
  • Assuming CSV when it's TSV (or vice versa)
  • Ignoring the header row
  • Not handling quoted fields with embedded delimiters
  • Reading binary files as text (corrupts data)
  • Endianness mismatch (x86 is little-endian, network byte order is big-endian)

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Building, compiling, and resolving dependency issues across languages

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

vstorm-co/pydantic-deepagents1.1천2026년 10월 6일 업데이트

Systematic code review for bugs, security, style, and performance

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

vstorm-co/pydantic-deepagents1.1천2026년 10월 6일 업데이트

Review Python code for quality, security, and best practices

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

vstorm-co/pydantic-deepagents1.1천2026년 10월 6일 업데이트

Comprehensive data analysis skill for CSV files using Python and pandas

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

vstorm-co/pydantic-deepagents1.1천2026년 10월 6일 업데이트

Best practices for creating research diagrams with Excalidraw MCP tools

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

vstorm-co/pydantic-deepagents1.1천2026년 10월 6일 업데이트

Systematic exploration of unknown environments before starting work

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

vstorm-co/pydantic-deepagents1.1천2026년 10월 6일 업데이트

vstorm-co의 스킬 모두 보기

이 스킬의 문제 신고