excel-subtotal-audit
Что он делает
Этот скилл — метод проверки отчёта Excel после создания, чтобы убедиться, что итоги включают нужные строки. Он нужен тем, кто делает финансовые или сводные таблицы с промежуточными итогами.
Когда использовать
- ✓Когда я создал таблицу с формулами промежуточных или общих итогов.
- ✓Когда в некоторых разделах есть пустые, скрытые или отфильтрованные строки, которые могут влиять на итоги.
- ✓Когда файл открывается нормально, но мне всё равно нужно знать, что цифры верны.
Ссылка на скилл
https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/excel-subtotal-audit/SKILL.mdСкопируйте и вставьте её в ваш ИИ (Claude, ChatGPT или Cursor) с просьбой следовать инструкциям.
Как использовать
Самый простой способ: скопируйте сообщение и вставьте его в свой ИИ. Он прочитает скилл и выполнит инструкции.
Готовое сообщение для вставки
Для Claude Code, Codex или Cursor: запустите в папке проекта, и скилл установится.
Скачайте SKILL.md и положите его в папку скиллов вашего агента.
Пример запроса к вашему ИИ
“Я создал отчёт с промежуточными итогами. Перечитай его и подтверди, что каждый промежуточный итог включает все строки деталей в своём разделе.”
5 новых скиллов в неделю. 1 минута чтения.
Как это работает
ИИ читает готовую книгу, выводит каждую заполненную строку вместе с её формулами, находит строки итогов и проверяет, что каждая формула охватывает нужный диапазон деталей.
Технический текст (оригинальный SKILL.md)
Оригинальный текст автора на английском, прямо с 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:
- Read back the finished workbook.
- Print every populated output row, including formulas.
- Identify section subtotal rows.
- Independently verify that each subtotal formula includes all visible detail rows intended for that section.
- 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
Print a row-by-row audit log of all populated rows in the report area.
For each row, print:
- row number,
- displayed labels or key identifiers,
- numeric cells,
- raw formulas for formula cells,
- whether the row is hidden, if your library exposes that,
- any grouping/outline level if relevant.
This creates a human- and machine-inspectable trace of what the generator actually produced.
Minimum row audit format
A useful printed line looks like:
- Row 12: ["Revenue", 1250, "=SUM(B8:B11)"]
- Row 13: hidden ["Adjustment", 25, ""]
- Row 14: ["Total Revenue", "", "=SUM(B8:B13)"]
The exact format does not matter as much as consistency and inclusion of formulas.
What counts as populated
A row is populated if at least one relevant output cell contains:
- a value,
- a string label,
- a formula,
- formatting that corresponds to a semantic output row you need to validate.
Prefer auditing a defined report column range rather than the entire sheet.
3. Locate subtotal rows explicitly
Identify rows that represent subtotals, totals, or section summaries.
Common signals:
- a label like "Subtotal", "Total", "Net", "Gross", "Section Total",
- a formula in a numeric column,
- bold or styled summary rows,
- known report structure from the generator.
For each subtotal row, capture:
- section name or identifier,
- subtotal row number,
- subtotal formula text,
- the expected detail row span according to neighboring visible rows and section boundaries.
Do not assume the formula is correct just because a subtotal row exists.
4. Independently derive expected detail coverage
This is the key step.
For each section, determine which visible detail rows should contribute to the subtotal without using the subtotal formula itself as the source of truth.
Possible ways to derive the expected rows:
- rows between the section header and the subtotal row,
- rows until the next section header,
- rows matching a known indentation or outline level,
- rows with detail labels but excluding headers and subtotal labels,
- rows included by the source data mapping used to build the section.
The important rule:
The expected detail set must be computed independently from the formula being checked.
Otherwise, the audit only repeats the original mistake.
Include only visible detail rows when visibility matters
If the report hides rows, collapses groups, or applies filters, inspect whether the subtotal is supposed to summarize:
- all underlying rows, or
- only
Частые вопросы
Достаточно ли проверки существования файла?
Нет. В руководстве сказано, что простые проверки пропускают неверные диапазоны формул, поэтому итоги нужно проверять.
Что считается расхождением?
Формула промежуточного итога, которая не включает все видимые строки деталей своего раздела.
Какие строки проверяются?
Каждая заполненная строка вывода вместе с формулами, а также пустые, скрытые или отфильтрованные строки.
Подробности
Оригинальное описание автора
Audit generated Excel reports by enumerating populated output rows, exposing formulas, and checking that each subtotal range includes all visible detail rows.
repo: HKUDS/AgentPilot
Популярность
- Звёзды на GitHub
- 7.8k
- Место в рейтинге
- #12876
- Лицензия
- MIT
- Обновлён
- 01.11.2026
Комментарии
- …
Другие скиллы из этого репозитория
agentpilot
7.8kПомогает агенту улучшать проект шаг за шагом: готовит задачу и запускает цикл AgentPilot, который предлагает, проверяет и оценивает изменения.
openspace
7.8kПомогает агенту настроить OpenSpace, инструмент для хранения и получения скиллов агента, и подключить его к вашему ИИ-приложению через MCP.
rsi-arena
7.8kПомогает агенту настроить и запустить стандартные тесты ИИ, например AIME и Terminal-Bench, чтобы сравнивать разные методы улучшения.
experiment-guide
7.8kПомогает агенту планировать небольшие эксперименты, читать их результаты и записывать выводы, пока он исследует, как улучшить программу.
Похожие скиллы
feishu-doc
394kПомогает агенту читать, создавать и редактировать облачные документы Feishu, включая текст, изображения и таблицы, с помощью инструмента для документов.
feishu-drive
394kПозволяет агенту просматривать, упорядочивать и комментировать файлы в облачной папке Feishu, к которой предоставлен доступ боту.
feishu-perm
394kПомогает агенту проверить и изменить, кто может получить доступ к файлу Feishu, выбирая наименьшее право, которое соответствует вашему запросу.