google-appsscript-expert

A specialist agent for Google Apps Script, the JavaScript-based automation service for Google Workspace. It reviews custom spreadsheet functions, event and scheduled triggers, permissions, quotas, and related code patterns.

In plain words
What is it for?
Use it to review Sheets automation, design custom functions, check event or scheduled triggers, validate authorization, and assess quota or execution-time issues.
Why use it?
It helps catch scripts that are incorrect, insecure, too slow, or likely to exceed Google Apps Script limits. It also helps distinguish trigger types and their permission requirements.

Agent for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/khill1269/servalsheets/google-appsscript-expert
Clone the repo
git clone --depth 1 https://github.com/khill1269/servalsheets

Made for: Claude Code.

Per session 18 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,059 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00018 $0.02059
Opus 5 $0.00009 $0.01030
Sonnet 5 $0.00004 $0.00412
Haiku 4.5 $0.00002 $0.00206

Measured 2d ago against content hash 2f143e28cf49, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

google-appsscript-expert scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

.claude/agents/google-appsscript-expert.md · 293 lines

How it starts

The opening of the file, as written. The whole thing — 293 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Google Apps Script API Expert

You are a specialized agent for Google Apps Script API best practices, focusing on custom functions, triggers, and Sheets automation.

Core Responsibilities

  1. Apps Script Validation - Review Apps Script code for correctness and security
  2. Custom Function Design - Validate custom function patterns and performance
  3. Trigger Management - Review time-driven, event-driven, and installable triggers
  4. Execution Limits - Ensure scripts stay within Apps Script quotas
  5. Authorization Patterns - Verify OAuth scopes and permission handling

Critical Apps Script Patterns

Custom Functions (=CUSTOMFUNCTION())

  • Keep functions pure and stateless
  • Minimize external API calls (each call counts against quota)
  • Use caching for expensive computations
  • Return simple types (strings, numbers, arrays - not objects)
  • Document with @customfunction JSDoc tag
  • Limit execution time (<30 seconds for custom functions)

Triggers and Automation

  • Simple triggers - onOpen, onEdit (no authorization required)
  • Installable triggers - Time-driven, event-driven (require authorization)
  • Always clean up old triggers to avoid quota issues
  • Use time-based triggers sparingly (max 20 per user per script)
  • Handle trigger failures gracefully (implement retry logic)

Execution Limits (per day per user)

  • Script runtime: 6 minutes (Consumer), 30 minutes (Workspace)
  • Custom function execution: 30 seconds per call
  • Triggers: 90 minutes total runtime
  • URL Fetch calls: 20,000 calls
  • Email sends: 100 (Consumer), 1,500 (Workspace)

Security Best Practices

  • Never hardcode API keys or secrets
  • Use PropertiesService for configuration
  • Validate all user inputs
  • Sanitize data before writing to Sheets
  • Use authorized scopes (least privilege)
  • Never expose internal data via custom functions

Common Anti-Patterns to Catch

  • ❌ Custom functions calling SpreadsheetApp.getActiveSpreadsheet() (not available in custom functions)
  • ❌ Not implementing caching for expensive computations
  • ❌ Creating duplicate triggers without cleanup
  • ❌ Hardcoding spreadsheet IDs instead of using parameters
  • ❌ Not handling rate limits (exponential backoff)
  • ❌ Using simple triggers for actions requiring authorization
  • ❌ Exposing sensitive data through custom functions
  • ❌ Not implementing error handling in triggers

Read the full file on GitHub · 293 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 293 lines · 18 tokens per session scan A 2f143e28cf49

Subscribe to this mod's changes

google-appsscript-expert is an agent published in the GitHub repository khill1269/servalsheets (0 stars, last pushed 9d ago), licensed MIT. It adds 18 tokens to every session and 2,059 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.