CLAUDE.md
Project root. Cursor users: save as AGENTS.md.
Part of Chrome Extension: Summarise Any Page with Claude by Admin
Project rules: page summarizer extension
What we are building
A Chrome extension (Manifest V3). Click the toolbar icon and a popup shows a short summary of the current page, written by Claude. The user brings their own Anthropic API key, stored only in chrome.storage.local.
Stack
- Plain TypeScript or JavaScript, no framework. Vite is fine for bundling.
- Manifest V3: popup, a service worker (background), chrome.scripting to read the page text.
Rules
- Permissions: only "activeTab", "scripting" and "storage". No host permissions for all sites.
- The API key never leaves the extension except in the request to api.anthropic.com. Never log it.
- Calls to the Anthropic API happen in the service worker, not in the page.
- Send at most ~12,000 characters of page text. Strip scripts, styles, nav and footer first.
- Show clear states: no key yet, loading, error with a readable message, summary.
Source, 16 lines
# Project rules: page summarizer extension ## What we are building A Chrome extension (Manifest V3). Click the toolbar icon and a popup shows a short summary of the current page, written by Claude. The user brings their own Anthropic API key, stored only in chrome.storage.local. ## Stack - Plain TypeScript or JavaScript, no framework. Vite is fine for bundling. - Manifest V3: popup, a service worker (background), chrome.scripting to read the page text. ## Rules - Permissions: only "activeTab", "scripting" and "storage". No host permissions for all sites. - The API key never leaves the extension except in the request to api.anthropic.com. Never log it. - Calls to the Anthropic API happen in the service worker, not in the page. - Send at most ~12,000 characters of page text. Strip scripts, styles, nav and footer first. - Show clear states: no key yet, loading, error with a readable message, summary.