Agent skill

Chunking Strategy Guide

by revfactory in revfactory/harness-100

RAG 파이프라인의 문서 청킹 전략을 체계적으로 설계하는 방법론. An agent skill from revfactory/harness-100.

Apache-2.0Auto-check passedAI & LLM Engineering

Install Chunking Strategy Guide

skills CLI
$ npx skills add revfactory/harness-100 --skill chunking-strategy-guide -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install revfactory/harness-100 chunking-strategy-guide --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/revfactory/harness-100.git skills-src && mkdir -p .claude/skills && cp -r skills-src/ko/41-llm-app-builder/.claude/skills/chunking-strategy-guide .claude/skills/chunking-strategy-guide && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
chunking-strategy-guide
GitHub stars
1.3k
Token cost
~827 tokens
SKILL.md length
205 words
Files
1
Skills in repo
464
Repo updated
First seen
Licence
Apache-2.0

At a glance

RAG 파이프라인의 문서 청킹 전략을 체계적으로 설계하는 방법론. An agent skill from revfactory/harness-100.

  • Tasks that involve Retrieval-augmented generation
  • SKILL.md covers 대상 에이전트, 청킹 전략 비교표, 청킹 파라미터 가이드 and 시맨틱 청킹 알고리즘, plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Chunking Strategy Guide is an agent skill from revfactory/harness-100. RAG 파이프라인의 문서 청킹 전략을 체계적으로 설계하는 방법론. '청킹 전략', '문서 분할', 'RAG 청킹', '임베딩 최적화', '시맨틱 청킹', '텍스트 분할' 등 RAG 데이터 전처리 시 사용한다. 단, 벡터 DB 인프라 구축, 임베딩 모델 학습은 이 스킬의 범위가 아니다.

Its SKILL.md is about 830 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in AI & LLM Engineering, covering Retrieval-augmented generation. The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Retrieval-augmented generation

Example prompts

  • “RAG 청킹”
  • “/chunking-strategy-guide”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit 8e8d35c. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Chunking Strategy Guide loads about 827 tokens when it runs. Until then it costs about 46 tokens; SKILL.md has 205 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~46
When it runs · the whole SKILL.md, loaded when a task matches
~827

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from revfactory/harness-100 at commit 8e8d35c, republished under its Apache-2.0 licence (© revfactory). 205 words, ~827 tokens.

Download SKILL.mdSave it as .claude/skills/chunking-strategy-guide/SKILL.md (or your agent's skills folder).
name
chunking-strategy-guide
description
RAG 파이프라인의 문서 청킹 전략을 체계적으로 설계하는 방법론. '청킹 전략', '문서 분할', 'RAG 청킹', '임베딩 최적화', '시맨틱 청킹', '텍스트 분할' 등 RAG 데이터 전처리 시 사용한다. 단, 벡터 DB 인프라 구축, 임베딩 모델 학습은 이 스킬의 범위가 아니다.

Chunking Strategy Guide — RAG 문서 청킹 전략

rag-architect의 데이터 전처리 역량을 강화하는 스킬.

대상 에이전트

  • rag-architect — 문서를 효과적으로 청킹하여 검색 품질을 높인다
  • eval-specialist — 청킹 전략의 검색 품질을 평가한다

청킹 전략 비교표

전략원리장점단점적합
고정 크기N토큰 단위 절단구현 간단의미 단절로그, 코드
문장 기반문장 단위 분리의미 보존크기 불균등뉴스, 블로그
단락 기반빈 줄 기준논리 단위 유지단락 크기 편차문서, 리포트
시맨틱임베딩 유사도 기준최고 품질느림, 비용복잡한 문서
재귀적계층적 분리자균형적설정 복잡범용
마크다운헤딩 기준구조 보존MD 전용기술 문서

청킹 파라미터 가이드

최적 청크 크기
| 문서 유형 | 청크 크기 | 오버랩 | 이유 |
|----------|----------|--------|------|
| FAQ | 100-200 토큰 | 0 | 질문-답변 쌍이 짧음 |
| 기술 문서 | 300-500 토큰 | 50 | 코드+설명 단위 |
| 법률 문서 | 500-800 토큰 | 100 | 조항 단위 |
| 학술 논문 | 400-600 토큰 | 80 | 단락 단위 |
| 채팅 로그 | 200-300 토큰 | 30 | 대화 턴 단위 |
| 소설/에세이 | 300-500 토큰 | 50 | 장면/단락 단위 |
오버랩 비율 공식
optimal_overlap = chunk_size * 0.1 ~ 0.2

규칙:
- 독립적 문서 (FAQ): 오버랩 0
- 연속적 문서 (매뉴얼): 10-15%
- 고밀도 문서 (법률): 15-20%
- 최대 오버랩: chunk_size의 25% 초과 금지

시맨틱 청킹 알고리즘

python
def semantic_chunking(text, model, threshold=0.5):
    """
    1. 문장 단위로 분리
    2. 인접 문장 쌍의 임베딩 코사인 유사도 계산
    3. 유사도가 threshold 이하인 지점에서 분리
    4. 최소/최대 청크 크기 제약 적용
    """
    sentences = split_sentences(text)
    embeddings = model.encode(sentences)

    breakpoints = []
    for i in range(len(embeddings) - 1):
        sim = cosine_similarity(embeddings[i], embeddings[i+1])
        if sim < threshold:
            breakpoints.append(i + 1)

    chunks = split_at(sentences, breakpoints)
    return enforce_size_limits(chunks, min=100, max=800)

문서 유형별 전처리 파이프라인

PDF
PDF → 텍스트 추출 (pdfplumber/pymupdf)
→ 헤더/푸터 제거
→ 페이지 번호 제거
→ 표 → 마크다운 변환
→ 이미지 → alt text / OCR
→ 메타데이터 추출 (제목, 저자, 날짜)
→ 청킹
HTML/웹페이지
HTML → 본문 추출 (trafilatura/readability)
→ 네비게이션/사이드바/광고 제거
→ 마크다운 변환
→ 링크 텍스트 보존 ([텍스트](URL))
→ 테이블 보존
→ 메타데이터 추출 (title, description)
→ 청킹
코드
코드 → AST 파싱
→ 함수/클래스 단위 분리
→ docstring + 시그니처 + 본문
→ 파일 경로 메타데이터 추가
→ 관련 테스트 코드 연결
→ 청킹 (함수 단위)

메타데이터 강화 전략

python
chunk_with_metadata = {
    "text": "청크 텍스트...",
    "metadata": {
        "source": "document.pdf",
        "page": 5,
        "section": "3.2 아키텍처",
        "heading_hierarchy": ["3. 설계", "3.2 아키텍처"],
        "chunk_index": 12,
        "total_chunks": 45,
        "created_at": "2025-01-15",
        "document_type": "technical_spec",
        "language": "ko"
    }
}

청킹 품질 평가 메트릭

메트릭공식기준
정보 완전성원본 핵심 정보 / 전체 핵심 정보>= 95%
의미 단절률문장 중간 절단 / 전체 청크<= 5%
크기 균일성1 - (std / mean)>= 0.7
검색 정밀도관련 청크 / 반환 청크 (top-5)>= 60%
검색 재현율반환 관련 / 전체 관련 (top-10)>= 80%

임베딩 모델 선택 가이드

모델차원한국어비용용도
text-embedding-3-small1536양호$0.02/1M범용, 비용 효율
text-embedding-3-large3072양호$0.13/1M고품질
multilingual-e5-large1024우수무료(로컬)한국어 특화
bge-m31024우수무료(로컬)다국어, 긴 컨텍스트
voyage-multilingual-21024우수$0.12/1M다국어 최고

© revfactory, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in ko/41-llm-app-builder/.claude/skills/chunking-strategy-guide of revfactory/harness-100.

Open the folder on GitHubat commit 8e8d35c

Compare with similar skills

Chunking Strategy Guide next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Chunking Strategy Guide compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Chunking Strategy Guide this skillrevfactory/harness-1001.3k—~827Automated safety check: PassApache-2.0
Chroma Vector DatabaseOrchestra-Research/AI-Research-SKILLs13k7 repos~2.3kAutomated safety check: PassMIT
Senior Prompt Engineermaslennikov-ig/claude-code-orchestrator-kit2603 repos~1.4kAutomated safety check: PassCustom licence
MCP Local RAGshinpr/mcp-local-rag411—~4.4kAutomated safety check: PassMIT
Ms Agent Framework RAGshuyu-labs/WebCode278—~1.1kAutomated safety check: PassCustom licence
Local RAG Searchnkapila6/mcp-local-rag1341 repos~1.6kAutomated safety check: PassMIT

Similar skills

  • Chroma Vector Database

    Orchestra-Research/AI-Research-SKILLs

    Shows how to store documents and embeddings in Chroma, query them by similarity with metadata filters, and persist them to disk for RAG and semantic search projects.

    13k GitHub starsUsed in 7 repos~2.3k tokens
    AI & LLM EngineeringAuto-check passed
  • Senior Prompt Engineer

    maslennikov-ig/claude-code-orchestrator-kit

    Provides reference guides and Python scripts for prompt optimization, RAG evaluation, and agent orchestration when building or tuning LLM systems.

    260 GitHub starsUsed in 3 repos~1.4k tokens
    AI & LLM EngineeringAuto-check passed
  • MCP Local RAG

    shinpr/mcp-local-rag

    Searches, saves, and maintains a local document index through a local RAG MCP server.

    411 GitHub stars~4.4k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • Ms Agent Framework RAG

    shuyu-labs/WebCode

    Comprehensive guide for building Agentic RAG systems using Microsoft Agent Framework in C.

    278 GitHub stars~1.1k tokensUpdated 3 mo ago
    AI & LLM EngineeringAuto-check passed
  • Local RAG Search

    nkapila6/mcp-local-rag

    Efficiently perform web searches using the mcp-local-rag server with semantic similarity ranking.

    134 GitHub starsUsed in 1 repo~1.6k tokens
    AI & LLM EngineeringAuto-check passed
  • Blockify Integration

    iternal-technologies-partners/blockify-agentic-data-optimization

    Process documents with Blockify API to create optimized IdeaBlocks for RAG.

    315 GitHub stars~6.2k tokensUpdated 5 mo ago
    AI & LLM EngineeringAuto-check: notes

More from revfactory/harness-100

All 464 skills in this repo
  • Anti Bot Analyzer

    revfactory/harness-100

    A skill for analyzing website anti-bot defense mechanisms and developing legitimate evasion strategies.

    1.3k GitHub stars~1.1k tokensUpdated 6 mo ago
    Auto-check passed
  • API Error Design Patterns

    revfactory/harness-100

    Reference for designing how an API reports failures: structured error codes, response shapes, client-friendly messages, an error catalog and retry or fallback advice.

    1.3k GitHub stars~1.6k tokensUpdated 6 mo ago
    Auto-check passed
  • API Security Checklist

    revfactory/harness-100

    Walks a backend-dev agent through OWASP API Top 10 checks, authentication and authorization patterns, and defense code during API design.

    1.3k GitHub stars~1.7k tokensUpdated 6 mo ago
    Auto-check passed
  • Arg Parser Generator

    revfactory/harness-100

    Methodology for systematically designing and generating CLI tool argument parser structures.

    1.3k GitHub stars~1.2k tokensUpdated 6 mo ago
    Auto-check passed
  • Audience Segmentation

    revfactory/harness-100

    Audience segmentation skill used by the analyst and curator agents.

    1.3k GitHub stars~1.3k tokensUpdated 6 mo ago
    Auto-check passed
  • Audio Storytelling

    revfactory/harness-100

    Audio storytelling skill used by the podcast scriptwriter and show note editor.

    1.3k GitHub stars~1.6k tokensUpdated 6 mo ago
    Auto-check passed

Questions about Chunking Strategy Guide

What does Chunking Strategy Guide do?

RAG 파이프라인의 문서 청킹 전략을 체계적으로 설계하는 방법론. An agent skill from revfactory/harness-100. Chunking Strategy Guide is an agent skill from revfactory/harness-100. RAG 파이프라인의 문서 청킹 전략을 체계적으로 설계하는 방법론.

When should I use Chunking Strategy Guide?

Chunking Strategy Guide fits situations like: tasks that involve Retrieval-augmented generation.

How do I install Chunking Strategy Guide in Claude Code?

Run `npx skills add revfactory/harness-100 --skill chunking-strategy-guide -a claude-code`. Or copy the skill folder (ko/41-llm-app-builder/.claude/skills/chunking-strategy-guide in revfactory/harness-100) into .claude/skills/chunking-strategy-guide in your project. Claude Code loads it when a task matches its description.

How do I install Chunking Strategy Guide in Codex?

Run `npx skills add revfactory/harness-100 --skill chunking-strategy-guide -a codex`. Or copy the skill folder (ko/41-llm-app-builder/.claude/skills/chunking-strategy-guide in revfactory/harness-100) into .agents/skills/chunking-strategy-guide in your project. Codex loads it when a task matches its description.

Can I use Chunking Strategy Guide in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add revfactory/harness-100 --skill chunking-strategy-guide -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/chunking-strategy-guide, .gemini/skills/chunking-strategy-guide, .github/skills/chunking-strategy-guide and .opencode/skills/chunking-strategy-guide in your project.

What does Chunking Strategy Guide need to run?

SKILL.md names no scripts, command-line tools or credentials: Chunking Strategy Guide is instructions for the agent only. Our summary lists: Python 3.

Does Chunking Strategy Guide access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Chunking Strategy Guide safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Chunking Strategy Guide use?

Chunking Strategy Guide is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Chunking Strategy Guide use?

About 827 tokens (SKILL.md is roughly 3.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Chunking Strategy Guide?

Skills that share tags, products or a category with Chunking Strategy Guide: Chroma Vector Database (Orchestra-Research/AI-Research-SKILLs, 13k stars), Senior Prompt Engineer (maslennikov-ig/claude-code-orchestrator-kit, 260 stars), MCP Local RAG (shinpr/mcp-local-rag, 411 stars) and Ms Agent Framework RAG (shuyu-labs/WebCode, 278 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Chunking Strategy Guide?

revfactory (a GitHub user) maintains it in revfactory/harness-100, which has 1,295 GitHub stars. The repository holds 464 skills in this directory. The repository was last updated on March 22, 2026.

Source: revfactory/harness-100 on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.