shard-document
大規模なドキュメントを、関連性やナビゲーションを維持したまま扱いやすい小さな単位に分割し、PRDや技術仕様書などの使いやすさやメンテナンス性を向上させるSkill。
📜 元の英語説明(参考)
Break large documents into smaller, manageable shards with maintained relationships and navigation, improving document usability and maintenance for PRDs, specs, and technical documentation. Use when large documents (>5000 words) need splitting for better maintainability, navigation, or when documentation becomes difficult to navigate.
🇯🇵 日本人クリエイター向け解説
大規模なドキュメントを、関連性やナビゲーションを維持したまま扱いやすい小さな単位に分割し、PRDや技術仕様書などの使いやすさやメンテナンス性を向上させるSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o shard-document.zip https://jpskill.com/download/9711.zip && unzip -o shard-document.zip && rm shard-document.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/9711.zip -OutFile "$d\shard-document.zip"; Expand-Archive "$d\shard-document.zip" -DestinationPath $d -Force; ri "$d\shard-document.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
shard-document.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
shard-documentフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
Shard Document Skill
目的
大規模で単一的なドキュメントを、より小さく、管理しやすいシャードに分割し、ナビゲート、保守、理解を容易にします。特に、長大な PRD、技術仕様、アーキテクチャドキュメント、API ドキュメントに有効です。
コア原則:
- 論理的な境界 (任意のサイズではなく、トピック/セクションごとにシャード化)
- 関係性の維持 (相互参照を維持)
- 明確なナビゲーション (明確なインデックスとリンクを作成)
- 豊富なメタデータ (各シャードが目的を自己記述)
- 厳格な検証 (すべての参照が機能することを確認)
前提条件
- ソースドキュメントが存在し、読み取り可能であること
- ドキュメントに明確な構造 (見出し、セクション) があること
- 出力ディレクトリが書き込み可能であること
- workspace/ ディレクトリがシャードの保存に使用可能であること
ワークフロー
ステップ 1: ドキュメント構造の分析
アクション: ドキュメントを解析して構造を理解し、論理的な境界を特定し、シャーディングのアプローチを評価します。
主な活動:
-
ドキュメント階層の解析
ドキュメント構造の例: # 製品要件ドキュメント ## 1. エグゼクティブサマリー (200 行) ## 2. ビジョンと目標 (150 行) ## 3. ユーザーペルソナ (400 行) ### 3.1 ペルソナ: Sarah (SaaS 管理者) ### 3.2 ペルソナ: Mike (エンドユーザー) ### 3.3 ペルソナ: Lisa (マネージャー) ## 4. 市場分析 (600 行) ### 4.1 競合状況 ### 4.2 市場セグメンテーション ### 4.3 差別化戦略 ## 5. 機能仕様 (1200 行) ⚠️ 大規模 ### 5.1 機能: 認証 ### 5.2 機能: ダッシュボード ### 5.3 機能: レポーティング ### ... (さらに 20 個の機能) ## 6. 技術要件 (800 行) ## 7. 成功指標 (300 行) 合計: ~3,650 行 (単一のドキュメントとしては大きすぎる) -
シャード境界の特定
論理的な戦略 (推奨):
- 主要なセクション (エグゼクティブサマリー、ペルソナ、市場分析など) ごとにシャード化
- 大きなセクションをサブシャードに分割 (例: 機能 → 機能ごとに 1 つのシャード)
- 関連するコンテンツをまとめて保持 (トピックの途中で分割しない)
サイズベースの戦略:
- セクションが max_shard_size (デフォルト 500 行) を超える場合に分割
- 最も近い見出し境界を見つける
- 論理的な区切り点でシャードを作成
セマンティック戦略:
- コンテンツの類似性を分析
- 異なるセクションにある場合でも、関連するトピックをグループ化
- 高度な戦略: NLP 分析が必要
-
相互参照の評価
内部リンクをスキャン: - [市場分析を参照](#market-analysis) - [技術要件の機能依存関係](#technical-requirements) - [ダッシュボード機能の成功指標](#feature-dashboard) 後で検証するために、すべての相互参照をカタログ化 -
シャーディング計画の決定
提案されたシャード: 1. index.md - ナビゲーションハブ (50 行) 2. executive-summary.md - 概要 (200 行) 3. vision-objectives.md - 目標とビジョン (150 行) 4. personas.md - すべてのユーザーペルソナ (400 行) 5. market-analysis.md - 競合と市場の洞察 (600 行) 6. features/ - 機能ごとに 1 つのファイルがあるディレクトリ (20 ファイル) - authentication.md - dashboard.md - reporting.md - ... (さらに 17 個) 7. technical-requirements.md - 技術仕様 (800 行) 8. success-metrics.md - KPI と指標 (300 行) 合計: 8 つのトップレベルファイル + 20 個の機能シャード = 28 個のシャード 削減: 3,650 行 → シャードあたり平均 130 行 ✅
出力: 境界、ファイル名、および関係を含むシャーディング計画
参照: 戦略選択のガイダンスについては、references/sharding-strategies.md を参照してください。
ステップ 2: メタデータを使用したシャードの抽出
アクション: 適切なメタデータ、ナビゲーションリンク、およびコンテンツを含む個々のシャードファイルを作成します。
主な活動:
-
シャードテンプレートの作成
--- shard_id: feature-authentication shard_type: feature-specification parent: prd-main created_from: product-requirements-document.md section: 5.1 Feature: Authentication related: - technical-requirements.md#authentication - success-metrics.md#auth-metrics dependencies: - feature-user-management tags: - authentication - security - core-feature --- # 機能: 認証 [◄ PRD インデックスに戻る](index.md) | [次へ: ダッシュボード ►](feature-dashboard.md) ## 機能概要 [元のセクション 5.1 からのコンテンツ...] ## 関連ドキュメント - [技術要件: 認証](technical-requirements.md#authentication) - [成功指標: 認証指標](success-metrics.md#auth-metrics) - [ユーザーペルソナ: Sarah (SaaS 管理者)](personas.md#sarah-saas-admin) --- **シャードナビゲーション:** - 前: [ビジョンと目標](vision-objectives.md) - 上: [PRD インデックス](index.md) - 次: [機能: ダッシュボード](feature-dashboard.md) -
コンテンツの抽出
- 元のドキュメントからセクションのコンテンツをコピー
- 見出しの階層を保持 (必要に応じて調整)
- フォーマット (コードブロック、テーブル、リスト) を維持
- 内部構造をそのまま維持
-
内部リンクの更新
元のドキュメント: 詳細については、[市場分析を参照](#market-analysis)してください。 シャード化されたバージョン (feature-authentication.md から): 詳細については、[市場分析](market-analysis.md)を参照してください。 形式を更新: #section-name → filename.md #parent-section-name → filename.md#section-name -
コンテキストナビゲーションの追加
- パンくずリスト (親ドキュメント → 現在のセクション)
- 前/次のリンク (順次読み取り)
- 関連ドキュメント (相互参照)
- インデックスに戻るリンク (常に利用可能)
-
メタデータによる強化
メタデータには以下が含まれます: - shard_id: 一意の識別子 - shard_type: カテゴリ (機能、ペルソナ、分析、技術など) - parent: 元のソースドキュメント - section: 元のセクションパス - related: 相互参照されたシャード - dependencies: これが依存する他のシャード - tags: 検出のためのキーワード - created_from: ソースファイルパス - created_at: 時間
(原文はここで切り詰められています)
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
Shard Document Skill
Purpose
Break large, monolithic documents into smaller, manageable shards that are easier to navigate, maintain, and understand. Particularly valuable for lengthy PRDs, technical specifications, architecture docs, and API documentation.
Core Principles:
- Logical boundaries (shard by topic/section, not arbitrary size)
- Relationship preservation (maintain cross-references)
- Navigation clarity (create clear index and links)
- Metadata richness (each shard self-describes purpose)
- Validation rigor (verify all references work)
Prerequisites
- Source document exists and is readable
- Document has clear structure (headings, sections)
- Output directory is writable
- workspace/ directory available for shard storage
Workflow
Step 1: Analyze Document Structure
Action: Parse document to understand structure, identify logical boundaries, and assess sharding approach.
Key Activities:
-
Parse Document Hierarchy
Example document structure: # Product Requirements Document ## 1. Executive Summary (200 lines) ## 2. Vision & Objectives (150 lines) ## 3. User Personas (400 lines) ### 3.1 Persona: Sarah (SaaS Admin) ### 3.2 Persona: Mike (End User) ### 3.3 Persona: Lisa (Manager) ## 4. Market Analysis (600 lines) ### 4.1 Competitive Landscape ### 4.2 Market Segmentation ### 4.3 Differentiation Strategy ## 5. Feature Specifications (1200 lines) ⚠️ Large ### 5.1 Feature: Authentication ### 5.2 Feature: Dashboard ### 5.3 Feature: Reporting ### ... (20 more features) ## 6. Technical Requirements (800 lines) ## 7. Success Metrics (300 lines) Total: ~3,650 lines (too large for single document) -
Identify Shard Boundaries
Logical Strategy (Recommended):
- Shard by major sections (Executive Summary, Personas, Market Analysis, etc.)
- Break large sections into sub-shards (e.g., Features → one shard per feature)
- Keep related content together (don't split mid-topic)
Size-Based Strategy:
- Split when section exceeds max_shard_size (default 500 lines)
- Find nearest heading boundary
- Create shard at logical break point
Semantic Strategy:
- Analyze content similarity
- Group related topics even if in different sections
- Advanced: requires NLP analysis
-
Assess Cross-References
Scan for internal links: - [See Market Analysis](#market-analysis) - [Feature dependencies in Technical Requirements](#technical-requirements) - [Success metrics for Dashboard feature](#feature-dashboard) Catalog all cross-references for later validation -
Determine Sharding Plan
Proposed Shards: 1. index.md - Navigation hub (50 lines) 2. executive-summary.md - Overview (200 lines) 3. vision-objectives.md - Goals and vision (150 lines) 4. personas.md - All user personas (400 lines) 5. market-analysis.md - Competitive & market insights (600 lines) 6. features/ - Directory with one file per feature (20 files) - authentication.md - dashboard.md - reporting.md - ... (17 more) 7. technical-requirements.md - Tech specs (800 lines) 8. success-metrics.md - KPIs and metrics (300 lines) Total: 8 top-level files + 20 feature shards = 28 shards Reduction: 3,650 lines → avg 130 lines per shard ✅
Output: Sharding plan with boundaries, file names, and relationships
See: references/sharding-strategies.md for strategy selection guidance
Step 2: Extract Shards with Metadata
Action: Create individual shard files with proper metadata, navigation links, and content.
Key Activities:
-
Create Shard Template
--- shard_id: feature-authentication shard_type: feature-specification parent: prd-main created_from: product-requirements-document.md section: 5.1 Feature: Authentication related: - technical-requirements.md#authentication - success-metrics.md#auth-metrics dependencies: - feature-user-management tags: - authentication - security - core-feature --- # Feature: Authentication [◄ Back to PRD Index](index.md) | [Next: Dashboard ►](feature-dashboard.md) ## Feature Overview [Content from original section 5.1...] ## Related Documents - [Technical Requirements: Authentication](technical-requirements.md#authentication) - [Success Metrics: Auth Metrics](success-metrics.md#auth-metrics) - [User Persona: Sarah (SaaS Admin)](personas.md#sarah-saas-admin) --- **Shard Navigation:** - Previous: [Vision & Objectives](vision-objectives.md) - Up: [PRD Index](index.md) - Next: [Feature: Dashboard](feature-dashboard.md) -
Extract Content
- Copy section content from original document
- Preserve heading hierarchy (adjust if needed)
- Maintain formatting (code blocks, tables, lists)
- Keep internal structure intact
-
Update Internal Links
Original document: See [Market Analysis](#market-analysis) for details. Sharded version (from feature-authentication.md): See [Market Analysis](market-analysis.md) for details. Update format: #section-name → filename.md #parent-section-name → filename.md#section-name -
Add Contextual Navigation
- Breadcrumbs (Parent document → Current section)
- Previous/Next links (Sequential reading)
- Related documents (Cross-references)
- Back to index link (Always available)
-
Enrich with Metadata
Metadata includes: - shard_id: Unique identifier - shard_type: Category (feature, persona, analysis, technical, etc.) - parent: Original source document - section: Original section path - related: Cross-referenced shards - dependencies: Other shards this depends on - tags: Keywords for discovery - created_from: Source file path - created_at: Timestamp
Output: Individual shard files with complete metadata and navigation
See: references/shard-metadata-guide.md for metadata standards
Step 3: Create Navigation Index
Action: Build master index document that provides overview and navigation to all shards.
Key Activities:
-
Create Index Structure
--- document_type: shard-index original_document: product-requirements-document.md shard_count: 28 sharding_date: 2025-01-04 sharding_strategy: logical --- # PRD: Product Requirements Document (Sharded) This document has been split into 28 focused shards for easier navigation and maintenance. **Original Document:** `product-requirements-document.md` (3,650 lines) **Sharded Version:** 28 documents (avg 130 lines each) --- ## Quick Navigation ### Core Documents 1. [Executive Summary](executive-summary.md) - Product overview and key findings 2. [Vision & Objectives](vision-objectives.md) - Product vision and goals 3. [User Personas](personas.md) - Target user profiles 4. [Market Analysis](market-analysis.md) - Competitive landscape 5. [Technical Requirements](technical-requirements.md) - Technical specifications 6. [Success Metrics](success-metrics.md) - KPIs and measurement ### Features (20 total) **Core Features:** - [Authentication](features/authentication.md) - User login and security - [Dashboard](features/dashboard.md) - Main user interface - [Reporting](features/reporting.md) - Analytics and reports **Secondary Features:** - [Notifications](features/notifications.md) - Email and in-app alerts - [User Profile](features/user-profile.md) - Profile management - ... [View all features](features/README.md) --- ## Reading Paths ### Path 1: Executive Overview (15 min read) 1. [Executive Summary](executive-summary.md) 2. [Vision & Objectives](vision-objectives.md) 3. [User Personas](personas.md) 4. [Market Analysis](market-analysis.md) ### Path 2: Feature Deep Dive (45 min read) 1. [Feature Overview](features/README.md) 2. Core features (Authentication, Dashboard, Reporting) 3. [Technical Requirements](technical-requirements.md) 4. [Success Metrics](success-metrics.md) ### Path 3: Complete Read (2 hour read) Follow sequential navigation links in each document. --- ## Shard Organizationprd-shards/ ├── index.md (this file) ├── executive-summary.md ├── vision-objectives.md ├── personas.md ├── market-analysis.md ├── technical-requirements.md ├── success-metrics.md └── features/ ├── README.md ├── authentication.md ├── dashboard.md ├── reporting.md └── ... (17 more)
--- ## Search by Tag **#core-feature:** Authentication, Dashboard, Reporting **#security:** Authentication, Data Encryption, Access Control **#analytics:** Dashboard, Reporting, Success Metrics **#user-facing:** All features under features/ --- ## Original Document The original, unshard document is preserved at: [`product-requirements-document.md`](../product-requirements-document.md) -
Create Directory README Files
For subdirectories (like features/), create README.md:
# Features Directory This directory contains detailed specifications for all 20 product features. ## Core Features (Must Have) 1. [Authentication](authentication.md) - User login and security 2. [Dashboard](dashboard.md) - Main user interface 3. [Reporting](reporting.md) - Analytics and reports ## Secondary Features (Should Have) 4. [Notifications](notifications.md) - Email and in-app alerts 5. [User Profile](user-profile.md) - Profile management ... ## Legacy Features (Won't Have v1) 18. [Old Admin Panel](old-admin-panel.md) - Deprecated interface [◄ Back to PRD Index](../index.md) -
Generate Metadata Summary
## Shard Metadata | Shard | Type | Lines | Dependencies | Tags | |-------|------|-------|--------------|------| | executive-summary.md | overview | 200 | - | #summary #overview | | authentication.md | feature | 85 | user-management | #core #security | | dashboard.md | feature | 120 | authentication, reporting | #core #ui | ... Total Shards: 28 Total Lines: 3,650 (across all shards) Average Shard Size: 130 lines
Output: Comprehensive index with multiple navigation paths
See: references/navigation-patterns.md for index design patterns
Step 4: Validate Relationships
Action: Verify all cross-references, dependencies, and links work correctly.
Key Activities:
-
Validate Internal Links
# Scan all shards for markdown links for file in *.md; do grep -o '\[.*\](.*\.md[^)]*)' "$file" done # Check each link target exists # Report broken links -
Verify Dependencies
For each shard with dependencies: - Check dependency shards exist - Verify dependency sections referenced exist - Ensure no circular dependencies Example: authentication.md depends on user-management.md → Check: user-management.md exists ✅ → Check: No circular dependency (user-management depends on authentication) ✅ -
Check Cross-References
From authentication.md: "See [Success Metrics: Auth Metrics](success-metrics.md#auth-metrics)" Validation: → success-metrics.md exists? ✅ → Section #auth-metrics exists in success-metrics.md? ✅ → Link format correct? ✅ -
Verify Metadata Completeness
For each shard, check: - shard_id present and unique ✅ - shard_type defined ✅ - parent specified ✅ - tags include at least one tag ✅ - related docs list is valid ✅ -
Test Navigation Paths
Test reading paths from index: Path 1: Executive Overview 1. Index → Executive Summary ✅ 2. Executive Summary → Vision & Objectives ✅ 3. Vision & Objectives → User Personas ✅ 4. User Personas → Market Analysis ✅ 5. All "Back to Index" links work ✅ -
Generate Validation Report
# Shard Validation Report **Total Shards:** 28 **Validation Status:** ✅ PASSED ## Validation Results ✅ Internal Links: 142/142 valid (0 broken) ✅ Dependencies: 35/35 resolved ✅ Cross-References: 89/89 valid ✅ Metadata: 28/28 complete ✅ Navigation Paths: 3/3 working ## Issues Found None ✅ --- ## Recommendations - Consider adding more tags to personas.md (currently only 1 tag) - Feature shards could benefit from examples section - Add glossary shard for technical terms
Output: Validation report with broken link list and recommendations
See: references/validation-checklist.md for comprehensive validation
Common Scenarios
Scenario 1: Large PRD (3,000+ lines)
Context: Single PRD file too large to navigate
Approach:
- Strategy: Logical sharding
- Shard by major sections (Executive, Personas, Features, etc.)
- Create features/ subdirectory (one shard per feature)
- Result: 20-30 shards, avg 100-150 lines each
Example Structure:
prd-shards/
├── index.md
├── executive-summary.md
├── personas.md
├── market-analysis.md
├── features/
│ ├── README.md
│ ├── feature-1.md
│ └── ... (19 more)
├── technical-requirements.md
└── success-metrics.md
Scenario 2: API Documentation (5,000+ lines)
Context: Comprehensive API docs with 100+ endpoints
Approach:
- Strategy: Logical + hierarchical
- Shard by API resource (Users, Products, Orders, etc.)
- Group endpoints within each resource shard
- Create separate authentication.md and errors.md shards
Example Structure:
api-docs-shards/
├── index.md
├── getting-started.md
├── authentication.md
├── errors.md
├── resources/
│ ├── users.md (GET/POST/PUT/DELETE /users)
│ ├── products.md (GET/POST/PUT/DELETE /products)
│ └── ... (20 more)
└── webhooks.md
Scenario 3: Architecture Documentation (2,000+ lines)
Context: System architecture doc with multiple components
Approach:
- Strategy: Logical by component
- Shard by system component (Frontend, Backend, Database, etc.)
- Create separate decision-records/ directory for ADRs
- Maintain architecture-overview.md as entry point
Example Structure:
architecture-shards/
├── index.md
├── architecture-overview.md
├── components/
│ ├── frontend.md
│ ├── backend.md
│ ├── database.md
│ └── ... (5 more)
├── decision-records/
│ ├── adr-001-framework-choice.md
│ └── ... (10 more)
└── deployment.md
Scenario 4: Size-Based Sharding (Any large document)
Context: Document with no clear logical structure
Approach:
- Strategy: Size-based (max_shard_size: 500 lines)
- Split at nearest heading when size exceeded
- Number shards sequentially (part-01.md, part-02.md, etc.)
- Maintain reading order with prev/next links
Example Structure:
document-shards/
├── index.md
├── part-01-introduction.md
├── part-02-methodology.md
├── part-03-findings-1.md
├── part-04-findings-2.md
└── part-05-conclusion.md
Best Practices
- Prefer Logical over Size-Based - Shard by topic/section, not arbitrary size
- Keep Related Content Together - Don't split mid-topic for size constraints
- Use Descriptive File Names -
authentication.mdnotfeature-1.md - Add Rich Metadata - Tags, dependencies, relationships for discovery
- Provide Multiple Navigation Paths - Index, sequential, topic-based
- Validate Thoroughly - Check all links, dependencies, cross-references
- Preserve Original - Keep unshard document as backup/reference
- Document Shard Structure - Clear README explaining organization
- Use Consistent Naming - Follow conventions (kebab-case, descriptive)
- Version Control Friendly - Smaller files = better diffs, easier reviews
When to Escalate
Escalate to stakeholders when:
- Document structure unclear (no clear shard boundaries)
- Multiple valid sharding approaches (need decision)
- Critical cross-references can't be preserved
- Original document has no clear hierarchy
Escalate to authors when:
- Content organization illogical
- Sections heavily interdependent (can't cleanly separate)
- Terminology inconsistent across sections
Use alternative skill when:
- Creating new document → Use
create-prdorcreate-brownfield-prd - Document already well-structured → No sharding needed
- Interactive navigation required → Use
interactive-checklistskill
Reference Files
references/sharding-strategies.md- Strategy selection and comparisonreferences/shard-metadata-guide.md- Metadata standards and examplesreferences/navigation-patterns.md- Index and navigation designreferences/validation-checklist.md- Comprehensive validation stepsreferences/naming-conventions.md- File and directory naming standards
Part of BMAD Enhanced Planning Suite