excel-subtotal-audit
O que ela faz
Esta skill é um método para conferir um relatório Excel depois de criado, para confirmar que os totais incluem as linhas certas. Ela é para quem faz planilhas financeiras ou de resumo com subtotais.
Quando usar
- ✓Quando gerei uma planilha que contém fórmulas de subtotal ou total.
- ✓Quando algumas seções têm linhas em branco, ocultas ou filtradas que podem afetar os totais.
- ✓Quando o arquivo abre normalmente, mas ainda preciso saber se os números estão corretos.
Link da skill
https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/excel-subtotal-audit/SKILL.mdCopie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.
Como usar
O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.
Mensagem pronta para colar
Para Claude Code, Codex ou Cursor: rode na pasta do projeto e a skill fica instalada.
Baixe o SKILL.md e coloque na pasta de skills do seu agente.
Exemplo do que pedir para a IA
“Gerei um relatório com subtotais. Leia-o de volta e confirme que cada subtotal inclui todas as linhas de detalhe da sua seção.”
5 skills novas por semana. 1 minuto de leitura.
Como funciona
A IA lê a pasta de trabalho finalizada, imprime cada linha preenchida com suas fórmulas, identifica as linhas de subtotal e verifica se cada fórmula cobre o intervalo de detalhes pretendido.
Conteúdo técnico (SKILL.md original)
Texto original do autor, em inglês, direto do 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
Perguntas frequentes
Basta verificar se o arquivo existe?
Não. O guia diz que verificações simples deixam passar intervalos de fórmula errados, então os totais precisam ser conferidos.
O que conta como divergência?
Uma fórmula de subtotal que não inclui todas as linhas de detalhe visíveis de sua seção.
Quais linhas são verificadas?
Cada linha de saída preenchida, incluindo suas fórmulas, além de linhas em branco, ocultas ou filtradas.
Detalhes
Descrição original do autor
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
Popularidade
- Estrelas no GitHub
- 7,8 mil
- Posição no ranking
- #12876
- Licença
- MIT
- Atualizada em
- 01/11/2026
Comentários
- …
Mais skills deste repositório
agentpilot
7,8 milAjuda seu agente a melhorar um projeto passo a passo, preparando uma tarefa e executando o ciclo do AgentPilot, que propõe, testa e pontua mudanças.
openspace
7,8 milAjuda seu agente a configurar o OpenSpace, uma ferramenta que armazena e busca skills de agentes, e a conectá-la ao seu app de IA pelo MCP.
rsi-arena
7,8 milAjuda seu agente a configurar e rodar testes padrão de benchmark de IA, como AIME e Terminal-Bench, para comparar diferentes métodos de melhoria.
experiment-guide
7,8 milAjuda seu agente a planejar pequenos experimentos, ler seus resultados e registrar descobertas enquanto investiga como melhorar um programa.
Skills parecidas
feishu-doc
394 milAjuda seu agente a ler, criar e editar documentos na nuvem do Feishu, incluindo textos, imagens e tabelas, usando a ferramenta de documentos.
feishu-drive
394 milPermite que seu agente navegue, organize e comente arquivos de uma pasta na nuvem do Feishu que foi compartilhada com o bot.
feishu-perm
394 milAjuda seu agente a verificar e alterar quem pode acessar um arquivo do Feishu, escolhendo a menor permissão que atende ao seu pedido.