本文へスキップ
Skillpedia
PDF・Word・スライド260k · #493

excel-author

できること

数式、セルの色、名前付き範囲を使ったExcelファイルの作成について、銀行業界の標準的な書き方を示します。openpyxlライブラリを使います。他の人が確認・変更できるスプレッドシートが必要な人向けです。

使う場面

  • ✓Excelブックを一から作る必要があるとき、またはデータからブックを作るとき。
  • ✓スプレッドシートを他の人が確認・監査する必要があるとき。
  • ✓ブック内で数式と入力値を分けて分かりやすく管理したいとき。

スキルのリンク

https://github.com/NousResearch/hermes-agent/blob/main/optional-skills/finance/excel-author/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/NousResearch/hermes-agent/blob/main/optional-skills/finance/excel-author/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“この売上データからExcelブックを作成してください。数式を使い、チームが監査できるよう入力値に分かりやすい色を付けてください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

エージェントは、openpyxlを使って出力フォルダにブックを書き出します。値を貼り付けるのではなく数式を使い、セルの色も統一します。引き渡す前にファイルを再計算します。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

excel-author

Produce an .xlsx file on disk using openpyxl. Follow the banker-grade conventions below so the model is auditable, flexible, and reviewable by someone other than the person who built it.

Adapted from Anthropic's xlsx-author and audit-xls skills in the anthropics/financial-services repo. The MCP / Office-JS / Cowork-specific branches of the originals are dropped — this skill assumes headless Python.

Output contract

  • Write to ./out/<name>.xlsx. Create ./out/ if it does not exist.
  • Return the relative path in your final message so downstream tools can pick it up.
  • One logical model per file. Do not append to an existing workbook unless explicitly asked.

Setup

Use python when it already imports openpyxl (the Hermes Docker image ships it). Otherwise, when hermes is on PATH, let Hermes build its shared, pinned documents environment under the Hermes home (safe to run from several agents at once); in a Docker sandbox without Hermes the block builds a venv in the sandbox home with the same pinned versions. It is the same block as the microsoft-office/pdf skills. Never pip install into the interpreter that runs Hermes:

python -c "import openpyxl" 2>/dev/null && PY=python || if command -v hermes >/dev/null 2>&1; then
  PY="$(hermes pm environment documents --extra documents --extra documents-pdf)"
else
  PY="$HOME/.cache/hermes-docs-venv/bin/python"
  "$PY" -c "import docx, openpyxl, pptx, reportlab, pypdf, pdfplumber, pypdfium2" 2>/dev/null || (
    # Safe to run from several agents at once: each caller builds a private venv,
    # a symlink publishes the first finished one atomically, the others delete theirs;
    # a published build is replaced and deleted only while it still fails to import.
    mkdir -p "$HOME/.cache" && cd "$HOME/.cache" && stage="$(mktemp -d hermes-docs-venv.XXXXXX)" || exit 1
    old="$(readlink hermes-docs-venv)"  # the published build, if any (another agent may have just published it)
    python3 -m venv "$stage" &&
      "$stage/bin/python" -m pip install -q --disable-pip-version-check python-docx==1.2.0 openpyxl==3.1.5 python-pptx==1.0.2 reportlab==5.1.0 pypdf==6.21.2 pdfplumber==0.11.10 pypdfium2==5.14.0 &&
      "$stage/bin/python" -c "import docx, openpyxl, pptx, reportlab, pypdf, pdfplumber, pypdfium2" &&
      if [ -z "$old" ]; then python3 -c 'import os, sys; os.symlink(*sys.argv[1:])' "$stage" hermes-docs-venv
      elif [ "$(readlink hermes-docs-venv)" = "$old" ] && ! "$old/bin/python" -c "import docx, openpyxl, pptx, reportlab, pypdf, pdfplumber, pypdfium2" 2>/dev/null; then
        ln -s "$stage" "$stage.lnk" && python3 -c 'import os, sys; os.replace(*sys.argv[1:])' "$stage.lnk" hermes-docs-venv &&
          case "$old" in hermes-docs-venv.??????) rm -rf "$old" ;; esac
      fi 2>/dev/null
    [ "$(readlink hermes-docs-venv)" = "$stage" ] || rm -rf "$stage" "$stage.lnk"
  )
fi
export PY

Run the model-building Python with "$PY".

Core conventions (non-negotiable)

Blue / black / green cell color

  • Blue (Font(color="0000FF")) — hardcoded input a human entered. Revenue drivers, WACC inputs, terminal growth, market data.
  • Black (default) — formula. Every derived cell is a live Excel formula.
  • Green (Font(color="006100")) — link to another sheet or external file.

A reviewer can then scan the sheet and immediately see what's an assumption vs. what's computed.

Formulas over hardcodes

Every calculation cell MUST be a formula string, never a number computed in Python and pasted as a value.

# WRONG — silent bug waiting to happen
ws["D20"] = revenue_prior_year * (1 + growth)

# CORRECT — flexes when the user changes the assumption
ws["D20"] = "=D19*(1+$B$8)"

The only hardcoded numbers permitted:

  1. Raw historical inputs (actual revenues, reported EBITDA, etc.)
  2. Assumption drivers the user is meant to flex (growth rates, WACC inputs, terminal g)
  3. Current market data (share price, debt balance) — with a cell comment documenting source + date

If you catch yourself computing a value in Python and writing the result, stop.

Named ranges for cross-sheet references

Use named ranges for any figure referenced from another sheet, a deck, or a memo.

from openpyxl.workbook.defined_name import DefinedName
wb.defined_names["WACC"] = DefinedName("WACC", attr_text="Inputs!$C$8")
# then elsewhere:
calc["D30"] = "=D29/WACC"

Balan

よくある質問

ファイルはどこに保存されますか?

作業フォルダ内のoutフォルダに保存され、その相対パスが返されます。

Pythonにパッケージをインストールしますか?

スキルでは、Hermesを実行するインタープリターにはpip installしないと定めています。代わりに別の環境を使います。

リクエストごとに1つのブックを作りますか?

はい。各ファイルは1つの論理モデルを保持し、依頼がない限り既存のブックには追加しません。

詳細

作者による元の説明

Build auditable financial workbooks headless via openpyxl.

repo: NousResearch/hermes-agent

人気

GitHubのスター
260k
ランキング
#493
ライセンス
MIT
更新日
2026/11/2

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル