granola: Instructions file for Claude Code

CLAUDE.md

granola CLAUDE.md is an instructions file for Claude Code from theantichris/granola. It costs 2,247 tokens per session, scanned C, original, MIT.

Repository instructions for Granola CLI, a Go command-line tool that exports notes from the Granola meeting app and transcripts from its local cache. Notes come from the Granola API, while transcripts include timestamps and speaker information.

In plain words
What is it for?
Use them when changing or testing note and transcript exports, building the CLI, managing Go modules, or preparing a tagged release.
Why use it?
They show how the two export paths work and provide the commands for building, running, testing, managing dependencies, and releasing the tool.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md; mentions Claude Code.

This is theantichris/granola's own configuration. It tells Claude Code how to work on granola itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything granola configures →

Reuse

Borrowing it

Nothing to install: this file belongs to theantichris/granola. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/theantichris/granola/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/theantichris/granola

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for granola CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/theantichris/granola/claude-md.svg)](https://agentmods.dev/instructions/theantichris/granola/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/theantichris/granola/claude-md"><img src="https://agentmods.dev/badge/instructions/theantichris/granola/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 2,247 This file is loaded in full into every session.
When invoked 2,247 The same file — it is already loaded in full.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.02247 $0.02247
Opus 5 $0.01123 $0.01123
Sonnet 5 $0.00449 $0.00449
Haiku 4.5 $0.00225 $0.00225

Measured 7d ago against content hash 31f84c2ba7d2, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade C, and why

granola CLAUDE.md scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Harvests environment variableshighData exfiltration

Enumerating or grepping the environment for keys collects credentials unrelated to what the mod says it does.

2. Extract access token from WorkOS tokens in supabase.json
CLAUDE.md · 227 lines

How it starts

The opening of the file, as written. The whole thing — 227 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project Overview

Granola CLI is a command-line tool for exporting notes and transcripts from the Granola note-taking application. It provides two distinct export capabilities:

  1. Notes Export: Connects to the Granola API, authenticates using bearer tokens, fetches AI-generated notes in JSON format, and converts them to clean Markdown files
  2. Transcripts Export: Reads the local Granola cache file, extracts raw meeting transcripts with timestamps and speaker identification, and exports them to plain text files

Common Commands

Build

go build

Run

# Export notes (AI-generated from API)
go run main.go notes
# Or after building:
./granola notes

# Export transcripts (raw from cache file)
go run main.go transcripts
# Or after building:
./granola transcripts

Test

go test ./...
go test -v ./...  # verbose output

Module Management

go mod tidy       # clean up dependencies
go mod download   # download dependencies

Releases

# Create a new release (automated via GitHub Actions)
git tag v0.1.0
git push origin v0.1.0

# Test release locally (requires GoReleaser)
goreleaser release --snapshot --clean

# Check GoReleaser configuration
goreleaser check

Linting

# Markdown linting (runs in GitHub Actions, installed via brew)
markdownlint-cli2 "**/*.md" "#notes" "#transcripts"

# Go linting (if golangci-lint is installed)
golangci-lint run

Architecture

The project follows a modular Go CLI application structure:

  • Entry Point: main.go - Uses Charmbracelet's fang for execution context
  • Command Structure: cmd/ directory contains Cobra command definitions
    • cmd/root.go - Defines the root command with configuration initialization using constructor pattern
    • cmd/notes.go - Implements the notes command for fetching and converting AI-generated notes from API
    • cmd/transcripts.go - Implements the transcripts command for reading and exporting raw transcripts from cache
  • Internal Packages:
    • internal/api/ - Granola API client with Supabase token authentication and document models (including ProseMirror structures)
    • internal/cache/ - Cache file reader for extracting transcript data from local Granola cache
    • internal/converter/ - Document to Markdown conversion with YAML frontmatter
    • internal/prosemirror/ - ProseMirror JSON to Markdown conversion and plain text extraction
    • internal/transcript/ - Transcript formatter for converting segments to readable text with timestamps
    • internal/writer/ - File system writer for Markdown files with sanitization
  • Configuration: Supports multiple configuration sources:
    • Environment variables via .env file (using godotenv)
    • Config file (.granola.toml in home directory or current directory)
    • Command-line flags:
      • Global: --debug, --config
      • Notes command: --supabase, --timeout, --output
      • Transcripts command: --cache, --output
    • Environment variable mapping: SUPABASE_FILE, DEBUG_MODE
  • Logging: Uses Charmbracelet's log package for structured logging
    • Debug mode can be enabled via --debug flag or config
    • Logger includes timestamp and caller information
    • Log levels: Debug, Info, Warn, Error (defaults to Warn, Debug with debug flag)
    • Logger is created in Execute() and injected via dependency injection
    • Logging Best Practices:
      • Log errors only at the command level (cmd package) where they are handled
      • Internal packages should return errors without logging to avoid duplicates
      • Commands return errors to Cobra rather than logging them (Cobra handles display)
      • Debug/Info logging can occur at any level for progress tracking

Read the full file on GitHub · 227 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 227 lines · 2,247 tokens per session scan C 31f84c2ba7d2

Subscribe to this mod's changes

granola CLAUDE.md is an instructions file published in the GitHub repository theantichris/granola (43 stars, last pushed 11mo ago), licensed MIT. It adds 2,247 tokens to every session, about $0.0112 per session on Opus 5. A static security scan graded it C with 1 finding (harvests environment variables). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,182 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens