clean-data-xls
できること
このスキルは、分析の前にスプレッドシートの乱れたデータを整理する流れを、AIエージェントに案内します。書式の不統一、重複、エラーがあるスプレッドシートを扱う人向けです。
使う場面
- ✓スプレッドシートで、名前、大文字小文字、日付の形式がそろっていないとき。
- ✓数値が文字列として保存されていて、合計が合わないとき。
- ✓分析の前に、重複した行を削除する必要があるとき。
スキルのリンク
https://github.com/anthropics/financial-services/blob/main/plugins/vertical-plugins/financial-analysis/skills/clean-data-xls/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“この乱れた売上シートを整理して、日付、数値、顧客名がそろうようにしてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは各列を調べ、余分な空白、混在する日付形式、重複などの問題を見つけます。適用する前に修正案を示します。開いているExcelのアドインでも、ファイル上でも作業できます。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Clean Data
Clean messy data in the active sheet or a specified range.
Environment
- If running inside Excel (Office Add-in / Office JS): Use Office JS directly (
Excel.run(async (context) => {...})). Read viarange.values, write helper-column formulas viarange.formulas = [["=TRIM(A2)"]]. The in-place vs helper-column decision still applies. - If operating on a standalone .xlsx file: Use Python/openpyxl.
Workflow
Step 1: Scope
- If a range is given (e.g.
A1:F200), use it - Otherwise use the full used range of the active sheet
- Profile each column: detect its dominant type (text / number / date) and identify outliers
Step 2: Detect issues
| Issue | What to look for |
|---|---|
| Whitespace | leading/trailing spaces, double spaces |
| Casing | inconsistent casing in categorical columns (usa / USA / Usa) |
| Number-as-text | numeric values stored as text; stray $, ,, % in number cells |
| Dates | mixed formats in the same column (3/8/26, 2026-03-08, March 8 2026) |
| Duplicates | exact-duplicate rows and near-duplicates (case/whitespace differences) |
| Blanks | empty cells in otherwise-populated columns |
| Mixed types | a column that's 98% numbers but has 3 text entries |
| Encoding | mojibake (é, ’), non-printing characters |
| Errors | #REF!, #N/A, #VALUE!, #DIV/0! |
Step 3: Propose fixes
Show a summary table before changing anything:
| Column | Issue | Count | Proposed Fix |
|---|
Step 4: Apply
- Prefer formulas over hardcoded cleaned values — where the cleaned output can be expressed as a formula (e.g.
=TRIM(A2),=VALUE(SUBSTITUTE(B2,"$","")),=UPPER(C2),=DATEVALUE(D2)), write the formula in an adjacent helper column rather than computing the result in Python and overwriting the original. This keeps the transformation transparent and auditable. - Only overwrite in place with computed values when the user explicitly asks for it, or when no sensible formula equivalent exists (e.g. encoding/mojibake repair)
- For destructive operations (removing duplicates, filling blanks, overwriting originals), confirm with the user first
- After each category of fix (whitespace → casing → number conversion → dates → dedup), show the user a sample of what changed and get confirmation before moving to the next category
- Report a before/after summary of what changed
よくある質問
確認せずにデータを変更しますか?
いいえ。このスキルは先に修正案を示すので、適用する前に確認できます。
どんな問題を検出できますか?
空白、大文字小文字、数値の文字列化、日付の混在、重複、空欄、型の混在、文字化け、数式エラーです。
シートの一部だけを整理できますか?
はい。範囲を指定できます。指定しない場合は、アクティブなシートの使用範囲全体を対象にします。
詳細
作者による元の説明
Clean up messy spreadsheet data — trim whitespace, fix inconsistent casing, convert numbers-stored-as-text, standardize dates, remove duplicates, and flag mixed-type columns. Use when data is messy, inconsistent, or needs prep before analysis. Triggers on "clean this data", "clean up this sheet", "normalize this data", "fix formatting", "dedupe", "standardize this column", "this data is messy".
人気
- GitHubのスター
- 41k
- ランキング
- #6608
- ライセンス
- Apache-2.0
- 更新日
- 2026/10/28
コメント
- …
このリポジトリの他のスキル
audit-xls
41kスプレッドシートを、数式の誤り、直接入力された数字、壊れたリンクについて確認します。範囲、シート、またはモデル全体のどれでも行えます。
earnings-analysis
41k企業の四半期の業績について、予想との比較、主要な数字、修正された見通しを扱う、短い決算の速報を書くのを、エージェントが助けます。
earnings-preview
41k企業が決算を発表する前に準備するのを、エージェントが助けます。見るべき指標、強気と弱気のシナリオ、主要な材料を含みます。
model-update
41k新しい結果、ガイダンス、前提で財務モデルを更新し、最も重要な変更を示すのを、エージェントが助けます。
似ているスキル
gitcrawl
394k保存されたGitHubのイシューとプルリクエストのアーカイブを検索し、重複をまとめ、GitHub上の現在の状態を確認するようエージェントを支援します。
slacrawl
394kローカルのSlackアーカイブ内のメッセージを検索して件数を数え、アーカイブの新しさを確認し、必要に応じて更新するようエージェントを支援します。
goplaces
394kGoogle Placesを使って、場所を検索し、詳細や口コミを取得し、場所の名前を解決するようエージェントを支援します。スクリプト用にJSON出力もできます。