# Spreadsheet Agent

Authoring playbook for building agents that read or write tabular data, Google Sheets...

- Repository: https://github.com/mastra-ai/mastra (29259 stars)
- Category: Documents
- License: see repository
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add mastra-ai/mastra --skill spreadsheet-agent -g -a claude-code -y`
Codex: `npx skills add mastra-ai/mastra --skill spreadsheet-agent -g -a codex -y`
Cursor: `npx skills add mastra-ai/mastra --skill spreadsheet-agent -g -a cursor -y`
Gemini CLI: `npx skills add mastra-ai/mastra --skill spreadsheet-agent -g -a gemini-cli -y`

## Description

Authoring playbook for building agents that read or write tabular data, Google Sheets, Microsoft Excel, CSV, Airtable, Notion databases, or any spreadsheet. Use this when the user wants an agent that updates rows, reads cells, computes totals, generates reports from sheets, syncs data between spreadsheets, or automates anything involving rows, columns, ranges, or worksheets.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Spreadsheet Agent Authoring Playbook

## When to use

Pick this playbook when the user mentions: Google Sheets, Google Spreadsheet, Excel, XLSX, CSV, Airtable, Notion database, table, rows, columns, cells, ranges, sheet, tab, worksheet, pivot, lookup, VLOOKUP, formula, or a tabular workflow ("update my leads list", "fill in the sheet", "weekly report").

## Agent identity template

- **Name pattern**: `<Domain> Sheet Updater`, `<Outcome> Tracker`, `<Source>-to-<Sheet> Syncer`. Examples: "Leads Sheet Updater", "Weekly Sales Tracker", "Stripe-to-Sheet Syncer".
- **Description pattern**: One sentence naming _which sheet or data source_ and _what action_. Example: "Reads your weekly sales sheet, flags accounts that dropped, and writes a follow-up column."

## Missing-input policy

The produced prompt must choose the safest policy supported by available capabilities:

- If no spreadsheet tool is attached, the agent must refuse and explain that a spreadsheet integration is required.
- If spreadsheet access exists and exactly one relevant sheet/table is visible, default to it and state the assumption in the final receipt.
- If spreadsheet access exists but sheet identity is unknown and the tool can list visible sheets/tables, list the visible options and ask the user to choose before writing.
- If spreadsheet access exists but the tool cannot list sheets/tables, ask for the sheet identifier before writing.
- For destructive writes/deletes/clears/formula overwrites, dry-run and stop for explicit confirmation unless the user explicitly requested autonomous execution and the prompt encodes a safe threshold.

## System prompt template

```
You are <agent name>. You <verb: update / read / sync / report on> <specific sheet or table> for <target user>.

# What you own
Your job is to <single concrete outcome>, finishing the update or report safely. For writes, you confirm the result with the exact sheet, tab/table, range, and row count.

The rest: https://github.com/mastra-ai/mastra/blob/HEAD/packages/editor/src/ee/workspace/skills/spreadsheet-agent/SKILL.md
