agentleFS
qwwiwiqwwiwi/public-architecture-claude-code/skills/gws/SKILL.md

gws

Skill8 starsChanged 8 months agoMITView on GitHub

Google Workspace -- Gmail, Calendar, Drive, Sheets, Docs, Tasks. Use when: send email, check calendar, read/write spreadsheets, manage Drive files, Google Tasks.

  • Installs packages

8 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 8 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    CONFIRM: before sending email or creating calendar events

    line 154
  2. Distinctive:

    All output is JSON by default

    line 155
  3. Very specific:

    Use --page-all for pagination

    line 156

“Common” is measured: kept by at least 6 in 10 of the 8 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

GWS -- Google Workspace

CLI: gws (Google official). Requires OAuth 2.0 setup.

Setup

# 1. Install gws CLI
pip install google-workspace-cli

# 2. Create OAuth credentials at https://console.cloud.google.com
#    APIs & Services > Credentials > Create OAuth Client ID
#    Download as client_secret.json

# 3. Place credentials
mkdir -p ~/.config/gws
cp client_secret.json ~/.config/gws/

# 4. Authenticate (opens browser)
gws auth login

# 5. Verify
gws auth status

Health Check

bash $CLAUDE_SKILL_DIR/scripts/health-check.sh

Gmail

# List recent emails
gws gmail users messages list --params '{"userId":"me","maxResults":10,"q":"newer_than:7d"}'

# Read email
gws gmail users messages get --params '{"userId":"me","id":"MSG_ID","format":"full"}'

# Search
gws gmail users messages list --params '{"userId":"me","q":"from:someone@email.com subject:urgent","maxResults":5}'

# Send email (CONFIRM with operator before sending)
python3 -c "
import base64, json, subprocess
from email.mime.text import MIMEText

msg = MIMEText('Email body here')
msg['to'] = 'recipient@email.com'
msg['subject'] = 'Subject'
raw = base64.urlsafe_b64encode(msg.as_bytes()).decode()
result = subprocess.run([
    'gws', 'gmail', 'users', 'messages', 'send',
    '--params', '{\"userId\":\"me\"}',
    '--json', json.dumps({'raw': raw})
], capture_output=True, text=True)
print(result.stdout)
"

Calendar

# List calendars
gws calendar calendarList list

# Events for a period
gws calendar events list --params '{
  "calendarId":"primary",
  "timeMin":"2026-01-01T00:00:00Z",
  "timeMax":"2026-01-07T00:00:00Z",
  "singleEvents":true,
  "orderBy":"startTime"
}'

# Create event (CONFIRM with operator)
gws calendar events insert --params '{"calendarId":"primary"}' --json '{
  "summary":"Meeting",
  "start":{"dateTime":"2026-01-02T10:00:00+03:00"},
  "end":{"dateTime":"2026-01-02T11:00:00+03:00"},
  "reminders":{"useDefault":false,"overrides":[
    {"method":"popup","minutes":1440},
    {"method":"popup","minutes":180},
    {"method":"popup","minutes":15}
  ]}
}'

Drive

# List files
gws drive files list --params '{"pageSize":10,"q":"name contains \"report\""}'

# Download file
gws drive files get --params '{"fileId":"FILE_ID","alt":"media"}' --output /tmp/file.pdf

# Upload file
gws drive files create --params '{"uploadType":"multipart"}' --json '{"name":"file.txt","parents":["FOLDER_ID"]}' --upload /path/to/file.txt

Sheets

# Read data
gws sheets spreadsheets values get --params '{"spreadsheetId":"SHEET_ID","range":"Sheet1!A1:D10"}'

# Write data
gws sheets spreadsheets values update --params '{
  "spreadsheetId":"SHEET_ID",
  "range":"Sheet1!A1:B2",
  "valueInputOption":"USER_ENTERED"
}' --json '{"values":[["A","B"],["1","2"]]}'

# Append rows
gws sheets spreadsheets values append --params '{
  "spreadsheetId":"SHEET_ID",
  "range":"Sheet1!A:C",
  "valueInputOption":"USER_ENTERED",
  "insertDataOption":"INSERT_ROWS"
}' --json '{"values":[["x","y","z"]]}'

Docs

# Read document
gws docs documents get --params '{"documentId":"DOC_ID"}'

# Export to text
gws drive files export --params '{"fileId":"DOC_ID","mimeType":"text/plain"}' --output /tmp/doc.txt

Tasks

# List task lists
gws tasks tasklists list

# List tasks
gws tasks tasks list --params '{"tasklist":"TASKLIST_ID"}'

Rules

  1. CONFIRM before sending email or creating calendar events
  2. All output is JSON by default
  3. Use --page-all for pagination
  4. Token auto-refreshes -- no manual renewal needed
  5. Credentials in ~/.config/gws/ -- chmod 600

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.