Communitygithub.com

bg-szy/TOP-SKILLS

スプレッドシートファイル(.xlsx, .xlsm, .xltx, .csv, .tsv)の作成、編集、分析、変換を行うスキルです。表形式データのクレンジングや再構成にも対応します。

TOP-SKILLS とは?

このスキルは、スプレッドシートファイルが主要な入出力となるあらゆるタスクを自動化するために設計されています。対応ファイル形式は .xlsx、.xlsm、.xltx、.csv、.tsv です。既存ファイルの開封、編集、修正(列追加、数式計算、書式設定、チャート作成、データクレンジング)から、スクラッチや他のデータソースからの新規作成、表形式フォーマット間の変換まで網羅します。主要なツールとして openpyxl(数式・書式処理)、pandas(一括データ入出力)、markitdown(クイックプレビュー)がプリインストールされており、LibreOffice による自動再計算も組み込まれています。プロフェッショナルなフォント指定、数式エラーのゼロ化、ハードコード値ではなく数式の使用、ユーザー仕様の厳守など、出力品質に関する厳格なガイドラインを備えています。財務モデル向けの色分けルールや数値書式テンプレートも提供されており、特にエラーチェックと外部リンク保持に注意が必要です。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/bg-szy/TOP-SKILLS/tree/HEAD/skills/skills/xlsx

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

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

ドキュメント

XLSX の作成、編集、分析

タスクアプローチ
作成または編集(数式・書式あり)openpyxl — 下記の注意点を参照
一括データの入出力pandas(read_excel、to_excel)
シートのクイック確認markitdown file.xlsx — シートごとに ## SheetName を出力。.xlsm も読み取り可能。セル座標は出力しないため、これを元に編集計画を立てないこと
モデルの読み取り(数式 と 値の両方)2回の load_workbook パス — 下記の注意点を参照

openpyxl、pandas、markitdown はプリインストールされています — pip install を実行せずに、スクリプトを書いて直接インポートしてください。インポートが失敗した場合(または markitdown コマンドがない場合)のみ、pip install で不足パッケージをインストールしてください。

以下のスクリプトパスは、このスキルのディレクトリからの相対パスです。

すべての出力に対する要件

  • プロフェッショナルフォント(Arial、Times New Roman)を全体で使用すること。ユーザーが別途指定した場合を除く。
  • 数式エラーをゼロにすること。 recalc.py が errors_found を報告している状態で決して納品しないでください。エラーが自分より前から存在していたと思われる場合は、その証拠を示すこと:data_only=True で元のファイルを読み込み、該当セルを確認してください。自分が導入したエラーは、引き継いだエラーとまったく同じように見えます。
  • 数式を使用し、ハードコードされた結果は使わないこと。 sheet['B10'] = '=SUM(B2:B9)' と書き、Python で計算した合計値を書かないでください。シートは入力値が変わったときに再計算されなければなりません。
  • ユーザーの仕様を文字通りに従うこと。 正確なタブ名、正確な列ヘッダー、ユーザーが指定した数式。別の計算をするような再設計は、どんなに洗練されていても失敗です。
  • すべての前提条件とハードコードされた数値を、読み手が確認できる場所に文書化すること — セルコメント、または表の末尾の隣接セルに。実在するソースがある場合はそれを引用すること(ソース:Company 10-K、FY2024、45ページ、収益注記、[SEC EDGAR URL])。数値がユーザーから提供された場合は、その旨を明記すること。
  • ユーザーが後で記入するためにあなたが作成するワークブックには、どのセルを編集すべきかを示す短い凡例と、期待される形式を示す現実的な値のサンプル行を1行含めること。編集を依頼されたファイルには、そのような行を決して追加しないでください。
  • 既存ファイルを編集する場合:そのファイルの規則に完全に従うこと。 それらはここにあるすべてのガイドラインよりも優先されます。まず指定された入力セルを見つけてください — 異なるフォント色、塗りつぶし、または網掛けでマークされています — そこだけに書き込み、既存の数式には一切触れないでください。

再計算(ファイルに数式が含まれる場合は必須)

openpyxl は数式をキャッシュ値なしの文字列として書き込みます。再計算を行わない限り、すべての数式セルはキャッシュ値を読み取るもの(pandas、load_workbook(data_only=True)、ほとんどのプレビューア)に対して None と返ります。

python scripts/recalc.py output.xlsx [タイムアウト秒数]   # デフォルト 30

LibreOffice がすべての数式を計算し、ファイルはその場で上書きされ、JSON が返ります:status(success | errors_found)、total_formulas、total_errors、およびエラータイプごとに最大100セルを指定する error_summary(locations_truncated は保留した数を示します — total_errors を信頼し、リストの長さを信頼しないでください)。指定されたセルを修正し、再度実行してください。status の代わりに error キーを持つ JSON は、何も再計算されなかったことを意味し、その場合のみ終了コードが非ゼロになります — errors_found は終了コード0で終了するため、正常終了をクリーンなワークブックと見なさないでください。

