document-scanning について
Word、Excel、PowerPoint、PDF のアクセシビリティ検査に向けたファイル探索と準備を支援するスキルです。変更検出、除外対象、スキャンプロファイル、サブエージェントへの情報引き継ぎを扱います。
主な機能
- 014 種類のドキュメント形式に対応
- 02PowerShell と Bash の探索コマンド
- 03Git またはタイムスタンプによる変更検出
- 04一時ファイルとディレクトリの除外
- 05形式別のルール設定
- 06スキャンプロファイルとエージェント情報の定義
活用シーン
- 01ディレクトリ内の検査対象文書を探す
- 02最近変更された文書だけを検査
- 03ロックファイルやキャッシュを除外
- 04ファイル情報とルールをサブエージェントに渡す
インストール
コマンドをコピーしてターミナルで実行します。
$
npx skills add https:/ / github.com/ community-access/ accessibility-agents --skill document-scanningインストール後、Claude Code で/document-scanningを入力して読み込まれたか確認します。
詳細
ドキュメントのスキャン
サポートされているファイル形式
| 拡張子 | 種類 | サブエージェント |
|---|---|---|
| .docx | Word ドキュメント | word-accessibility |
| .xlsx | Excel ワークブック | excel-accessibility |
| .pptx | PowerPoint プレゼンテーション | powerpoint-accessibility |
| PDF ドキュメント | pdf-accessibility |
ファイル検索コマンド
PowerShell(Windows)
# Non-recursive scan
Get-ChildItem -Path "<folder>" -File -Include *.docx,*.xlsx,*.pptx,*.pdf
# Recursive scan
Get-ChildItem -Path "<folder>" -File -Include *.docx,*.xlsx,*.pptx,*.pdf -Recurse |
Where-Object { $_.Name -notlike '~$*' -and $_.Name -notlike '*.tmp' -and $_.Name -notlike '*.bak' } |
Where-Object { $_.FullName -notmatch '[\\/](\.git|node_modules|__pycache__|\.vscode)[\\/]' }
Bash(macOS)
# Non-recursive scan
find "<folder>" -maxdepth 1 -type f \( -name "*.docx" -o -name "*.xlsx" -o -name "*.pptx" -o -name "*.pdf" \) ! -name "~\$*"
# Recursive scan
find "<folder>" -type f \( -name "*.docx" -o -name "*.xlsx" -o -name "*.pptx" -o -name "*.pdf" \) \
! -name "~\$*" ! -name "*.tmp" ! -name "*.bak" \
! -path "*/.git/*" ! -path "*/node_modules/*" ! -path "*/__pycache__/*" ! -path "*/.vscode/*"
差分の検出
Git ベース
# Files changed since last commit
git diff --name-only HEAD~1 HEAD -- '*.docx' '*.xlsx' '*.pptx' '*.pdf'
# Files changed since a specific tag
git diff --name-only <tag> HEAD -- '*.docx' '*.xlsx' '*.pptx' '*.pdf'
# Files changed in the last N days
git log --since="N days ago" --name-only --diff-filter=ACMR --pretty="" -- '*.docx' '*.xlsx' '*.pptx' '*.pdf' | sort -u
タイムスタンプベース(PowerShell)
# Files modified since a specific date
Get-ChildItem -Path "<folder>" -File -Include *.docx,*.xlsx,*.pptx,*.pdf -Recurse |
Where-Object { $_.LastWriteTime -gt [datetime]"2025-01-01" }
スキップするファイル
スキャン中は、次のパターンを必ず除外してください。
~$*- Office のロック/一時ファイル(ドキュメントを開いたときに作成されます)*.tmp- 一時ファイル*.bak- バックアップファイル.git/、node_modules/、.vscode/、__pycache__/ディレクトリ内のファイル
スキャン設定ファイル
| ファイル | 用途 |
|---|---|
.a11y-office-config.json | Word、Excel、PowerPoint のルールの有効化/無効化 |
.a11y-pdf-config.json | PDF スキャンのルールの有効化/無効化 |
スキャンプロファイル
| プロファイル | ルール | 重大度 | 用途 |
|---|---|---|---|
| 厳格 | すべて | エラー、警告、ヒント | 一般公開向け、法的に必須のドキュメント |
| 標準 | すべて | エラー、警告 | ほとんどの組織 |
| 最小 | すべて | エラーのみ | 大規模なドキュメントライブラリの優先順位付け |
コンテキストの受け渡し形式
サブエージェントに委任するときは、必ず次のコンテキストブロックを渡してください。
## Document Scan Context
- **File:** [full path]
- **Scan Profile:** [strict | moderate | minimal]
- **Severity Filter:** [error, warning, tip]
- **Disabled Rules:** [list or "none"]
- **User Notes:** [any specifics]
- **Part of Batch:** [yes/no - if yes, indicate X of Y]
コメント
Markdown 対応