Communitygithub.com

aiskillstore/marketplace

スプレッドシートファイル(.xlsx, .xlsm, .csv, .tsv)を入力または出力とするタスク全般に使用します。ファイルの読み取り、編集、作成、変換、データクレンジングなどに対応します。

marketplace とは?

このスキルは、スプレッドシートファイル(.xlsx, .xlsm, .csv, .tsv)を主要な入出力とするあらゆるタスクに特化したAIエージェント用スキルです。ユーザーが既存のスプレッドシートを開く、読み取る、編集する、修正する(列追加、数式計算、書式設定、グラフ作成、データクレンジングなど)、新規作成する、または表形式ファイル間で変換する必要がある場合に自動的にトリガーされます。主な対応プラットフォームはClaude Code, Cursor, CodexなどのAIエージェント環境で、openpyxlとpandasライブラリを活用してExcelファイルを作成・編集します。重要な特徴として、Pythonで計算結果をハードコードするのではなく、常にExcelの数式を使用してセルに動的な計算を埋め込み、`scripts/recalc.py`スクリプトで数式を再計算してエラーを検証します。また、財務モデル向けに業界標準の色分け規則(入力値は青、数式は黒、他シート参照は緑、外部リンクは赤、重要仮定は黄色背景)や数値書式の標準ルールを定義しており、プロフェッショナルな成果物を保証します。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/aiskillstore/marketplace/tree/HEAD/skills/xlsx

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

出力に関する要件

すべてのExcelファイル

プロフェッショナルなフォント

  • 特にユーザーから指示がない限り、すべての成果物で一貫性のあるプロフェッショナルなフォント(例: Arial, Times New Roman)を使用する

