gws-sheets-read — Claude Code command: what it does, how to install
Reads cell values and ranges from Google Sheets spreadsheets directly within Claude Code.
npx claude-code-templates@latest --command google-workspace/gws-sheets-readWhat gws-sheets-read does
This command integrates Claude Code with the Google Workspace CLI (gws). It constructs calls like gws sheets +read using the --spreadsheet identifier and the specified --range, such as Sheet1!A1:D10.
The assistant inspects parameter schemas with gws schema before sending queries, handling pagination parameters and API limits when needed. The workflow is strictly read-only, ensuring no data in your spreadsheets gets modified.
Without a working gws CLI installation and valid credentials confirmed by gws auth status, the command fails immediately.
What it helps with
- read specific row and column ranges from Google Sheets
- fetch spreadsheet values without manual CSV downloads
- inspect method parameter schemas using gws schema
- retrieve entire sheet contents for local processing
Example prompts for the agent
- Read the range 'Sheet1!A1:D10' from spreadsheet ID 1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms
- Fetch all values from sheet Data in spreadsheet abc123ID using gws-sheets-read
- Check available reading parameters with /gws-sheets-read
How to install gws-sheets-read
1claude-code-templates
npx claude-code-templates@latest --command google-workspace/gws-sheets-read2Manually: put the files in place
.claude/commands/gws-sheets-read.mdCall it with /gws-sheets-read. For all projects use ~/.claude/commands/
Manually: put the files in place
~/.codex/prompts/gws-sheets-read.mdCall it with /prompts:gws-sheets-read. Codex marks this format deprecated in favour of skills
Manually: put the files in place
.github/prompts/gws-sheets-read.prompt.mdManually: put the files in place
.gemini/commands/gws-sheets-read.tomlGemini stores commands as TOML: the prompt text goes into the prompt field
Questions about gws-sheets-read
How to install gws-sheets-read in Claude Code?
Run npx claude-code-templates@latest --command google-workspace/gws-sheets-read or place the file directly at .claude/commands/gws-sheets-read.md.
What does gws-sheets-read do?
It queries the Google Workspace CLI to fetch cell values from a target spreadsheet and range into your agent workflow.
Can this command alter spreadsheet contents?
No. The underlying method is read-only and cannot overwrite or clear any cells.
Source text
gws-sheets-read.md · MIT
--- allowed-tools: Bash, Read, Write, Edit argument-hint: "[resource] [method] [flags]" description: "Google Sheets: Read values from a spreadsheet." --- # Google Workspace Sheets Read Execute Google Workspace Sheets Read operations: $ARGUMENTS ## Prerequisites - Google Workspace CLI (`gws`) must be installed - Authentication configured: Run `gws auth status` to verify - Review `gws sheets-read --help` for all available commands ## Available Resources and Methods # sheets +read > **PREREQUISITE:** Read `../gws-shared/SKILL.md` for auth, global flags, and security rules. If missing, run `gws generate-skills` to create it. Read values from a spreadsheet ## Usage ```bash gws sheets +read --spreadsheet <ID> --range <RANGE> ``` ## Flags | Flag | Required | Default | Description | |------|----------|---------|-------------| | `--spreadsheet` | ✓ | — | Spreadsheet ID | | `--range` | ✓ | — | Range to read (e.g. 'Sheet1!A1:B2') | ## Examples ```bash gws sheets +read --spreadsheet ID --range 'Sheet1!A1:D10' gws sheets +read --spreadsheet ID --range Sheet1 ``` ## Tips - Read-only — never modifies the spreadsheet. - For advanced options, use the raw values.get API. ## See Also - [gws-shared](../gws-shared/SKILL.md) — Global flags and auth - [gws-sheets](../gws-sheets/SKILL.md) — All read and write spreadsheets commands ## Usage ```bash # List available resources and methods gws sheets-read --help # Inspect method schema before calling gws schema sheets-read.<resource>.<method> # Execute command with arguments gws sheets-read $ARGUMENTS ``` ## Task Execute the requested Sheets Read operation: $ARGUMENTS 1. **Verify Prerequisites** - Check `gws` is installed: `gws --version` - Verify authentication: `gws auth status` - Review available commands: `gws sheets-read --help` 2. **Inspect Method Schema** - Before calling any method, inspect its parameters - Use `gws schema` to understand required fields - Review parameter types and constraints 3. **Execute Operation** - Build command with appropriate flags - Use `--params` for query/path parameters - Use `--json` for request body - Handle pagination with `--max-results` or `--page-token` 4. **Error Handling** - Check command output for errors - Review API quotas and rate limits - Handle authentication issues - Retry transient failures --- **License**: Apache License 2.0 **Source**: [Google Workspace CLI](https://github.com/googleworkspace/cli) **Original Skill**: `gws-sheets-read`
© davila7 · MIT · davila7/claude-code-templates