excel-subtotal-audit

excel-subtotal-audit is a skill for Claude Code, Codex from HKUDS/OpenSpace. It costs 32 tokens per session (2,869 once invoked), scanned A, original, MIT.

A workflow for checking subtotal formulas in generated Excel reports. It compares each subtotal range with the visible detail rows it is meant to summarize.

In plain words
What is it for?
It helps audit financial statements, grouped exports, rollups, and other workbooks with subtotal or total formulas.
Why use it?
It catches spreadsheet reports that open normally but contain incorrect totals because a formula skipped rows.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

About the project

OpenSpace is a skill-management layer for AI agents that stores, retrieves, evaluates, shares, and improves reusable workflows. It is intended for people using multiple coding agents who want skills to be reused and refined based on task outcomes. The catalogue provides 200 skills for use with OpenSpace and the agents it supports.

HKUDS/OpenSpace · 7,506 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/hkuds/openspace/excel-subtotal-audit
Any agent
npx skills add HKUDS/OpenSpace --skill excel-subtotal-audit
Clone the repo
git clone --depth 1 https://github.com/HKUDS/OpenSpace

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for excel-subtotal-audit

README.md
[![agentmods](https://agentmods.dev/badge/skills/hkuds/openspace/excel-subtotal-audit.svg)](https://agentmods.dev/skills/hkuds/openspace/excel-subtotal-audit)
Your own site
<a href="https://agentmods.dev/skills/hkuds/openspace/excel-subtotal-audit"><img src="https://agentmods.dev/badge/skills/hkuds/openspace/excel-subtotal-audit.svg" alt="Measured on agentmods" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,869 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00032 $0.02869
Opus 5 $0.00016 $0.01435
Sonnet 5 $0.00006 $0.00574
Haiku 4.5 $0.00003 $0.00287

Measured 6d ago against content hash 2a3ff056ea5a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

excel-subtotal-audit scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

benchmarks/gdpval/skills/excel-subtotal-audit/SKILL.md · 438 lines

How it starts

The opening of the file, as written. The whole thing — 438 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Excel Subtotal Audit

Use this workflow after generating or modifying an Excel report to catch silent spreadsheet defects that simple file-exists or sheet-exists checks will miss.

The core idea is:

  1. Read back the finished workbook.
  2. Print every populated output row, including formulas.
  3. Identify section subtotal rows.
  4. Independently verify that each subtotal formula includes all visible detail rows intended for that section.
  5. Treat any mismatch as a report defect, even if the workbook opens successfully and looks formatted correctly.

This is especially useful for generated financial statements, operational summaries, rollups, grouped exports, and any worksheet where formulas summarize nearby detail rows.

When to use

Use this skill when:

  • You generate Excel workbooks programmatically.
  • The workbook contains subtotal, total, or rollup formulas.
  • Sections may contain blank rows, hidden rows, filtered rows, or varying detail lengths.
  • A mistake in a formula range would produce a plausible but wrong spreadsheet.
  • Basic validation only checks whether the file was created, whether sheets exist, or whether formulas are present.

Goal

Do not stop at "the report was written successfully."

Instead, prove that:

  • every expected output row is present,
  • formulas were written into the intended cells,
  • each subtotal references the correct detail range,
  • no visible detail rows are omitted from the subtotal span.

Workflow

1. Save the workbook, then reopen it for audit

Always audit the workbook after writing it, using a fresh read from disk if possible. This verifies the actual persisted artifact rather than in-memory assumptions.

Checklist:

  • Save workbook.
  • Reopen workbook from disk.
  • Select the target worksheet.
  • Use formula view or raw formulas, not only calculated values.

Why: a writer may have inserted the wrong range, overwritten cells, or shifted rows during formatting.

2. Enumerate every populated row in the output region

Read the full file on GitHub · 438 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 438 lines · 32 tokens per session scan A 2a3ff056ea5a

Subscribe to this mod's changes

excel-subtotal-audit is a skill published in the GitHub repository HKUDS/OpenSpace (7,506 stars, last pushed 24d ago), licensed MIT. It adds 32 tokens to every session and 2,869 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.