Passer au contenu principal
Field notes

My Claude Code workshop from idea to release

I build Google Workspace tools in Apps Script: automations, web apps, admin tools, some of which act on real accounts. Here is how I put Claude Code to work on them: with my rules, checks it cannot bypass, and eight agents taking turns under my approval.

Why a framework

An AI that writes code fast also writes its mistakes fast. When a tool changes data, sends emails or touches accounts, a mistake cannot always be undone.

Costly mistakes

Some of my tools update user records, revoke access and send emails. I have managed fleets of up to 8,000 accounts: at that scale, one wrong column hits thousands of people.

A memory that fades

From one session to the next, the AI forgets what I learned the hard way. Apps Script’s 6-minute ceiling, dates that Sheets hands back in another form, a constant declared twice that makes the whole project unreachable: every trap comes back unless it is written down.

A decision that stays human

I want the AI to propose, check and document, but nothing irreversible leaves without my explicit approval: no email, no deployment, no code release.

How it is built: three layers

Everything lives in a repository I call the workshop, plugged into Claude Code as a plugin.

01

The rules

A rules file loaded at the start of every session. Each rule was paid for at least once: store dates as yyyy-MM-dd, make every long task resumable, run every irreversible operation in two steps (plan, then apply), request the narrowest OAuth scopes and say what each one allows.

02

The checks

A checker screens the project before anything is sent to Google: syntax, duplicate constants, menu targets, types, displayed version, forbidden patterns, plain-text secrets, test bench. It runs from a Claude Code hook, a Git hook and continuous integration: a rejected project does not ship.

03

The chain

Eight specialised agents, started by a single command, /chaine. Each writes its notes in a work folder and the next agent starts from there. Between two steps, nothing moves without my approval.

The chain, step by step

Between each step there is a gate: I see what was produced and I approve, correct or stop. The orange diamond marks these gates.

DON’T BUILD → alternative 1 · idea Opus 2 · scoping Opus 3 · design Opus 4 · development Sonnet 5 · testing Opus · fresh agent 6 · review Opus · fresh agent 7 · documentation Opus · fresh agent 8 · release Sonnet · 2 stages interface finding, then testing again REJECTED · 3 rounds at most blocking finding, then testing and review
gate: I approve before the next step loop back to development
  1. Step 1 Opus

    Idea

    Should we build at all? The agent looks at what Google, published tools and my own projects already do, compares the possible forms and names what could sink the idea. It may conclude that nothing should be written.

  2. Step 2 Opus

    Scoping

    Who for, what problem, which data and how much, which Google limits. It sets the acceptance criteria the tests will check.

  3. Step 3 Opus

    Design

    Files, tabs and columns, resuming after 6 minutes, plan then apply, OAuth scopes. It reuses my shared base instead of reinventing it.

  4. Step 4 Sonnet

    Development

    It writes the code and its test cases, then fixes what the next steps send back. It releases nothing.

  5. Step 5 Opus

    Testing

    A fresh agent, who did not write the code, tests the tool outside Google on data shaped exactly like the API output. At most three rounds with development.

  6. Step 6 Opus

    Review

    It looks for what the code allows too much: execution identity, injection into HTML pages, overly broad scopes, secrets.

  7. Step 7 Opus

    Documentation

    It discovers the tool as a newcomer would and writes the guide. It checks that every menu and message it quotes exists word for word.

  8. Step 8 Sonnet

    Release

    First a plan: commits, changelog, version number, what will leave the machine. Only then, with my approval, does it release.

Testing, review and documentation go to agents that never saw the developer’s reasoning. Whoever wrote the code shares its blind spots: they test what they meant to do, and document what they already know.

A real case

One work session on a tool that bulk-updates the Google Workspace directory from a Sheets spreadsheet.

A fix that woke up dormant code

A fix finally exposed advanced columns that had never been exported. The code handling them had therefore never run. Before any real use, Claude replayed it end to end outside Google: reading, computing the differences, building the request sent to the directory.

A checker that said no

The project was rejected: no version number, test bench in the wrong place, sixteen type warnings. Each was examined; false positives were frozen and said so, the rest fixed. A fix always comes with the test that would have caught it, and we check that the test fails when the defect is put back.

What the AI left to me

The project’s licence was not the one used by my other tools, by accident. Claude did not change it on its own: it explained what each licence allows and what the change could not erase, then waited for my choice.

What it does not do

Why Claude Code

This framework relies on features Claude Code provides out of the box. I had nothing to work around.

Specialised agents

Each agent has its role, its allowed tools and its own model: Opus to judge, Sonnet to execute.

Hooks

A check fires before anything is sent to Google and after every edited file. It blocks; it does not just warn.

Skills and plugins

The chain, the checks and the release install as one plugin and start with a command.

MCP servers

Claude reads the current Google Workspace documentation instead of quoting a quota from memory.

Build your own

