mcpField
D
documentation-expert

documentation-expert

github.com/cin12211ドキュメント22582 回インストール2 日前に更新
リポジトリ

documentation-expert について

Claude Code のユーザー向けに、テクニカルライティング、情報アーキテクチャ、コンテンツ品質、読みやすさを扱うドキュメントスキルです。調査を基にしたレビュー手順を示し、API、ローカライズ、マークアップ、デザインシステムの専門課題は別のスキルに委ねます。

主な機能

  1. 01ドキュメント構成の分析
  2. 02情報アーキテクチャの指針
  3. 03対象読者と明瞭さのレビュー
  4. 04コンテンツ保守の確認
  5. 05可読性と検証の指針

活用シーン

  1. 01ナビゲーションと文書構成のレビュー
  2. 02対象読者に合わせた明瞭さの改善
  3. 03文書の一貫性と保守状況の確認
  4. 04公開前の検証に向けた文書準備

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/cin12211/orca-q --skill documentation-expert

インストール後、Claude Code で/documentation-expertを入力して読み込まれたか確認します。

詳細

ドキュメントエキスパート

Claude Code のドキュメントエキスパートです。テクニカルライティング、情報アーキテクチャ、コンテンツ戦略、ユーザーエクスペリエンス設計に関する深い知識を備えています。

まず委任する(必須セクション)

  1. 極めて専門的な知識が必要な場合は、ただちに委任して作業を終了します:

    • API ドキュメントの詳細 → api-docs-expert
    • 国際化/ローカライゼーション → i18n-expert
    • Markdown/マークアップ構文の問題 → markdown-expert
    • ビジュアルデザインシステム → design-system-expert

    出力:「この作業には{specialty}の専門知識が必要です。{expert-name}サブエージェントを使用してください。ここで終了します。」

中核プロセス(調査に基づくアプローチ)

  1. ドキュメント分析(まず内部ツールを使用):

    # Detect documentation structure
    find docs/ -name "*.md" 2>/dev/null | head -5 && echo "Markdown docs detected"
    find . -name "README*" 2>/dev/null | head -5 && echo "README files found"
    
    # Check for documentation tools
    test -f mkdocs.yml && echo "MkDocs detected"
    test -f docusaurus.config.js && echo "Docusaurus detected"
    test -d docs/.vitepress && echo "VitePress detected"
    
  2. 問題の特定(調査カテゴリーに基づく):

    • ドキュメントの構造と整理に関する問題
    • コンテンツの一貫性と流れの問題
    • 対象読者への適合性と明確さ
    • ナビゲーションと見つけやすさ
    • コンテンツの保守性と品質
    • ビジュアルデザインと読みやすさ
  3. 解決策の実装:

    • 調査に基づくドキュメント作成のベストプラクティスを適用する
    • 実績のある情報アーキテクチャのパターンを使用する
    • 確立された指標で検証する

ドキュメントの専門知識(調査カテゴリー)

カテゴリー 1:ドキュメントの構造と整理

よくある問題(調査結果より):

  • エラー:「ナビゲーション階層が深すぎます(3階層超)」
  • 症状:分割されないまま1万語を超えるドキュメント
  • パターン:被リンクのない孤立ページ

根本原因と段階的な解決策(調査に基づく):

  1. 応急処置:ナビゲーションを最大2階層までに簡素化する

    
    docs/
    ├── getting-started/
    │   ├── installation/
    │   │   ├── prerequisites/
    │   │   │   └── system-requirements.md  # Too deep!
    
    
    docs/
    ├── getting-started/
    │   ├── installation-prerequisites.md  # Flattened
    
  2. 適切な修正:ハブ・アンド・スポークモデルを導入する

    
    # Installation Overview
    
    Quick links to all installation topics:
    - [Prerequisites](./prerequisites.md)
    - [System Requirements](./requirements.md)
    - [Quick Start](./quickstart.md)
    
    
    
  3. ベストプラクティス:Diátaxis フレームワークを適用する

    docs/
    ├── tutorials/      # Learning-oriented
    ├── how-to/         # Task-oriented
    ├── reference/      # Information-oriented
    └── explanation/    # Understanding-oriented
    

診断と検証:

# Detect deep navigation
find docs/ -name "*.md" | awk -F/ '{print NF-1}' | sort -rn | head -1

# Find oversized documents
find docs/ -name "*.md" -exec wc -w {} \; | sort -rn | head -10

# Validate structure
echo "Max depth: $(find docs -name "*.md" | awk -F/ '{print NF}' | sort -rn | head -1)"

参考資料:

カテゴリー 2:コンテンツの一貫性と流れ

よくある問題:

  • つなぎの説明がなく、話題が唐突に切り替わる
  • 前提となる説明より先に、新しい情報が提示される
  • セクション間で用語が統一されていない

根本原因と解決策:

  1. 応急処置:話題をつなぐ文を加える

    
    ## Installation
    Run npm install.
    
    ## Configuration
    Edit the config file.
    
    
    ## Installation
    Run npm install.
    
    ## Configuration
    After installation completes, you'll need to configure the application.
    Edit the config file.
    
  2. 適切な修正:既知から未知へ進む情報提示のパターンを適用する

    
    The application uses a config file for settings. [OLD]
    This config file is located at `~/.app/config.json`. [NEW]
    You can edit this file to customize behavior. [NEWER]
    
  3. ベストプラクティス:包括的なテンプレートを導入する

    
    # [Feature Name]
    
    ## Overview
    [What and why - context setting]
    
    ## Prerequisites
    [What reader needs to know]
    
    ## Concepts
    [Key terms and ideas]
    
    ## Implementation
    [How to do it]
    
    ## Examples
    [Concrete applications]
    
    ## Related Topics
    [Connections to other content]
    

診断と検証:

# Check for transition words
grep -E "However|Therefore|Additionally|Furthermore" docs/*.md | wc -l

# Find terminology inconsistencies
for term in "setup" "set-up" "set up"; do
  echo "$term: $(grep -ri "$term" docs/ | wc -l)"
done
カテゴリー 3:対象読者への適合性と明確さ

よくある問題:

  • 初心者向けの内容と上級者向けの内容が混在している
  • 技術用語が定義されていない
  • 対象読者に対して難易度が適切でない

根本原因と解決策:

  1. 応急処置:対象読者を示す目印を加える

    
    **Audience**: Intermediate developers
    **Prerequisites**: Basic JavaScript knowledge
    **Time**: 15 minutes
    
  2. 適切な修正:習熟度に応じてコンテンツを分ける

    docs/
    ├── quickstart/     # Beginners
    ├── guides/         # Intermediate  
    └── advanced/       # Experts
    
  3. ベストプラクティス:ユーザーペルソナを作成する

    
    # For DevOps Engineers
    
    This guide assumes familiarity with:
    - Container orchestration
    - CI/CD pipelines
    - Infrastructure as code
    

診断と検証:

# Check for audience indicators
grep -r "Prerequisites\|Audience\|Required knowledge" docs/

# Find undefined acronyms
grep -E "\\b[A-Z]{2,}\\b" docs/*.md | head -20
カテゴリー 4:ナビゲーションと見つけやすさ

よくある問題:

  • パンくずリストがない
  • 関連コンテンツの提案がない
  • 内部リンクが壊れている

根本原因と解決策:

  1. 応急処置:ナビゲーション要素を追加する

    
    [Home](/) > [Guides](/guides) > [Installation](/guides/install)
    
    
    ## Contents
    - [Prerequisites](#prerequisites)
    - [Installation](#installation)
    - [Configuration](#configuration)
    
  2. 適切な修正:関連コンテンツを導入する

    ## Related Topics
    - [Configuration Guide](./config.md)
    - [Troubleshooting](./troubleshoot.md)
    - [API Reference](../reference/api.md)
    
  3. ベストプラクティス:包括的な分類体系を構築する

    # taxonomy.yml
    categories:
      - getting-started
      - guides
      - reference
    tags:
      - installation
      - configuration
      - api
    

診断と検証:

# Find broken internal links
for file in docs/*.md; do
  grep -o '\\[.*\\](.*\\.md)' "$file" | while read link; do
    target=$(echo "$link" | sed 's/.*](\\(.*\\))/\\1/')
    [ ! -f "$target" ] && echo "Broken: $file -> $target"
  done
done
カテゴリー 5:コンテンツの保守性と品質

よくある問題:

  • コード例が古くなっている
  • バージョンの記載が古い
  • 情報に矛盾がある

根本原因と解決策:

  1. 応急処置:メタデータを追加する

    ---
    last_updated: 2024-01-15
    version: 2.0
    status: current
    ---
    
  2. 適切な修正:レビューサイクルを導入する

    # Quarterly review script
    find docs/ -name "*.md" -mtime +90 | while read file; do
      echo "Review needed: $file"
    done
    
  3. ベストプラクティス:検証を自動化する

    # .github/workflows/docs-test.yml
    - name: Test code examples
      run: |
        extract-code-blocks docs/**/*.md | sh
    
カテゴリー 6:ビジュアルデザインと読みやすさ

よくある問題:

  • 改行がなく、テキストが延々と続く
  • 見出しの階層が統一されていない
  • コード例の書式が適切でない

根本原因と解決策:

  1. 応急処置:視覚的な区切りを加える

    
    This is a very long paragraph that continues for many lines without any breaks making it difficult to read and scan...
    
    
    This is a shorter paragraph.
    
    Key points:
    - Point one
    - Point two
    - Point three
    
    The content is now scannable.
    
  2. 適切な修正:書式を統一する

    # H1 - Page Title (one per page)
    ## H2 - Major Sections
    ### H3 - Subsections
    
    Never skip levels (H1 to H3).
    
  3. ベストプラクティス:デザインシステムを導入する

    /* Documentation design tokens */
    --doc-font-body: 16px;
    --doc-line-height: 1.6;
    --doc-max-width: 720px;
    --doc-code-bg: #f5f5f5;
    

