Skip to content
Back to skills

Workspace Write

BSecurity

Send or draft Gmail and create or edit Google Drive files, Docs and Calendar events through a dedicated shared Workspace identity.

  • 27 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 10, 2026
ai-agentspythongoshellbashapi

Works with

  • cli
  • api

Security analysis

B88/100
  • criticalAccesses sensitive system or user directories

Pro scans all 4 files and shows the line behind each finding

Scanned November 26, 2026

npx -y skills add pymc-labs/daimon --skill workspace-write --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Workspace Write?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Workspace Write
[![Security: B — Skills Directory](https://www.skillsdirectory.com/api/skills/pymc-labs-workspace-write/badge)](https://www.skillsdirectory.com/skills/pymc-labs-workspace-write)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: workspace-write
description: Send or draft Gmail and create or edit Google Drive files, Docs and Calendar events through a dedicated shared Workspace identity.
---

Use for a concrete user's requested write. Reads already available through a
connected tool need no new credential. This script acts as the operator-bound
Google identity, normally daimon@, and never as the requester. Run on the
operator's dedicated `workspace-writer` agent; do not add shared credentials to
default Daimon. Every user of a bound agent can mint its tokens and use their
scopes directly. Script refusals do not restrict arbitrary sandbox code.

Call `get_cli_token("gcloud")`; the token lasts about one hour. Its tool result
enters model context and the session transcript. The literal token in the bash
tool command also passes through the transcript and may appear in the shell's
own command arguments. This route does not keep tokens out of transcripts.
The script itself reads stdin, does not accept a token argument, and redacts
errors. Do not echo the token or persist it to a file. Google tokens require
an agent binding and either the matching account’s authorized-user JSON
(`google_user_json` plus `google_user_email`) or a service-account key
(`google_sa_json`) with domain-wide delegation. With a user credential, bind only scopes the sign-in was granted, such as `gmail.modify`, `calendar`, `drive`, `documents` and `presentations` (each under `https://www.googleapis.com/auth/`); any other scope makes Google refuse the refresh with `invalid_scope`.
Ordinary chat carries the signed
identity. Missing setup is an operator error; never request a refresh
token or run `gws auth`.

Write non-secret request JSON to a working file. Replace the script/request
paths and token placeholder below with the actual values from this task. Use a
quoted heredoc delimiter so the shell does not expand token characters:

```bash
python3 /path/to/workspace-write/scripts/workspace_write.py /root/work/request.json <<'DAIMON_GOOGLE_ACCESS_TOKEN'
PASTE_EXACT_GET_CLI_TOKEN_RESULT_HERE
DAIMON_GOOGLE_ACCESS_TOKEN
```

This passes the token to the script's stdin, not its argv. Python standard
library only. Never put request files or credentials in the outputs directory
(`output_dir()` in `scripts/workflow_io.py`).
Read [references/requests.md](references/requests.md) for schemas. There is no
generic command, raw URL or HTTP passthrough.

Respect the requested recipients, resources and changes. Missing targets are an
error; never infer “my” from the shared identity. Sharing, permission changes,
permanent file deletion, Calendar deletion and Drive moves are unsupported.
A clear user request authorizes that scope; do not add an extra approval step.
Do not schedule these writes as unattended routines.

On success report the returned resource ID. An error/timeout can mean a write
applied; inspect the target using available reads before retrying. Never
automatically retry sends, creates or other writes. Failure output is redacted.

Files in this skill

  • SKILL.md2.9 KB
  • references/requests.md2 KB
  • scripts/workflow_io.py6.8 KB
  • scripts/workspace_write.py6 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.