HomeAIAI AgentsQuick Guide: Build a Claude Code Second Brain With Google and Notes

Quick Guide: Build a Claude Code Second Brain With Google and Notes

Updated 18 November 2026: Graphify’s current README requires Python 3.11 or later, not 3.10 as this guide first said; the step below has been corrected. A note on Google’s scope limit has also been added.

An X user has shared a recipe for turning Claude Code into what they call a “second brain”: an assistant that keeps long-term notes, can read your Google mail, calendar and files, links your notes into a knowledge graph, and can browse the web. This is one person’s do-it-yourself setup built from existing tools. It is not a new Anthropic product or feature.

The author, @Bober_smart, lists seven steps and says “the whole setup process takes around 20 minutes.” That timing is the author’s claim. (Via @Bober_smart on X.)

Video walkthrough: wiring Claude Code into a second brain

What the setup combines

  • Claude Code, Anthropic‘s coding agent, which runs in a folder on your computer. Its documentation says: “CLAUDE.md files are markdown files that give Claude persistent instructions for a project… Claude reads them at the start of every session.” Claude Code also has its own built-in auto memory.
  • Google Workspace CLI (gws), a command-line tool for Gmail, Calendar and Drive. It sits in the googleworkspace organisation on GitHub, but its README states: “This is not an officially supported Google product.”
  • Graphify, a third-party open-source tool. Its repository describes it as a way to “Turn any codebase, with its docs, SQL schemas, configs, and PDFs, into a queryable knowledge graph. A /graphify skill for Claude Code, Cursor, Codex, and Gemini CLI”. It is aimed mainly at code; using it on personal notes is the author’s adaptation.
  • Playwright MCP, Microsoft‘s tool that lets an AI agent control a web browser.
  • Skills, Claude Code’s way of saving a routine. The docs say: “Create a SKILL.md file with instructions, and Claude adds it to its toolkit,” and you can run one “directly with /skill-name.”

How to set it up

1. Install Claude Code and make the folder. On macOS or Linux, Anthropic‘s install command is:

curl -fsSL https://claude.ai/install.sh | bash

Create a project folder (the author calls it SECOND BRAIN) with a subfolder named MEMORY. In the main folder, add a CLAUDE.md file with a rule such as “Save key facts from our sessions as notes in MEMORY/”. Then start Claude Code in that folder.

2. Connect Google, with as little access as possible. Install the CLI (it needs Node.js 18 or later):

npm install -g @googleworkspace/cli

On a Mac you can use brew install googleworkspace-cli instead. You also need a Google Cloud project for sign-in. If you have Google’s gcloud tool, run gws auth setup, then gws auth login. The README warns that its “recommended” preset “includes 85+ scopes”, while Google limits consent to about 25, so pick only what you need, for example:

gws auth login --scopes drive,gmail,calendar

3. Add Graphify and a browser. Graphify needs Python 3.11 or later. Install it with uv tool install graphifyy (or pipx install graphifyy; note the double “y”), then run graphify install. To keep it inside this one folder, use graphify install --project. In Claude Code, type /graphify . to build a graph; results go in a graphify-out/ folder. For browsing, add Playwright MCP:

claude mcp add playwright npx @playwright/mcp@latest

4. Wrap your routine in a skill. Create .claude/skills/<name>/SKILL.md describing what you want done, such as checking today’s calendar, scanning email and updating notes. Run it with /name.

Things to know before you start

  • You are giving an AI agent your email, calendar and files. Grant the least access it needs: limited scopes, ideally a test account first. Read each command before you approve it.
  • Browsing exposes the agent to prompt injection. Web pages and emails can hide instructions aimed at AI. Don’t let the agent act on your mail or Drive while it is browsing untrusted sites, and keep Claude Code’s permission prompts switched on.
  • Check third-party installers before running them. gws is not an officially supported Google product, and Graphify is third-party. Graphify’s installer adds skill files and hooks to Claude Code, so review what it changes.
  • Your notes are not private from the model. The MEMORY files are plain files on your computer, but anything Claude reads from them is sent to the model provider.

Why a Claude Code second brain needs tight permissions

The recipe works because each piece is ordinary. A folder of markdown notes, a CLAUDE.md file and a saved skill are enough to give Claude Code a memory that carries across sessions, and the Google and browser tools give it something to remember. Nothing here needs a new product from Anthropic, which is why it can be assembled in an afternoon. It also shows where personal AI assistants are heading: away from a single chat window and towards an agent that sits on top of your own files and accounts.

That is also where the risk lies. The setup joins three things security researchers treat carefully when they appear together: access to private data (mail, calendar and Drive), exposure to untrusted content (web pages and incoming email) and the ability to act (running commands, sending requests through the browser). An instruction hidden in an email or web page could, in principle, ask the agent to copy notes or files somewhere else. Claude Code’s permission prompts are the main brake, which is why switching them off for convenience is a bad trade. Flaws in the tools themselves matter too, as Noma Labs showed with the now-fixed SneakPeek bug in Claude Code Desktop’s preview pane.

The practical answer is to separate jobs. Use one skill that reads calendar and mail with read-only scopes, and keep browsing in a session that has no access to Google at all. Claude Code’s hooks can block risky actions automatically, a feature covered in TSN’s report on fail-closed hooks. Other agent platforms face the same design question about connectors and personal data, as TSN’s guide to Grok agents, tools and connectors sets out. The 20-minute setup time is the author’s estimate, and it does not include creating a Google Cloud project or reviewing what each installer changes.

Sources

  1. @Bober_smart, post on X, 14 October 2026
  2. Anthropic, Claude Code docs: Set up Claude Code
  3. Anthropic, Claude Code docs: Memory (CLAUDE.md)
  4. Anthropic, Claude Code docs: Skills
  5. Google Workspace CLI, README
  6. Graphify, README
  7. Microsoft, Playwright MCP, README

Related stories

Follow @tsnmediahub on X for breaking AI news as it happens.

Follow on X

Share this story

Latest stories

  1. TALhesin Cuts Chromosome Errors in Aged Mouse Eggs
    AI Science & Health

More in this category

Latest stories

  1. TALhesin Cuts Chromosome Errors in Aged Mouse Eggs
    AI Science & Health

Explore the TSN Atlas: Every topic we cover, mapped. Click a bubble to dive in.