@opendatahub-io/gmail-draft
AUse this skill to compose a Gmail draft from text content in the conversation. Accepts a body, recipient list, and subject — either from the user or from context — and creates a draft in the user's Gmail Drafts folder via gws.
Install
agr install @opendatahub-io/gmail-draft --target claudeWrites 1 file into .claude/skills/, pinned to git-72929dbf.
- .claude/skills/gmail-draft/SKILL.md
Document
name: gmail-draft description: >- Use this skill to compose a Gmail draft from text content in the conversation. Accepts a body, recipient list, and subject — either from the user or from context — and creates a draft in the user's Gmail Drafts folder via gws. argument-hint: "[subject]" allowed-tools: Bash, AskUserQuestion user-invocable: true metadata: author: dhellman version: "1.0" tags: gmail, email, draft, google-workspace
Gmail Draft
Compose a Gmail draft from text content provided in the conversation.
Prerequisites
gwsbinary must be on$PATH- Authenticated with Gmail compose scope: run
gws auth login(not--readonly)
If gws is not installed or authentication fails, tell the user to follow the
setup instructions in the google-workspace skill.
Helper scripts are located in ${CLAUDE_SKILL_DIR} and require Python 3.10+.
Step 1: Gather Recipients, Subject, and Body
Collect the three required inputs. Sources depend on how the skill was invoked:
- From another skill (e.g.
email-meeting-summary): recipients, subject, and body are passed in context — use them directly. - Standalone invocation: use
AskUserQuestionto collect any that are missing:- Recipients: "Who should receive this email? (comma-separated addresses)"
- Subject: "What should the subject line be?"
- Body: "Paste or describe the content you want in the email body."
Step 2: Present for Review
Show the user the draft details before creating:
To: <recipients>
Subject: <subject>
<body>
Ask:
"Does this look right? Reply with any edits, or say 'send' to create the draft."
Incorporate edits and re-present until the user approves.
Step 3: Create the Draft
Write the body to a temp file, then call create_draft.py:
BODY_FILE=$(mktemp /tmp/gmail_draft_body.XXXXXX)
cat > "$BODY_FILE" << 'BODY_EOF'
<approved body text>
BODY_EOF
python3 "${CLAUDE_SKILL_DIR}/scripts/create_draft.py" \
--to "<recipients>" \
--subject "<subject>" \
--body-file "$BODY_FILE"
Step 4: Confirm
On success, tell the user:
"Draft created. You can find it in the Drafts folder in Gmail at https://mail.google.com/mail/#drafts. Review it before sending."
If the script exits with an error, show the error message and suggest the user
check gws auth login permissions (the Gmail scope must include draft
creation).
Error Reference
| Situation | Action |
|---|---|
gws not found | Tell user to install gws and add it to PATH |
| Auth error (401/403) | Tell user to run gws auth login (without --readonly) |
create_draft.py fails | Show error; check Gmail scope in gws auth login |
Trustgrade A
- passBody integrity
Whether the stored document is plausibly the kind of file the artifact declares, rather than something fetched by mistake.
- passType matchnot applicable to this artifact type
Whether the artifact is really the kind of thing its metadata claims it is.
- passFreshness
How long since the source repository was last pushed to.
- passPrompt injection
Scans the artifact's own text for instructions aimed at your agent rather than at you.
- passLicense
Whether the source repository declares an SPDX license permissive enough to redistribute.
How the grade is calculated
Each check contributes 0 points when it passes, 1 when it warns, and 2 when it fails. The total maps to a letter:
- Aevery check passed
- Bone warning
- Ctwo warnings
- Dprompt injection or body integrity failed, or three warnings
- Fone of those failed, and something else is wrong
These are automated hygiene checks, not a security audit, and not a dependency or vulnerability scan. A grade of A means nothing was flagged — not that the artifact is safe.
Versions
git-72929dbfe1922026-07-31