Skip to content
doc-updater logo

ドキュメント更新スキル

doc-updater

コード変更、API変更、新機能追加時にドキュメントを自動更新します。公開APIやインターフェースの変更、新クラス・関数・モジュールの追加、アーキテクチャの重要な変更、ユーザーからの明示的なドキュメント更新依頼時に起動します。プロジェクトのドキュメント標準に準拠した更新を提案します。

SKILL.md

Full skill instructions

ドキュメント更新スキル

このスキルは、コードベースの変更に応じてプロジェクトのドキュメントを自動的に更新・同期します。

起動条件

以下の状況で自動的に起動します:

  1. API/インターフェース変更: 公開クラス、関数、メソッドのシグネチャが変更された
  2. 新機能追加: 新しいクラス、モジュール、重要な機能が追加された
  3. アーキテクチャ変更: システム設計や構造に影響する変更があった
  4. 明示的な依頼: ユーザーがドキュメント更新を明示的に依頼した
  5. ドキュメントの不整合: コードとドキュメントの内容が乖離している

動作プロセス

1. 変更内容の分析

まず、以下の情報を収集します:

  • 変更されたファイルとその内容
  • 新規追加されたクラス、関数、モジュール
  • 変更されたAPIシグネチャ
  • docstringの内容

2. 影響を受けるドキュメントの特定

プロジェクトのドキュメント構成を分析し、更新が必要なファイルを特定:

  • docs/​index.md または README.md: クイックスタート、概要
  • docs/​architecture.md: アーキテクチャ設計
  • docs/​how-it-works.md: 動作原理
  • 機能固有のドキュメント: 各機能の詳細説明
  • 新規ページの必要性判断

3. ドキュメント更新案の作成

ドキュメント作成ガイドラインは .claude/​docs.md を参照してください。

重要なポイント:

  • プロジェクトで使用するマークアップ構文を使用
  • 内部表記を避ける(Phase/​Milestone/​Article表記等)
  • 保証表現を避ける(「完全サポート」等)
  • 感嘆符を使用しない
  • プロフェッショナルで簡潔な技術文書として記述

4. ユーザーへの確認

更新内容を提示し、以下を確認:

  • 変更の妥当性
  • 追加すべき情報の有無
  • ドキュメント構成の適切性

5. 更新の実行

承認後、以下を実行:

  • ドキュメントファイルの更新
  • 必要に応じて新規ページの作成
  • インデックスファイルへの追加(新規ページの場合)

6. ビルド検証

最後にドキュメントビルドでエラーがないことを確認します。

プロジェクトで使用しているドキュメンテーションシステムに応じて:

# 例: Sphinx
sphinx-build -M html docs docs/​_build

# 例: MkDocs
mkdocs build

# 例: その他
# プロジェクト固有のビルドコマンド

使用例

例1: 新しいクラスを追加

変更内容:

class StreamingModel:
    """ストリーミング対応のモデル"""

    def __init__(self, model_name: str):
        ...

    async def stream(self, messages: list[dict]) -> AsyncIterator[str]:
        ...

スキルの動作:

  1. docs/​architecture.mdにストリーミングモデルのセクションを追加
  2. docs/​how-it-works.mdにストリーミングの仕組みを説明
  3. docs/​index.mdのクイックスタートにストリーミングの使用例を追加

例2: APIシグネチャの変更

変更内容:

# 変更前
def __init__(self, model_name: str):
    ...

# 変更後
def __init__(self, model_name: str, timeout: int = 30, max_retries: int = 3):
    ...

スキルの動作:

  1. docs/​index.mdのクイックスタート例を更新
  2. 新しいパラメータの説明を追加
  3. 既存コード例に新パラメータの使い方を追記(必要に応じて)

例3: アーキテクチャ変更

変更内容:

  • Tool実行の仕組みをリファクタリング
  • 新しいToolExecutorクラスを導入

スキルの動作:

  1. docs/​architecture.mdのアーキテクチャ図を更新
  2. 新しいコンポーネントの説明を追加
  3. 関連するドキュメントのTool実行フローを更新

ガイドライン参照

重要: 詳細なドキュメント作成ガイドラインは .claude/​docs.md を参照してください。

このファイルには以下の情報が含まれています:

  • マークアップ構文の詳細
  • トーンとスタイルのガイドライン
  • 避けるべき表現
  • コードブロックの注意点
  • ビルド検証方法

注意事項

  • 自動実行の制限: このスキルは更新を提案しますが、最終的な実行前に必ずユーザーの確認を求めます
  • ビルドエラー: ドキュメントビルドでエラーが発生した場合は、原因を報告し修正案を提示します
  • 既存内容の保持: 既存のドキュメント内容を尊重し、必要最小限の変更を提案します
  • 言語対応: プロジェクトで使用している言語(日本語/英語等)に従います

More Other skills

Delegate independent tasks to specialized agents working concurrently with isolated context.

295.4K 206.3K
View

Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.

179.7K 100.1K
View

Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors/fonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.

179.7K 89.5K
View

A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill whenever asked to write some sort of internal communications (status reports, leadership updates, 3P updates, company newsletters, FAQs, incident reports, project updates, etc.).

179.7K 76.1K
View

Fundamental design principles for writing maintainable, testable Python code.

40.2K 21.9K
View

Modern responsive layouts using container queries, fluid typography, CSS Grid, and mobile-first strategies.

40.2K 20K
View

Generate Playwright tests from scenarios using interactive browser exploration and validation.

39.7K 18.2K
View

Modern React state management with Redux Toolkit, Zustand, Jotai, and React Query for every state category.

40.2K 14.7K
View

GDPR-compliant data handling with consent management, data subject rights, and privacy controls.

40.2K 14.3K
View

Python error handling patterns including input validation, exception hierarchies, and partial failure handling. Use when implementing validation logic, designing exception strategies, handling batch processing failures, or building robust APIs.

40.2K 13.5K
View

Detailed multi-file refactor planning with safety checks and rollback guidance.

39.7K 13K
View