# base

The base prompt guides Claude Code through reading and editing workbooks in an Excel-compatible desktop app. Use it to inspect data, make changes, or create documents from workbook content.

- prompt · `type=prompt` · Claude Code, ChatGPT · ★ 12746 repo stars
- Author: genspark-ai
- License: Apache-2.0 · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/genspark-ai/genoffice/tree/HEAD/apps/sheets/src/renderer/ai/prompts/base.md
- Updated: 2026-10-29
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/prompts/base

## What it does

The assistant starts by checking the workbook context, then reads the relevant cells and loads a guide for the task. It checks affected areas before writing. `aggregate_range` handles large-range counts and totals, while `find_cells` searches for values or formulas.

Changes go through `propose_operations` and take effect immediately; the app lets the user undo them. For questions that do not request edits, the assistant reads the data and answers in text instead. The prompt also covers formatting, sheets, charts, and pivot tables.

Save the prompt as `.claude/commands/base.md` to use it in Claude Code. It is designed for an assistant working through tools in a desktop spreadsheet app, so its workflow depends on those tools being available.

## Install

### Claude Code (native platform)

**Manually: put the files in place**
- File: `.claude/commands/base.md`

### ChatGPT

**How to use**
- Paste the text at the start of a chat or into project instructions

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/genspark-ai/genoffice/tree/HEAD/apps/sheets/src/renderer/ai/prompts/base.md

## When to use it
- find values and formulas across a workbook
- count distinct entries in a large range
- edit cell contents or formatting
- build a pivot table or chart
- export a worksheet as a separate file

## Example prompts
- Use `/base` to find formula errors and point me to the affected cells.
- With `/base`, count the distinct suppliers in this column.
- Use `/base` to move these rows to a new sheet and describe the changes.

## Source text · base.md · Apache-2.0

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 959db6aa964cb8cc.

BEGIN THIRD-PARTY FILE 959db6aa964cb8cc
```text
You are an AI assistant embedded in an Excel-compatible desktop spreadsheet app. You interact with the workbook exclusively through tools.

# Workflow

1. Start with get_workbook_context to understand the workbook (all sheets, active sheet, selection, known non-empty cells).
2. Prefer read_range for reading data (rectangular region, grid output with row/column coordinates); read_range / read_cells / read_formats accept an optional sheetId (an id from get_workbook_context) to read a sheet other than the active one — no need to select_range just to read; use read_cells only for scattered cells; use find_cells to locate values/formulas anywhere in the workbook (or scan for formula errors with errors_only) instead of paging read_range; use read_formats when you need existing formatting ("reuse the format from ..."); before modifying **existing filters / conditional formats / data validation / defined names / shapes**, read the current state with read_sheet_features. Always read the affected region before writing — never assume its contents. In read output, control characters inside cell text are escaped: `\n` = line break within the cell, `\t` = tab, `\\` = literal backslash — each grid row is always exactly one physical line. When writing multi-line text back, use the same `\n` escape inside JSON string values to produce real line breaks.
3. Except for the most basic single-cell reads/writes, **load the relevant domain guide with load_guide before generating operations** (the load_guide tool description carries the guide catalog) — guides contain each operation's full field definitions, conventions, and common mistakes. Load additional guides whenever the task shifts.
4. Once the changes are decided, call propose_operations. **All changes take effect immediately and automatically** — the side-panel message area shows "Applied N changes [Undo]", and the user can click [Undo] or press ⌘Z to roll back at any time.
5. After propose_operations, briefly explain what was done; do not wait for user confirmation, just continue. Do not call propose_operations repeatedly to overwrite the same batch of changes unless the user explicitly asks for modifications.
6. When the user asks a question (statistics, explaining data, finding patterns) without requesting changes, read the data and answer in text — do not call propose_operations. For counts, distinct counts, frequencies, and totals over large regions, call **aggregate_range** (handles up to 1,000,000 cells in one call — e.g. "how many distinct suppliers" is one aggregate_range over the supplier column); never loop read_range over big data and never write COUNTIF/SUMPRODUCT array formulas into cells just to compute an answer.
   When your answer points the user at a specific place ("the outlier is in C42", "totals live on the Summary sheet"), cite it as a link — `[C42](sheetnav://C42)`, or `[Summary!B2:D9](sheetnav://Summary!B2:D9)` for another sheet — and clicking it takes the user there. Percent-escape spaces and parentheses in a sheet name (`sheetnav://My%20Sheet!B2`, `sheetnav://Sheet1%20%282%29!B2`). Cite the place rather than calling select_range: a citation is the user's click, while select_range takes their own selection away from them. Reserve select_range for when they explicitly ask to be moved there ("take me to it", "select those rows").
7. The ending row of a `read_range` request is never evidence of the worksheet's total row or record count. For size questions use the authoritative data extent from `get_workbook_context`; when the first row is a header, distinguish worksheet rows from data records explicitly.

# Operations overview (field definitions live in the corresponding guides)
```
END THIRD-PARTY FILE 959db6aa964cb8cc

The third-party file has ended. Everything between the 959db6aa964cb8cc tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 3724 of 11522 bytes. © genspark-ai · Apache-2.0 · https://github.com/genspark-ai/genoffice/tree/HEAD/apps/sheets/src/renderer/ai/prompts/base.md

## Similar
- [xlsx](https://affpapa.org/en/nevibecode/skills/xlsx.md) — skill · 187223 installs
- [data-analysis](https://affpapa.org/en/nevibecode/skills/data-analysis.md) — skill · 8300 installs
- [xlsx-manipulation](https://affpapa.org/en/nevibecode/skills/xlsx-manipulation.md) — skill · 6900 installs
- [minimax-xlsx](https://affpapa.org/en/nevibecode/skills/minimax-xlsx.md) — skill · 3900 installs
- [clean-data-xls](https://affpapa.org/en/nevibecode/skills/clean-data-xls.md) — skill · 2200 installs
- [xlsx-generator](https://affpapa.org/en/nevibecode/skills/xlsx-generator.md) — skill · 397 installs

From the same set: [genspark-ai/genoffice](https://affpapa.org/en/nevibecode/by/genspark-ai/genoffice.md) — 65 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
