gws-multi-account
Skill0 starsChanged 3 months agoMITView on GitHub
Piloter plusieurs comptes Google (Gmail, Drive, Calendar, Docs, Sheets, Tasks) via le wrapper mag. Utiliser dès qu'une tâche vise un compte Google précis ou plusieurs comptes : lire/envoyer des mails, gérer des fichiers Drive, consulter des agendas.
In this repository21 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- gws-calendar-agendaSkill
- gws-calendar-insertSkill
- gws-calendarSkill
- gws-docsSkill
- gws-docs-writeSkill
- gws-driveSkill
- gws-drive-uploadSkill
- gws-gmail-forwardSkill
- gws-gmail-readSkill
- gws-gmail-reply-allSkill
- gws-gmail-replySkill
- gws-gmail-sendSkill
- gws-gmailSkill
- gws-gmail-triageSkill
- gws-peopleSkill
- gws-sharedSkill
- gws-sheets-appendSkill
- gws-sheets-readSkill
- gws-sheetsSkill
- gws-tasksSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
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
- Very specific: line 39
Test d'intégration guidé : tests/manuels/drive-cross-compte/ (perso ↔ mw).
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Multi-comptes Google avec mag / MCP
Chaque compte Google est un profil nommé (alias). Le serveur MCP
(bin/google-mcp → gateway/) est le chemin recommandé pour Gmail/Drive.
Le wrapper mag reste pour l'admin et les skills shell.
Workflow
- Tool MCP
profiles_list— oumag list— voir les profils. - Choisir l'alias ; si verrouillé →
access_requestkind=unlock (humain). - Données : tools
gmail_*/drive_*. Shell de secours :mag <alias> <service> …(jamaisgwsnu).
Écrire sur Drive : élicitation obligatoire
Par défaut, aucune zone d'écriture Drive. Avant d'écrire :
- Vérifier grants / policy ; si refus → tool
access_requestkind=grant. - Attendre que l'utilisateur exécute
mag grant …(ou admin). - Les grants expirent : redemander à chaque session est NORMAL.
Copie / partage cross-compte
Pas de « move » natif entre comptes Google. Workflow MCP :
- Recopie (recommandé) :
drive_getsur A (métadonnées) puisdrive_createsur B dans sa zoneZZ-TESTSavec le mêmecontent(texte/markdown). - Partage :
drive_permissions_createsur A (email= compte B,role= reader|writer) — nécessitedrive.share: truedans la policy (l'humain active via admin oumag policy). - Transfert de propriété : indisponible dans cette version —
drive_permissions_createrefusetransfer_ownership(fonction déplacée dans une PR dédiée, non prête).
Test d'intégration guidé : tests/manuels/drive-cross-compte/ (perso ↔ mw).
Binaire ou export d'un Doc existant : shell mag <alias> drive files export …
puis upload sur B (files create --upload ou drive_create si texte).
Pièges
gwsnu ouGOOGLE_WORKSPACE_CLI_CONFIG_DIR=…= contourne policy/verrou : interdit.- Toujours s'identifier : MCP le fait (
GWSA_CLIENT=mcp) ; en shellGWSA_CLIENT=claude-code. - Exit code 2 = token expiré →
mag add <alias>. - Profil verrouillé = demander unlock humain — jamais contourner.
- Pas d'envoi mail via MCP (brouillons seulement).
- Doc :
docs/mcp-setup.md,docs/threat-model.md.
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
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.