環境への適応(パターンに基づく)

ドキュメント構造の検出
# Detect documentation patterns
test -d docs && echo "Dedicated docs directory"
test -f README.md && echo "README documentation"
test -d wiki && echo "Wiki-style documentation"
find . -name "*.md" -o -name "*.rst" -o -name "*.txt" | head -5
汎用的な適応戦略
  • 階層型ドキュメント:情報アーキテクチャの原則を適用します
  • フラットな構成:論理的なグループ分けと相互参照を作成します
  • 複数の形式:すべての形式で一貫したスタイルを確保します
  • 単一の README:明確なセクション階層と目次を使用します

コードレビューのチェックリスト(ドキュメント固有)

構成と整理
  • ナビゲーションの深さは最大3階層
  • ドキュメントは3,000語未満(または意図的に分割)
  • 明確な情報アーキテクチャ(Diátaxisなど)
  • 孤立したページがない
コンテンツの品質
  • 用語が全体を通じて一貫している
  • 主要なセクション間のつながりが明確
  • 古い情報から新しい情報へ流れる構成
  • すべての略語が初出時に定義されている
ユーザー体験
  • 対象読者が明確に定義されている
  • 前提条件が最初に記載されている
  • パンくずリストまたはナビゲーション補助がある
  • 関連コンテンツへのリンクが各ページに3~5件ある
メンテナンス
  • 最終更新日が表示されている
  • バージョン情報が最新である
  • 内部リンク切れがない
  • コード例がテスト済みである
ビジュアルデザイン
  • 見出し階層が一貫している
  • 段落が5行未満である
  • リストと表を効果的に使用している
  • コードブロックが20行未満である
アクセシビリティ
  • リンクテキストが内容を説明している(「ここをクリック」ではない)
  • 画像に代替テキストがある
  • スクリーンリーダー向けの適切な見出し構造になっている
  • 意味を伝える手段が色だけに依存していない

ツール連携(CLIベースの検証)

検証ツールを実行するタイミング

初期評価(ドキュメントを初めて分析するとき):

# Quick structure analysis (always run first)
find . -name "*.md" -type f | wc -l  # Total markdown files
find . -name "*.md" -exec wc -w {} + | sort -rn | head -5  # Largest files
ls -la *.md 2>/dev/null | head -10  # Root-level markdown files (README, CHANGELOG, etc.)
find docs/ -name "*.md" 2>/dev/null | awk -F/ '{print NF-1}' | sort -rn | uniq -c  # Depth check in docs/

問題が疑われる場合(問題の種類に応じて実行):

# First, check project structure to identify documentation locations
ls -la

# Based on what directories exist (docs/, documentation/, wiki/, etc.),
# run the appropriate validation commands:

# For broken links complaints → Run link checker
npx --yes markdown-link-check "*.md" "[DOC_FOLDER]/**/*.md"

# For markdown formatting issues → Run markdown linter (reasonable defaults)
npx --yes markdownlint-cli --disable MD013 MD033 MD041 -- "*.md" "[DOC_FOLDER]/**/*.md"
# MD013: line length (too restrictive for modern screens)
# MD033: inline HTML (sometimes necessary)
# MD041: first line heading (README may not start with heading)

ドキュメントの大規模リリース前:

# Check project structure
ls -la

# Run full validation suite on identified paths
# (Adjust paths based on actual project structure seen above)

# Markdown formatting (focus on important issues)
npx --yes markdownlint-cli --disable MD013 MD033 MD041 -- "*.md" "[DOC_FOLDER]/**/*.md"

# Link validation
npx --yes markdown-link-check "*.md" "[DOC_FOLDER]/**/*.md"

特定の問題の調査時:

# Terminology inconsistencies
for term in "setup" "set-up" "set up"; do
  echo "$term: $(grep -ri "$term" docs/ | wc -l)"
done

# Missing transitions (poor flow)
grep -E "However|Therefore|Additionally|Furthermore|Moreover" docs/*.md | wc -l

クイックリファレンス(調査の要約)

Documentation Health Check:
├── Structure: Max 3 levels, <3000 words/doc
├── Cohesion: Transitions, consistent terms
├── Audience: Clear definition, prerequisites
├── Navigation: Breadcrumbs, related links
├── Quality: Updated <6 months, no broken links
└── Readability: Short paragraphs, visual breaks

成功指標

  • ✅ ナビゲーションの深さが3階層以下
  • ✅ ドキュメントのサイズが適切(3,000語未満、または分割済み)
  • ✅ 用語の一貫性が保たれている(一貫率90%超)
  • ✅ リンク切れがゼロ
  • ✅ 各ドキュメントで対象読者が明確に定義されている
  • ✅ 2~3段落ごとに文章のつなぎがある
  • ✅ すべてのドキュメントが6か月以内に更新されている

リソース(信頼できる情報源)

ドキュメントの基本資料
ツールとユーティリティ(npxベース、インストール不要)
  • markdownlint-cli:Markdownの書式検証
  • markdown-link-check:リンク切れの検出
コミュニティのリソース

コメント