google-sheets
它能做什么
该技能创建和设置 Google 表格的格式,包括图表和数据录入规则。适合制作电子表格、跟踪表和简单仪表板的人。
适用场景
- ✓当你要求智能体在 Google 表格中创建电子表格或仪表板的时候。
- ✓当你需要在 Google 表格中添加或修复图表的时候。
- ✓当你希望设置单元格格式、添加数据验证,或重新组织工作表和行的时候。
技能链接
https://github.com/cursor/plugins/blob/main/third_party/google-sheets/skills/google-sheets/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“为我们的月度开支制作一个 Google 表格跟踪器,并附上一张按类别统计总额的柱状图。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会先写入数值,然后应用格式,最后添加图表。它会使用工作表名称和表格 ID 来定位每项改动。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Google Sheets authoring
Two coordinate systems, on purpose
- VALUE tools (
read_range,write_range,append_rows,clear_range) address a TAB TITLE plus A1 cells:{sheet: "Data", cells: "A1:B4"}. - STRUCTURE/FORMAT tools (
format_cells,set_borders,merge_cells,add_chart,add_conditional_formatting,insert_rows_or_columns,delete_rows_or_columns,freeze_rows_or_columns,sort_range,set_data_validation,set_basic_filter,add_banding,set_column_width,rename_sheet_tab,delete_sheet_tab) address the numericsheetId.
get_spreadsheet returns both (each tab's title AND sheetId) with no cell
data - call it first and keep the mapping. A new tab's sheetId is in
add_sheet_tab's reply (replies[0].addSheet.properties.sheetId).
Sequencing a styled sheet: values first, then format, chart last
create_spreadsheet(optionally with named tabs; it cannot target a folder - move it after with google-drivegoogle_drive_move_or_rename).write_rangethe data withparseInput: truewhen values include numbers, dates, or formulas (default false stores everything as literal text - a top source of "chart is empty" bugs).- Format like a real dashboard, not a bare grid:
format_cellsbold header with a fill color and white text; number patterns on value columns ($#,##0,0.0%).freeze_rows_or_columnsthe header row.set_basic_filterover the table range - filter dropdowns are what make it read as a data table.set_borders(outer heavier than inner) oradd_bandingfor alternating row colors;set_column_widthso nothing clips.add_conditional_formattingfor thresholds worth seeing at a glance.
add_chartLAST, after the data exists.
Charts
- In
add_chart, the FIRST range is the domain (x axis / pie labels) and later ranges are the series, one column each; anchoring a chart to the wrong or reversed ranges is the most common chart bug. All ranges live on the same tab as the chart.headerCount: 1uses the first cells as series labels - include the header row in each range when you set it. - Place the chart over empty cells beside or below the table, not on top of the data it plots.
- A wrong chart is fixed in place, not worked around:
get_spreadsheetlists every tab's charts (chartId, title),update_chartreplaces a chart's spec keeping its position,delete_chartremoves one. Never add a second chart to paper over a bad first one.
Named and protected ranges
add_named_rangemakes formulas self-documenting (=SUM(Budget)instead of=SUM(B2:B13)); write the formula withparseInput: true. Names cannot look like cell references.protect_rangeguards headers and formula cells (warningOnly: trueby default warns editors;falselocks them). Protect AFTER the last write to that range, or your own writes fight the protection.get_spreadsheetlists both, with the idsdelete_named_rangeandunprotect_rangeneed.
Pitfalls
- No revision guard anywhere: last write wins. Read before writing when a collaborator may be editing.
merge_cellskeeps only the top-left value; write the text after merging.sort_rangerewrites cell positions; sort before adding formulas that reference the range, and exclude the header row from the sorted range.insert_rows_or_columns/delete_rows_or_columnspositions are 1-based (A=1); deletes are immediate and not undoable through the API.find_replace_sheetis literal (never regex here) and can search inside formulas withsearchFormulas: true.- Whole-tab reads can blow the byte cap; bound
cells(e.g. "1:2000") on tabs you have not sized and follownextCellswhen truncated.
Verify your work
read_range for values (FORMATTED_VALUE shows what the user sees;
UNFORMATTED_VALUE the raw numbers - use it to confirm numbers are numbers,
not text). get_spreadsheet for structure: tabs, charts, named ranges,
protections. google-drive google_drive_export_file (pdf renders every tab
including charts and formatting) when the visual result matters.
常见问题
为什么我的图表是空的?
通常是因为数字被存成了文本。该技能可以写入数值,使数字和日期保持为真正的数值。
它能添加条件格式吗?
能。该技能涵盖条件格式、数据验证和筛选。
它能保护区域吗?
能。命名区域和受保护区域都属于该技能的范围。
详情
作者的原始描述
Build and edit Google Sheets with the google-sheets tools - values, formatting, charts, conditional formatting, structure, validation, named and protected ranges. Use when creating a spreadsheet or dashboard, formatting cells, adding or fixing charts, or reorganizing tabs and rows.
repo: cursor/plugins
热度
- GitHub 星标
- 15k
- 排名
- #11017
- 许可证
- —
- 更新时间
- 2026/10/31
评论
- …
同一仓库的更多技能
advisor
15k如果你开启该功能,让你的智能体在关键节点咨询一个更强的第二模型,例如在重大决定之前,或在错误上卡住时。
check-agent-compatibility
15k全面检查 AI 编程智能体能否启动、验证和记录某个代码仓库,并返回一个兼容性评分以及主要问题。
cli-for-agents
15k教你的智能体设计或审查命令行工具,使 AI 智能体无需提示即可运行,并提供清晰的帮助文字和示例。
continual-learning
15k通过把回顾过往对话的工作交给专门的记忆更新程序,使你的 AGENTS.md 笔记保持最新。