指南

如何使用 Google Apps Script Copilot

先看演示,三步完成设置,再掌握每天都会用到的四个动作。

Google Apps Script Copilot open beside the editor on script.google.com

只需设置一次,三个步骤。

  1. 1Add it to ChromeOne click from the Chrome Web Store. No CLI, no config files.
  2. 2使用 Google 登录Use the account that owns your Apps Script projects.
  3. 3Open any scriptThe panel docks itself into the editor. Press Alt+L if you closed it.

每天都会用到的四个动作。

Ask in the panelAlt+L

It already has your open file and your sheet, so describe the outcome rather than the implementation. Every conversation is kept, per project, in the history panel.

Tab to acceptTab

Ghost text appears as you type. Tab takes it, Esc drops it.

Pull in files with @@

Type @ to attach another file. Type / to run a skill.

Read the diff, then acceptAccept

Changes arrive as a diff in the editor, never straight into the file. Nothing is written until you accept. Revert on a turn also undoes every turn after it.

问得含糊,答得含糊。

The gap between a useless answer and a working one is usually three extra words.

含糊

fix my script

具体

sendDailySummary throws "Cannot read range" when Sheet1 has blank rows. Guard it and keep the mail format.

值得记住。

Alt+L
Open the panel
Alt+Q
Send the selected code to chat
Tab
Accept the inline suggestion
Esc
Dismiss the suggestion
@
Attach a file to the message
/
Run a skill

在 Mac 上用 Option 代替 Alt。

先看清楚,再运行。

  • Test on a copy of the sheet, not the live one.
  • Keep API keys in PropertiesService, never in a prompt.
  • Validate anything arriving from a form or a URL parameter.
  • Keep each change small enough to review in one screen.