excel-subtotal-audit
Skill này làm gì
Skill này là phương pháp kiểm tra báo cáo Excel sau khi tạo, để xác nhận các tổng bao gồm đúng dòng. Dành cho người làm bảng tính tài chính hoặc tổng hợp có tổng phụ.
Khi nào nên dùng
- ✓Khi tôi đã tạo một bảng tính có công thức tổng phụ hoặc tổng cộng.
- ✓Khi một số phần có dòng trống, dòng ẩn hoặc dòng đã lọc có thể ảnh hưởng đến tổng.
- ✓Khi tệp mở được bình thường nhưng tôi vẫn cần biết các số có đúng không.
Liên kết skill
https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/excel-subtotal-audit/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Tôi đã tạo một báo cáo có tổng phụ. Hãy đọc lại và xác nhận mọi tổng phụ đều bao gồm tất cả các dòng chi tiết trong phần của nó.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
AI đọc sổ tính đã hoàn thành, in ra từng dòng có dữ liệu cùng công thức, xác định các dòng tổng phụ, rồi kiểm tra từng công thức có bao phủ đúng vùng chi tiết hay không.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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
Câu hỏi thường gặp
Kiểm tra tệp có tồn tại có đủ không?
Không. Hướng dẫn nói các kiểm tra đơn giản bỏ sót phạm vi công thức sai, nên phải xác minh các tổng.
Thế nào là không khớp?
Là công thức tổng phụ không bao gồm đủ mọi dòng chi tiết hiển thị trong phần của nó.
Những dòng nào được kiểm tra?
Mọi dòng đầu ra có dữ liệu cùng công thức, cùng các dòng trống, dòng ẩn hoặc dòng đã lọc.
Chi tiết
Mô tả gốc của tác giả
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
Độ phổ biến
- Sao GitHub
- 7.8k
- Vị trí xếp hạng
- #12876
- Giấy phép
- MIT
- Cập nhật
- 1/11/2026
Bình luận
- …
Thêm skill từ kho mã này
agentpilot
7.8kGiúp agent của bạn cải thiện dự án từng bước bằng cách chuẩn bị tác vụ và chạy vòng lặp AgentPilot, gồm đề xuất, kiểm thử và chấm điểm thay đổi.
openspace
7.8kGiúp agent của bạn thiết lập OpenSpace, công cụ lưu và lấy lại skill của agent, rồi kết nối nó với ứng dụng AI của bạn qua MCP.
rsi-arena
7.8kGiúp agent của bạn thiết lập và chạy các bài kiểm thử benchmark AI chuẩn, như AIME và Terminal-Bench, để so sánh các phương pháp cải tiến khác nhau.
experiment-guide
7.8kGiúp agent của bạn lên kế hoạch các thí nghiệm nhỏ, đọc kết quả và ghi lại phát hiện khi tìm cách cải thiện một chương trình.
Skill tương tự
feishu-doc
394kGiúp agent của bạn đọc, tạo và sửa tài liệu đám mây Feishu, gồm văn bản, hình ảnh và bảng, bằng công cụ tài liệu.
feishu-drive
394kCho phép agent của bạn duyệt, sắp xếp và bình luận các file trong một thư mục đám mây Feishu đã được chia sẻ với bot.
feishu-perm
394kGiúp agent của bạn kiểm tra và thay đổi ai có quyền truy cập một file Feishu, chọn quyền nhỏ nhất đáp ứng yêu cầu của bạn.