---
name: workbook-organizer
description: Structure tasteful workbooks with clear sheets, title blocks, assumptions, tables, subdued formatting, navigation, and sanity checks.
---

# Workbook Organizer

Use this skill when the user asks to organize, clean up, build, format, or make a workbook easier to read and audit.

## Operating Rules

- Start by reading workbook context and relevant ranges before editing.
- Create purpose-based tabs with `create_sheet` and `rename_sheet`. Prefer a clear flow: `Summary`, raw imports, inputs/assumptions, calculations, outputs/reports, and checks.
- Keep column `A` empty as a left margin when building new sheets or major sections. Start content in `B`.
- Add a title block on each user-facing sheet: title in `B2`, short description in `B3`, and author/source/date/version metadata in `B4`.
- Hide sheet gridlines on polished user-facing sheets with `set_sheet_options`, then use intentional borders/table structure instead.
- Preserve raw source data where possible. Add named ranges and tables so formulas and future edits are semantic instead of brittle A1 references.

## Sheet Organization

- Unless the model is truly small, roughly 10-15 lines or 20-30 cells, separate inputs/assumptions from outputs on different sheets.
- Put detailed outputs, structured report tables, and month-by-month schedules on their own sheets instead of stacking them below inputs, assumptions, or summary blocks.
- Keep `Summary` compact: final answers, major subtotals, navigation, and check status. Link or navigate to detailed output sheets for the underlying table.
- Use clear sheet names such as `Assumptions`, `Calculations`, `Monthly Detail`, `Output`, and `Checks` when those areas are substantive enough to stand alone.

## Tasteful Formatting

- Use white backgrounds by default: dark gray text, muted gray descriptions, border hierarchy, and red only for broken checks or serious warnings.
- Do not use gray/neutral fills for section headers, input blocks, table headers, or totals unless the user explicitly asks for filled cells.
- Use one consistent style for inputs, assumptions, and hardcoded manual values: no fill, dark text, and a visible left, bottom, or outline border.
- Keep regular formula cells visually quiet: dark text, no fill, normal font unless the cell is a major output.
- Pull hardcoded constants out of formulas into labeled assumptions when practical. If a formula must contain a constant, make that choice visible in the surrounding labels/checks.
- Use `format_range` as part of substantive edits. Suggested tokens:
  - normal text: `textColor: "#2F2F2F"`;
  - metadata/notes: `textColor: "#666666"` or `"#9A9A9A"`;
  - section/header rule: `backgroundColor: null`, `bold: true`, `border: { bottom: { style: "medium", color: "#8C959F" } }`;
  - inputs/hardcodes: `backgroundColor: null`, `border: { left: { style: "medium", color: "#8C959F" } }`;
  - totals/major breaks: `backgroundColor: null`, `bold: true`, `border: { top: { style: "medium", color: "#6E7781" }, bottom: { style: "thin", color: "#D0D7DE" } }`;
  - warnings/failing checks: `backgroundColor: "#FCE4E4"`, `textColor: "#9C0006"`.

## Borders And Tables

- Use borders instead of visible gridlines when the app supports border styling.
- Use thin light gray borders for table internals, medium gray borders for table outlines, and stronger bottom borders for section headers or major totals.
- For tables and report blocks, format headers, input cells, totals, warnings, percent/currency/plain number formats, and readable widths.
- Do not overuse heavy borders; reserve visual weight for hierarchy.

## Summary And Navigation

- Put `Summary` first for multi-sheet workbooks.
- On `Summary`, include workbook title/description, metadata, one row per user-facing sheet, and compact button-like cells such as `Open Assumptions`, `Open Forecast`, and `Open Checks`.
- Keep Summary useful for auditing. Include high-level outputs and check status when helpful.

## Sanity Checks

- Add checks when introducing formulas, imports, projections, scenario logic, or data transformations.
- Prefer checks for totals that should match, values that should sum to zero, row/column tie-outs, imported row counts, duplicate keys, missing required fields, freshness dates, and sign conventions.
- Make checks fail loudly with `add_check`; if you also write check cells, keep passing/neutral checks muted and only use red styling for failures or warning labels.
- After substantive edits, call `check_workbook`, fix reported errors when possible, and call out remaining warnings.

## Quality Bar

A good organized workbook has explicit inputs, calm formatting, semantic names, formulas separated from assumptions, visible audit checks, and enough navigation that someone can understand the model without hunting through tabs.