再計算が成功した緑色の結果は、数式が評価されたことを証明するだけで、正しいことを証明するわけではありません。 範囲が1つずれていたり、間違った行を参照していたりすると、エラーのないクリーンなファイルで間違った数値が出力されます。最初に2~3個の数式を書いて、期待通りの値を取得していることを確認してから、グリッド全体を構築してください。

別のファイルを参照するワークブックは、openpyxl で再保存して再計算すると、それらのリンクが失われます。そのような数式は ='[1]Returns Analysis'!$B$2 のように読み取られます — [1] はワークブックの外部参照リストへのインデックスであり、ディスク上の別ファイルを指すもので、シートではありません。そのファイルはほとんどの場合ここには存在しないため、セルのキャッシュ値だけがデータを保持しています。openpyxl は保存時にその値を削除し、LibreOffice は実際に参照を解決しようとして失敗し、#NAME? を書き込み、すべてのリンクを削除します。recalc.py はその状態では実行を拒否します — 上書き保存する前に、それらのセルの値を元のファイルからコピーしておいてください(--force で上書きし、損失を受け入れます)。

検証を通過する数式の選び方

LibreOffice は Excel よりも少ない関数しか実装しておらず、評価できない関数は文字通りの #NAME? として納品ファイルに焼き付けられます。

  • Excel 2007 時代の関数を優先すること — SUMIFS、INDEX、MATCH、IFERROR、SUMPRODUCT — これらはプレフィックス不要です。
  • 6つの2007年以降の関数は、_xlfn. プレフィックスを付ければ動作します。openpyxl は数式をそのまま XML に書き込み、Excel は2007年以降の関数名をプレフィックス付きで保存する(UI ではプレフィックスが隠される)ためです:_xlfn.TEXTJOIN、_xlfn.CONCAT、_xlfn.IFS、_xlfn.SWITCH、_xlfn.MAXIFS、_xlfn.MINIFS。裸で書くと、それぞれ #NAME? になります。
  • XLOOKUP、XMATCH、SORT、FILTER、UNIQUE、SEQUENCE は決して使用しないこと。 ランタイムの LibreOffice はどのプレフィックスでもこれらを評価できません。新しいビルドでは評価できますが、これらはスピル配列関数であり、openpyxl で書かれたファイルにはスピルメタデータがないため、範囲の左上のセルだけに値が入ります — そして recalc.py は切り詰められた結果に対して total_errors: 0 を報告します。ルックアップには INDEX/MATCH を使用し、並べ替え、フィルター、重複除去は Python でセルを書き込む前に行ってください。
  • LibreOffice が解析できなかった数式は小文字で書き戻されます — #NAME? の横にある素早い手がかりです。

openpyxl の注意点

  • モデルの読み取りには2回のロードが必要です。 data_only=True はキャッシュされた値を返し、数式は消えます。デフォルトでは数式文字列を返し、値はありません。1回のパスで両方を得ることはできません。
  • data_only=True は、保存すると破壊的です。 そのワークブックには数式が残っていないため、保存するとすべての数式がリテラル値に置き換えられます — 永続的に。
  • openpyxl が書き込んだばかりのファイルに対して data_only=True を使用すると、すべて None を返します — 最初に recalc.py を実行してください。(結果が "" である数式も None と読み取られます。)
  • 結合セル:左上のアンカーだけに書き込むこと。 範囲内の他のすべてのセルは MergedCell であり、.value は読み取り専用です。
  • .xlsm は keep_vba=True を load_workbook に渡さないとマクロが失われます。
  • スペースを含むシート名は、シート間参照で引用符で囲む必要があります:='Assumptions Inputs'!$B$5。引用符なしだと #VALUE! と評価されます。

財務モデル

ユーザーが別途指定した場合、または既存のファイルがすでに別のことをしている場合を除きます。

色: ハードコードされた入力値とシナリオレバーは青色文字(0,0,255)· 数式は黒色 · 別シートへのリンクは緑色(0,128,0)· 別ファイルへのリンクは赤色(255,0,0)· 主要な前提条件とユーザーが記入すべきセルは黄色の塗りつぶし(255,255,0)。

数値: 通貨 $#,##0、単位はヘッダーに記載(Revenue ($mm))· ゼロは - で表示(パーセンテージも含む、$#,##0;($#,##0);-)· 負の数は括弧内 · パーセンテージ 0.0%、小数として保存(0.15 は 15.0% と表示;15 を保存すると 1500.0% と表示)· 評価倍率 0.0x · 年はテキストとして("2024"、決して 2,024 としない)。

構造: すべての前提条件を独自のラベル付きセルに配置し、それを使用する数式から参照する(=B5*(1+$B$6)、決して =B5*1.05 としない)· すべての予測期間にわたって一貫した数式(行途中の単一編集セルが最も一般的な静かなエラー)· ゼロになり得る分母をガードする。

依存関係

openpyxl、pandas、markitdown(pip、プリインストール — インポートが失敗したかコマンドがない場合のみインストール)· LibreOffice(soffice、サンドボックス環境向けに scripts/office/soffice.py で自動設定済み)

Individual skills in this repo

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

bg-szy/TOP-SKILLS

Brand-first landing page designer — runs a brand-identity interview (colors, typography, shape language), then generates and iterates on a polished landing page via Stitch with deployment-ready HTML. Use when the user asks to create, design, or build a landing page, homepage, or marketing page and has no established visual direction. Skip when they have a design mockup, need a dashboard or app UI, are working at component level, building a multi-page app, or restyling with known design tokens — use frontend-design instead.

bg-szy/TOP-SKILLS

Fill out Microsoft Azure Landing Zone (ALZ) Accelerator checklists by interviewing the user, mapping their Azure subscriptions, integrating IP addressing documentation, and applying Microsoft Cloud Adoption Framework best practices. Produces a completed Excel checklist (.xlsx) ready for ALZ deployment. Use this skill whenever the user mentions Azure Landing Zone, ALZ checklist, landing zone accelerator, platform landing zone configuration, ALZ bootstrap, hub-and-spoke setup, Azure network topology planning, or wants to fill out any ALZ-related checklist or configuration file. Also trigger when the user uploads an Excel file that contains tabs like "Accelerator - Bootstrap", "Accelerator - Bicep", or "Accelerator - Terraform".

bg-szy/TOP-SKILLS

Compose a premium, animated landing page section by section in Next.js + Tailwind + Motion (Framer Motion) — built on a real design system, with editorial copy and motion that feels human-crafted, not template-generated. Use when building or rebuilding a landing page, marketing site, or hero/feature/pricing/CTA sections that need to look production-ready and bespoke from day one.

bg-szy/TOP-SKILLS

Write high-converting landing page copy using proven frameworks like PAS (Problem-Agitate-Solution), AIDA, and StoryBrand. Creates headlines, value propositions, CTAs, and full page sections optimized for conversion. Use when users need landing page copy, sales page content, or marketing website text.

bg-szy/TOP-SKILLS

Optimize landing pages for conversions, performance, and SEO. Use when improving landing pages, increasing conversions, or optimizing page performance.

bg-szy/TOP-SKILLS

Review investment portfolios for risk, diversification, fees. Asset allocation recommendations, tax-loss harvesting, rebalancing.

bg-szy/TOP-SKILLS

Beads Viewer - Graph-aware triage engine for Beads projects. Computes PageRank, betweenness, critical path, and cycles. Use --robot-* flags for AI agents.

bg-szy/TOP-SKILLS

CI red? Call us. Pipeline fire brigade deploys. Use when user mentions CI failures, build errors, test failures, or pipeline issues. Do NOT load for: local builds, standard implementation work, reviews, or setup.

bg-szy/TOP-SKILLS

CASS Memory System - procedural memory for AI coding agents. Three-layer cognitive architecture with confidence decay, anti-pattern learning, cross-agent knowledge transfer, trauma guard safety system. Bun/TypeScript CLI.

bg-szy/TOP-SKILLS

Mandatory entry point: read this first for any request to make, create, edit, animate, or render a video, animation, or motion graphic, including a promo, explainer, captioned clip, title card, overlay, slideshow or interactive deck, Remotion port, or any HyperFrames HTML composition. Also use it to inspect, diagnose, validate, preview, publish, or batch-render an existing HyperFrames project. Inputs may be a website URL, GitHub PR, Figma design or URL, text or brief, existing footage, or music. It resumes project state, captures intent when applicable, selects and installs the owning workflow, and routes domain capabilities. HyperFrames is the default output framework unless the user explicitly chooses another framework for the deliverable or asks only to record a browser session.

bg-szy/TOP-SKILLS

Expert in building portfolios that actually land jobs and clients - not just showing work, but creating memorable experiences. Covers developer portfolios, designer portfolios, creative portfolios, and portfolios that convert visitors into opportunities.

bg-szy/TOP-SKILLS

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. 落地页体验预检/广告落地页一致性检查

bg-szy/TOP-SKILLS

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.

bg-szy/TOP-SKILLS

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.

bg-szy/TOP-SKILLS

Landing page conversion optimization with layout rules, hero section design, and CTA psychology. Covers above-the-fold formula, social proof placement, mobile design, and F-pattern reading. Use for: startup landing pages, product pages, SaaS marketing, conversion optimization. Triggers: landing page, hero section, above the fold, conversion optimization, landing page design, cta button, hero image, landing page layout, saas landing page, product page design, conversion rate, landing page best practices

bg-szy/TOP-SKILLS

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.

bg-szy/TOP-SKILLS

Landing page conversion optimization with layout rules, hero section design, and CTA psychology. Covers above-the-fold formula, social proof placement, mobile design, and F-pattern reading. Use for: startup landing pages, product pages, SaaS marketing, conversion optimization. Triggers: landing page, hero section, above the fold, conversion optimization, landing page design, cta button, hero image, landing page layout, saas landing page, product page design, conversion rate, landing page best practices

bg-szy/TOP-SKILLS

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", "我的风险", "持仓风险", "风险敞口", "資產", "資產配置", "風險分析", "績效歸因", "撤單

bg-szy/TOP-SKILLS

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.

bg-szy/TOP-SKILLS

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.

関連スキル