My workshop stays private: it is cut to my own conventions. Everything it relies on, though, is documented by Anthropic, and a first framework fits in a handful of files. Here is where to start, in the order I built it.

  1. 1. Write your rules

    A CLAUDE.md file at the project root, or in ~/.claude for every project. Claude reads it at the start of each session. Only put in what has already cost you once: one rule per mistake paid for.

    CLAUDE.md
    # Règles de mes projets Apps Script
    - Jamais de clasp push direct : d'abord la vérification.
    - Toute date lue dans Sheets passe par normaliserDate_().
    - Toute correction s'accompagne du test qui l'aurait attrapée.
  2. 2. One agent per role

    A Markdown file in .claude/agents/. The header sets its name, when to use it, its model and the tools it may not use; the body describes its job. Here the testing agent cannot edit the code: it can only report.

    .claude/agents/essais.md
    ---
    name: essais
    description: Éprouve l'outil contre ses critères d'acceptation, sans avoir écrit le code.
    model: opus
    disallowedTools: Edit
    ---
    Tu n'as pas écrit ce code. Lance le banc d'essai, confronte chaque
    critère au résultat, et rends ACCEPTÉ ou REFUSÉ avec les défauts.
  3. 3. A check that blocks

    A hook runs your script before each command. The script receives the command, and if it exits with code 2, Claude Code refuses it and shows the message to Claude, which has to fix things. That is the difference between an instruction and a guard.

    .claude/settings.json
    {
      "hooks": {
        "PreToolUse": [{
          "matcher": "Bash",
          "hooks": [{ "type": "command", "command": "node .claude/garde.js" }]
        }]
      }
    }
    
    // .claude/garde.js : le code de sortie 2 refuse la commande
    const { tool_input } = JSON.parse(require('fs').readFileSync(0, 'utf8'));
    if (/clasp (push|deploy)/.test(tool_input.command ?? '')) {
      console.error('Envoi bloqué : lancez d’abord la vérification.');
      process.exit(2);
    }
  4. 4. The chain in one command

    A skill in .claude/skills/chaine/: Claude runs it when you type /chaine. It chains the agents and holds the gates, since agents cannot talk to you directly.

    .claude/skills/chaine/SKILL.md
    ---
    name: chaine
    description: Mène un outil de l'idée à la publication, agent par agent.
    ---
    Lance les agents dans l'ordre : idee, cadrage, conception,
    developpement, essais, relecture, documentation, publication.
    Après chacun, montre-moi son verdict et attends mon accord.
    Si les essais refusent, renvoie les défauts au développement.
  5. 5. Bundle it

    Once the framework works, a plugin makes it reusable: the same agents, skills and hooks in every new project, or for a whole team, without copying files around.

    plugin
    mon-atelier/
    ├── .claude-plugin/plugin.json
    ├── agents/        essais.md, relecture.md…
    ├── skills/        chaine/SKILL.md
    └── hooks/         hooks.json

Start small: rules and a hook are enough to avoid the mistakes you already know. Agents and the chain come when a project calls for them. The exact names and fields are described in the Claude Code documentation.

Try Claude

If you want to try this kind of method, I can offer you a guest pass: one week to discover Claude and Claude Code with the models paying subscribers get. New subscribers only.

Each pass works only once. If it has already been used, ask for a new one through the contact form: I will send it privately.

Disclosure: the “Use my guest pass” button is a referral link. If you subscribe through it, I may receive something in return (usage credit), at no extra cost to you. Terms are set by Anthropic and may change. This page is my own opinion as a user: Anthropic neither commissioned nor reviewed it.

Want to set up a framework like this for your own Google Workspace tools? Let’s talk.

Contact me

Frequently asked questions

Do I need to know how to code to work this way?

To start the chain, no. To approve each gate honestly, you need to be able to read what you approve: a scope document, a list of OAuth scopes, a release plan. The more sensitive the project, the more that reading matters.

Does Claude see my data?

Not in this setup: Claude works on the code, on my machine, and tests it with fictitious data shaped like Google’s. The directory, spreadsheets and emails are never sent to it. The tool then runs inside Google, under the identity of the person who starts it.

Why Claude Code rather than the claude.ai app?

Claude Code works directly in the project files, runs the checks and tests, and supports hooks and agents. The claude.ai app is great for thinking, writing or reviewing a script; for a tooled framework like this one, you need Claude Code.

Can I get your workshop?

No: it is tied to my conventions and tooling, and stays private. The “Build your own” section shows how to set one up; if you would like help for your own Google Workspace projects, contact me.

How much does it cost?

Claude Code requires a paid plan. Plans and their usage limits change regularly: check Anthropic’s pricing page rather than a figure quoted here.

FF

Fabrice Faucheux

Expert Google Workspace & Apps Script, Bretagne

Développeur freelance spécialisé dans l'optimisation des flux de travail professionnels, le développement d'add-ons sur-mesure (Google Sheets, Docs, Gmail) et l'intégration de modèles IA (Gemini).