Free SKILL.md scraped from GitHub. Clone the repo or copy the file directly into your Claude Code skills directory.
npx versuz@latest install vivekkarmarkar-claude-code-os-skills-upload-and-sharegit clone https://github.com/VivekKarmarkar/claude-code-os.gitcp claude-code-os/SKILL.MD ~/.claude/skills/vivekkarmarkar-claude-code-os-skills-upload-and-share/SKILL.md---
name: upload-and-share
description: Upload a file to Google Drive AND share it with someone in one command. Chains the upload and share skills. Use when the user says "upload and share", "upload this and send it to", "put on Drive and share with", "upload and give access to", or any variation of wanting to both upload a file and share it with an email address. Also triggers on "/upload-and-share". Takes an email address as argument — e.g. "/upload-and-share adi@example.com".
---
# Upload and Share — Google Drive Upload + Share in One Step
Upload a local file to Google Drive and immediately share it with a specified email address. This chains the `/upload` and `/share` skills into a single zero-friction command.
## Arguments
The skill takes an email address (and optionally a file/folder reference):
- `/upload-and-share adi@example.com` — upload the contextually obvious file, share with adi
- `/upload-and-share adi@example.com report.pdf` — upload report.pdf, share with adi
- `/upload-and-share adi@example.com, bob@example.com` — upload and share with multiple people
- `/upload-and-share adi@example.com writer` — upload and share with edit access
## Workflow
### Step 1: Upload (delegates to /upload skill logic)
Identify the file from context or arguments, determine destination folder on Drive:
```bash
# Upload to root Drive (or specified folder)
gws drive files create --json '{"name": "filename.pdf", "parents": ["<folder-id>"]}' --upload "/absolute/path/to/local/file.pdf"
```
Capture the **file ID** from the response — you need it for sharing.
### Step 2: Share (delegates to /share skill logic)
Using the file ID from Step 1, share with the specified email:
```bash
# Default: reader access
gws drive permissions create --params '{"fileId": "<file-id>"}' --json '{"role": "reader", "type": "user", "emailAddress": "<email>"}'
```
If the user said "writer", "edit access", or "let them edit":
```bash
gws drive permissions create --params '{"fileId": "<file-id>"}' --json '{"role": "writer", "type": "user", "emailAddress": "<email>"}'
```
For multiple recipients, run the permissions create command for each email.
### Step 3: Get shareable link
```bash
gws drive files get --params '{"fileId": "<file-id>", "fields": "webViewLink, name"}'
```
### Step 4: Report
Brief confirmation combining both operations:
```
Uploaded "report.pdf" to Drive > Reports
Shared with adi@example.com (view access)
Link: https://drive.google.com/file/d/...
```
### Step 5 (Optional): Email the link
If the user said "upload, share, and email the link" or context suggests they want the recipient notified:
Chain with the `/email` skill — compose a short email to the recipient with the Drive link:
```bash
RAW=$(python3 ~/.claude/skills/email/scripts/encode_email.py \
--from "vivekkmk.assistant@gmail.com" \
--to "<recipient-email>" \
--subject "Shared: <filename>" \
--body "Hey,
I've shared <filename> with you on Google Drive.
Link: <webViewLink>
Cheers,
Vivek") && \
gws gmail users messages send --params '{"userId": "me"}' --json "{\"raw\": \"$RAW\"}"
```
Only do this if the user explicitly asks to notify the recipient. Don't email by default — the Drive sharing notification from Google may be sufficient.
## Access Level Defaults
| User says | Role |
|-----------|------|
| (nothing specified) | reader |
| "view", "read only", "view access" | reader |
| "edit", "writer", "write access", "full access", "let them edit" | writer |
| "comment", "commenter" | commenter |
## Error Handling
- **Upload fails**: Report the error, don't attempt to share
- **Share fails**: Report that upload succeeded but sharing failed, provide the file ID so the user can retry
- **File not found locally**: Ask which file to upload
- **Auth expired**: "Google Drive auth is expired. Run `! gws auth login` to re-authenticate."
## Common Patterns
- **"Upload the PDF and share with my advisor"** → upload PDF, share with advisor's email from context/memory
- **"Put this on Drive and let the team edit it"** → upload, share as writer with team emails
- **"Upload, share with adi, and email him the link"** → upload + share + email chain