agentleFS
elzinkoelzinko/google-mcp-multi-account/.claude/skills/gws-multi-account/SKILL.md

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.

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
  1. Very specific:

    Test d'intégration guidé : tests/manuels/drive-cross-compte/ (perso ↔ mw).

    line 39

≈ “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.

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

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

  1. Tool MCP profiles_list — ou mag list — voir les profils.
  2. Choisir l'alias ; si verrouillé → access_request kind=unlock (humain).
  3. Données : tools gmail_* / drive_*. Shell de secours : mag <alias> <service> … (jamais gws nu).

Écrire sur Drive : élicitation obligatoire

Par défaut, aucune zone d'écriture Drive. Avant d'écrire :

  1. Vérifier grants / policy ; si refus → tool access_request kind=grant.
  2. Attendre que l'utilisateur exécute mag grant … (ou admin).
  3. Les grants expirent : redemander à chaque session est NORMAL.

Copie / partage cross-compte

Pas de « move » natif entre comptes Google. Workflow MCP :

  1. Recopie (recommandé) : drive_get sur A (métadonnées) puis drive_create sur B dans sa zone ZZ-TESTS avec le même content (texte/markdown).
  2. Partage : drive_permissions_create sur A (email = compte B, role = reader|writer) — nécessite drive.share: true dans la policy (l'humain active via admin ou mag policy).
  3. Transfert de propriété : indisponible dans cette version — drive_permissions_create refuse transfer_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

  • gws nu ou GOOGLE_WORKSPACE_CLI_CONFIG_DIR=… = contourne policy/verrou : interdit.
  • Toujours s'identifier : MCP le fait (GWSA_CLIENT=mcp) ; en shell GWSA_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.

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.