ゼロ 数式エラー

  • すべてのExcelモデルは、数式エラー(#REF!, #DIV/0!, #VALUE!, #N/A, #NAME?)がゼロの状態で納品すること

既存テンプレートの保持(テンプレート更新時)

  • ファイルを変更する際は、既存の書式、スタイル、慣例を正確に調査し、それに合わせること
  • 確立されたパターンを持つファイルに標準化された書式を押し付けてはいけない
  • 既存のテンプレートの慣例が、これらのガイドラインよりも常に優先される

財務モデル

色分け標準

ユーザーまたは既存のテンプレートによって別途指示がない限り

業界標準の色に関する慣例

  • 青色テキスト(RGB: 0,0,255): ハードコードされた入力値、およびユーザーがシナリオ用に変更する数値
  • 黒色テキスト(RGB: 0,0,0): すべての数式と計算
  • 緑色テキスト(RGB: 0,128,0): 同じワークブック内の他のワークシートからデータを参照するリンク
  • 赤色テキスト(RGB: 255,0,0): 他のファイルへの外部リンク
  • 黄色の背景(RGB: 255,255,0): 注意が必要な重要な仮定、または更新が必要なセル

数値書式標準

必須の書式ルール

  • 年: 文字列として書式設定(例: "2024"、"2,024"としない)
  • 通貨: $#,##0 形式を使用。ヘッダーで単位を常に指定すること(「Revenue ($mm)」)
  • ゼロ: パーセンテージを含め、すべてのゼロを "-" と表示する数値書式を使用(例: "$#,##0;($#,##0);-")
  • パーセンテージ: デフォルトで 0.0% 形式(小数点以下1桁)
  • 倍数: バリュエーション倍率(EV/EBITDA, P/E)は 0.0x 形式
  • 負の数: 括弧を使用 (123)、マイナス記号 -123 は使用しない

数式構築ルール

仮定の配置

  • すべての仮定(成長率、マージン、倍率など)は、別の仮定セルに配置する
  • 数式内ではハードコードされた値ではなくセル参照を使用する
  • 例: =B51.05 ではなく =B5(1+$B$6) を使用

数式エラー防止

  • すべてのセル参照が正しいことを確認する
  • 範囲のオフバイワンエラーをチェックする
  • すべての予測期間にわたって数式が一貫していることを確認する
  • エッジケース(ゼロ値、負の数)でテストする
  • 意図しない循環参照がないことを確認する

ハードコード値のドキュメント要件

  • セルにコメントを付けるか、セルの隣(テーブル末尾の場合)に記述する。形式: 「出典: [システム/文書], [日付], [具体的な参照], [該当する場合はURL]」
  • 例:
    • 「出典: 有価証券報告書、2024年度、45ページ、収益注記、[EDGAR URL]」
    • 「出典: 四半期報告書、2025年第2四半期、別紙99.1、[EDGAR URL]」
    • 「出典: Bloomberg Terminal、2025/8/15、AAPL US Equity」
    • 「出典: FactSet、2025/8/20、コンセンサス予想画面」

XLSXの作成、編集、分析

概要

ユーザーから .xlsx ファイルの作成、編集、または内容の分析を依頼される場合があります。タスクごとに利用可能なツールとワークフローが異なります。

重要な要件

数式再計算にはLibreOfficeが必要: LibreOfficeがインストールされていることを前提とし、scripts/recalc.py スクリプトを使用して数式値を再計算できます。このスクリプトは初回実行時にLibreOfficeを自動設定します。これには、Unixソケットが制限されたサンドボックス環境も含まれます(scripts/office/soffice.py で処理)。

データの読み取りと分析

pandasを使用したデータ分析

データ分析、可視化、および基本的な操作には、強力なデータ操作機能を提供する pandas を使用します。

import pandas as pd

# Excelを読み込む
df = pd.read_excel('file.xlsx')  # デフォルト: 最初のシート
all_sheets = pd.read_excel('file.xlsx', sheet_name=None)  # すべてのシートを辞書として

# 分析
df.head()      # データのプレビュー
df.info()      # 列情報
df.describe()  # 統計情報

# Excelに書き出す
df.to_excel('output.xlsx', index=False)

Excelファイルのワークフロー

重要: 数式を使用し、ハードコード値は使用しない

Pythonで値を計算してハードコードするのではなく、常にExcelの数式を使用してください。 これにより、スプレッドシートが動的で更新可能な状態を維持できます。

❌ 誤り - 計算値のハードコード

# 悪い例: Pythonで計算し、結果をハードコード
sheet['B10'] = 5000  # ハードコード

# 悪い例: 成長率をPythonで計算
sheet['C5'] = 0.15  # ハードコード

# 悪い例: Pythonで平均を計算
sheet['D20'] = 42.5  # ハードコード

✅ 正しい - Excel数式の使用

# 良い例: Excelに合計を計算させる
sheet['B10'] = '=SUM(B2:B9)'

# 良い例: 成長率をExcel数式として
sheet['C5'] = '=(C4-C2)/C2'

# 良い例: Excel関数で平均
sheet['D20'] = '=AVERAGE(D2:D19)'

これは、合計、パーセンテージ、比率、差など、すべての計算に適用されます。スプレッドシートは、元データが変更されたときに再計算できる必要があります。

一般的なワークフロー

  1. ツールの選択: データにはpandas、数式/書式設定にはopenpyxl
  2. 作成/読み込み: 新しいワークブックを作成するか、既存のファイルを読み込む
  3. 変更: データ、数式、書式設定の追加/編集
  4. 保存: ファイルに書き出す
  5. 数式の再計算(数式を使用する場合は必須): scripts/recalc.py スクリプトを使用する
    python scripts/recalc.py output.xlsx
    
  6. エラーの確認と修正:
    • スクリプトはエラーの詳細を含むJSONを返す
    • status が errors_found の場合、error_summary でエラーの種類と場所を確認する
    • 特定されたエラーを修正し、再度再計算する
    • 修正すべき一般的なエラー:
      • #REF!: 無効なセル参照
      • #DIV/0!: ゼロによる除算
      • #VALUE!: 数式内の間違ったデータ型
      • #NAME?: 認識されない数式名

新しいExcelファイルの作成

# 数式と書式設定には openpyxl を使用
from openpyxl import Workbook
from openpyxl.styles import Font, PatternFill, Alignment

wb = Workbook()
sheet = wb.active

# データを追加
sheet['A1'] = 'Hello'
sheet['B1'] = 'World'
sheet.append(['Row', 'of', 'data'])

# 数式を追加
sheet['B2'] = '=SUM(A1:A10)'

# 書式設定
sheet['A1'].font = Font(bold=True, color='FF0000')
sheet['A1'].fill = PatternFill('solid', start_color='FFFF00')
sheet['A1'].alignment = Alignment(horizontal='center')

# 列幅
sheet.column_dimensions['A'].width = 20

wb.save('output.xlsx')

既存のExcelファイルの編集

# openpyxl を使用して数式と書式設定を保持
from openpyxl import load_workbook

# 既存ファイルを読み込む
wb = load_workbook('existing.xlsx')
sheet = wb.active  # または wb['SheetName'] で特定のシート

# 複数シートの操作
for sheet_name in wb.sheetnames:
    sheet = wb[sheet_name]
    print(f"シート: {sheet_name}")

# セルを変更
sheet['A1'] = 'New Value'
sheet.insert_rows(2)  # 2行目に行を挿入
sheet.delete_cols(3)  # 3列目を削除

# 新しいシートを追加
new_sheet = wb.create_sheet('NewSheet')
new_sheet['A1'] = 'Data'

wb.save('modified.xlsx')

数式の再計算

openpyxl で作成または変更されたExcelファイルには、数式が文字列として含まれていますが、計算された値は含まれていません。提供されている scripts/recalc.py スクリプトを使用して数式を再計算します。

python scripts/recalc.py <excel_file> [timeout_seconds]

例:

python scripts/recalc.py output.xlsx 30

このスクリプトは:

  • 初回実行時にLibreOfficeマクロを自動設定する
  • すべてのシートのすべての数式を再計算する
  • Excelエラー(#REF!, #DIV/0! など)がないかすべてのセルをスキャンする
  • エラーの場所と件数の詳細を含むJSONを返す
  • LinuxとmacOSの両方で動作する

数式検証チェックリスト

数式が正しく動作することを確認するためのクイックチェック:

必須の検証

  • 2~3個のサンプル参照をテストする: 完全なモデルを構築する前に、正しい値を取得していることを確認する
  • 列マッピング: Excelの列が正しいことを確認する(例: 列64はBLであり、BKではない)
  • 行オフセット: Excelの行は1から始まることを覚えておく(DataFrameの行5はExcelの行6)

よくある落とし穴

  • NaN処理: pd.notna() でnull値をチェックする
  • 右端の列: データはしばしば50列以降にある
  • 複数の一致: 最初の出現だけでなく、すべての出現を検索する
  • ゼロ除算: 数式で / を使用する前に分母を確認する(#DIV/0!)
  • 間違った参照: すべてのセル参照が意図したセルを指していることを確認する(#REF!)
  • シート間参照: シートをリンクするには正しい形式(Sheet1!A1)を使用する

数式テスト戦略

  • 小さく始める: 広範囲に適用する前に、2~3個のセルで数式をテストする
  • 依存関係を確認する: 数式で参照されているすべてのセルが存在することを確認する
  • エッジケースをテストする: ゼロ、負の数、非常に大きな値を含める

scripts/recalc.py の出力の解釈

スクリプトはエラーの詳細を含むJSONを返します:

{
  "status": "success",           // または "errors_found"
  "total_errors": 0,              // エラーの総数
  "total_formulas": 42,           // ファイル内の数式の数
  "error_summary": {              // エラーが見つかった場合のみ存在
    "#REF!": {
      "count": 2,
      "locations": ["Sheet1!B5", "Sheet1!C10"]
    }
  }
}

ベストプラクティス

ライブラリの選択

  • pandas: データ分析、一括操作、単純なデータエクスポートに最適
  • openpyxl: 複雑な書式設定、数式、Excel固有の機能に最適

openpyxl の操作

  • セルインデックスは1から始まる(row=1, column=1 はセルA1を指す)
  • 計算値を読み取るには data_only=True を使用: load_workbook('file.xlsx', data_only=True)
  • 警告: data_only=True で開いて保存すると、数式が値に置き換えられ、完全に失われる
  • 大きなファイルの場合: 読み取りには read_only=True、書き込みには write_only=True を使用する
  • 数式は保持されるが評価されない - 値を更新するには scripts/recalc.py を使用する

pandas の操作

  • データ型を指定して推論の問題を回避: pd.read_excel('file.xlsx', dtype={'id': str})
  • 大きなファイルの場合、特定の列を読み取る: pd.read_excel('file.xlsx', usecols=['A', 'C', 'E'])
  • 日付を適切に処理する: pd.read_excel('file.xlsx', parse_dates=['date_column'])

コードスタイルガイドライン

重要: Excel操作用のPythonコードを生成する場合:

  • 不要なコメントなしで、最小限かつ簡潔なPythonコードを記述する
  • 冗長な変数名や不要な操作を避ける
  • 不要なprint文を避ける

Excelファイル自体について:

  • 複雑な数式や重要な仮定を含むセルにコメントを追加する
  • ハードコードされた値のデータソースを文書化する
  • 主要な計算やモデルのセクションに関する注釈を含める

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

aiskillstore/marketplace

Create high-converting, visually distinctive landing pages. Use when building marketing pages, product launches, SaaS homepages, or any single-page conversion-focused website. Guides section-by-section composition with anti-AI-slop principles.

aiskillstore/marketplace

Auto-loaded context for Portfolio Buddy 2 development. Use for ANY task involving: React 19 development, TypeScript, portfolio analysis features, metrics calculations, trading strategy comparison, or working with the Portfolio Buddy 2 codebase. Contains tech stack, known issues, and architectural constraints.

aiskillstore/marketplace

Use when the user asks to "pre-launch check the landing page", "run a Quality-Score preflight", or "verify ad-to-page message match before launch"; produces an ad↔page continuity report — message-match gaps, above-the-fold check, page-speed read, form-friction count, mobile-render flags — as a pass/fix punch list. Not for redesigning or rewriting the page — use landing-optimizer; not for scoring the account or the RQS — use ad-account-auditor. 落地页体验预检/广告落地页一致性检查

aiskillstore/marketplace

Use when the user asks to "optimize our landing page for influencer traffic", "fix our promo-code landing page", or "improve conversion from a creator campaign"; produces a message-match audit, page-structure and social-proof recommendations, a promo-code/CTA conversion plan, and an A/B test roadmap. Not for measuring campaign results after launch — use performance-analyzer.

aiskillstore/marketplace

Audit a landing page, sales page or checkout page for conversion leaks and return a fix list ordered by expected revenue impact. Use when asked to review, critique or improve a landing page, sales page, opt-in page, product page or checkout flow, when conversion rate is low, when paid traffic is not converting, or when someone asks "why isn't this page converting" or wants a CRO / landing page review.

aiskillstore/marketplace

This skill helps users extract GitHub repository project details and contributor contact information using keywords, stars, and update dates. Agent should proactively apply this skill when users express needs like search for GitHub projects by keywords, find top open-source contributors in specific domains, extract developer contacts from GitHub repositories, discover trending repositories with high stars, gather contributor profiles and social links for tech recruiting, retrieve GitHub project descriptions and metrics, build developer communities by finding active contributors, search for repositories updated recently, collect personal website and Twitter links of developers, generate targeted leads for developer tools, or track active open-source contributors for collaboration.

aiskillstore/marketplace

Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.

aiskillstore/marketplace

Using the Wonda CLI to generate images, videos, music, and audio from the terminal — plus LinkedIn, Reddit, and X/Twitter research and automation

aiskillstore/marketplace

Comprehensive document creation, editing, and analysis with support for tracked changes, comments, formatting preservation, and text extraction. When Claude needs to work with professional documents (.docx files) for: (1) Creating new documents, (2) Modifying or editing content, (3) Working with tracked changes, (4) Adding comments, or any other document tasks

aiskillstore/marketplace

Generates creative domain name ideas for your project and checks availability across multiple TLDs (.com, .io, .dev, .ai, etc.). Saves hours of brainstorming and manual checking.

aiskillstore/marketplace

Process video files with audio extraction, format conversion (mp4, webm), and Whisper transcription. Use when user mentions video conversion, audio extraction, transcription, mp4, webm, ffmpeg, or whisper transcription.

aiskillstore/marketplace

Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output should be a bitmap asset rather than repo-native code or vector. Do not use when the task is better handled by editing existing SVG/vector/code-native assets, extending an established icon or logo system, or building the visual directly in HTML/CSS/canvas.

aiskillstore/marketplace

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.).

aiskillstore/marketplace

Router skill for LLMQuant portfolio workflows. Use when the user needs company profiles, thesis tracking, theme research, watchlist monitoring, or alert management.

aiskillstore/marketplace

Account assets, equity and fund positions, P&L, cash flow records, account statements, margin ratios, buy-power estimates, order management, and DCA recurring investments via Longbridge (most require Trade permission). Frameworks: portfolio diagnosis, rebalancing, asset allocation, risk analysis (VaR/CVaR), performance attribution, and tax-loss harvesting. Triggers: "持仓", "账户", "盈亏", "资产", "对账单", "下单", "买入", "卖出", "撤单", "定投", "组合诊断", "再平衡", "资产配置", "风险分析", "绩效归因", "税损收割", "持倉", "賬戶", "盈虧", "對賬單", "下單", "買入", "賣出", "組合診斷", "再平衡", "稅損收割", "positions", "portfolio", "P&L", "order", "buy", "sell", "DCA", "statement", "risk analysis", "rebalancing", "tax harvesting", "我的风险", "持仓风险", "风险敞口", "資產", "資產配置", "風險分析", "績效歸因", "撤單

aiskillstore/marketplace

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

aiskillstore/marketplace

Use for Codex models/pricing, scheduled tasks, skills, settings, setup, troubleshooting, customization, automations, and self-knowledge—including 'you,' 'your,' 'this app,' or 'this coding agent' when they refer to Codex—and for OpenAI APIs/products and ChatGPT Work. Also use for model choice/migration, prompting, SDKs, Responses, Realtime, agents, evals, and Chat/Work/Codex comparisons. Do not use for generic app/software tasks that merely mention Codex.

aiskillstore/marketplace

Comprehensive PDF manipulation toolkit for extracting text and tables, creating new PDFs, merging/splitting documents, and handling forms. When Claude needs to fill in a PDF form or programmatically process, generate, or analyze PDF documents at scale.

aiskillstore/marketplace

Presentation creation, editing, and analysis. When Claude needs to work with presentations (.pptx files) for: (1) Creating new presentations, (2) Modifying or editing content, (3) Working with layouts, (4) Adding comments or speaker notes, or any other presentation tasks

aiskillstore/marketplace

Perform a read-only, defect-first review of a specified code change and return every actionable finding. Use when another agent delegates review of uncommitted changes, a base-branch diff, a commit, or custom review instructions.

関連スキル