Skills for Claude Code CLI such as full stack dev Cloudflare, React, Tailwind v4, and AI integrations.
Python aianthropicautomationclaude-codeclaude-skillscloudflaredevtoolsproductivityreactskillstailwindvite
feat: add project-kickoff and gemini-guide skills
Jeremy Dawes8090fbb672d0
diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.jsonindex d5ad98e1..400ae344 100644--- a/.claude-plugin/marketplace.json+++ b/.claude-plugin/marketplace.json@@ -39,7 +39,7 @@},{"name": "dev-tools",- "description": "Skill creation, project context management, dev sessions, GitHub releases, Gemini peer review, capabilities reference, and UX audits.",+ "description": "Skill creation, project kickoff and permission management, project context, dev sessions, GitHub releases, Gemini peer review and API guide, capabilities reference, and UX audits.","source": "./plugins/dev-tools","category": "development"},diff --git a/CLAUDE.md b/CLAUDE.mdindex ddcc2b39..a244bdf1 100644--- a/CLAUDE.md+++ b/CLAUDE.md@@ -45,10 +45,12 @@ claude-skills/│ ├── dev-tools/ # Skill creation, context, sessions, releases│ │ └── skills/│ │ ├── skill-creator/+│ │ ├── project-kickoff/│ │ ├── context-manager/│ │ ├── dev-session/│ │ ├── github-release/│ │ ├── gemini-peer-review/+│ │ ├── gemini-guide/│ │ ├── claude-capabilities/│ │ └── ux-audit/│ ├── shopify/ # Shopify store managementdiff --git a/README.md b/README.mdindex 8cc6c869..85c15d77 100644--- a/README.md+++ b/README.md@@ -13,7 +13,7 @@ Workflow skills for [Claude Code](https://claude.com/claude-code) that produce t| **frontend** | tailwind-theme-builder, shadcn-ui | Themed Tailwind v4 + shadcn/ui setup with dark mode || **design-assets** | color-palette, favicon-gen, icon-set-generator | Colour palettes, favicon packages, custom SVG icon sets || **integrations** | google-chat-messages, google-apps-script, elevenlabs-agents, mcp-builder | Google Chat webhooks, Apps Script, ElevenLabs agents, MCP servers |-| **dev-tools** | skill-creator, context-manager, dev-session, github-release, gemini-peer-review, claude-capabilities, ux-audit | Skill creation, context audits, session tracking, releases, peer review, UX audits |+| **dev-tools** | skill-creator, project-kickoff, context-manager, dev-session, github-release, gemini-peer-review, gemini-guide, claude-capabilities, ux-audit | Skill creation, project bootstrapping, context audits, session tracking, releases, Gemini peer review and API guide, UX audits || **shopify** | shopify-setup, shopify-products, shopify-content | Shopify API setup, product management, content pages, blog posts || **wordpress** | wordpress-setup, wordpress-content, wordpress-elementor | WordPress WP-CLI access, content management, Elementor page editing || **writing** | aussie-business-english | Australian business English writing style |diff --git a/plugins/dev-tools/.claude-plugin/plugin.json b/plugins/dev-tools/.claude-plugin/plugin.jsonindex 89f34f8b..b3a4f456 100644--- a/plugins/dev-tools/.claude-plugin/plugin.json+++ b/plugins/dev-tools/.claude-plugin/plugin.json@@ -1,6 +1,6 @@{"name": "dev-tools",- "description": "Skill creation, project context management, dev sessions, GitHub releases, Gemini peer review, capabilities reference, and UX audits.",+ "description": "Skill creation, project kickoff and permission management, project context, dev sessions, GitHub releases, Gemini peer review and API guide, capabilities reference, and UX audits.","author": {"name": "Jeremy Dawes / Jezweb","email": "[email protected]"diff --git a/plugins/dev-tools/skills/gemini-guide/SKILL.md b/plugins/dev-tools/skills/gemini-guide/SKILL.mdnew file mode 100644index 00000000..0287df0a--- /dev/null+++ b/plugins/dev-tools/skills/gemini-guide/SKILL.md@@ -0,0 +1,118 @@+---+name: gemini-guide+description: "Look up Gemini API documentation, SDK patterns, and current best practices when building with Google Gemini. Maps topics to local cached docs and live sources, provides correct @google/genai patterns, and highlights deprecated vs current API usage. Trigger with 'gemini docs', 'gemini guide', 'how to use gemini', 'gemini SDK', '@google/genai', or when building code that imports from @google/genai or google-genai."+compatibility: claude-code-only+---++# Gemini Guide++Look up Gemini API documentation and SDK patterns when building with Google Gemini. This skill brings Gemini docs TO Claude — it does not call Gemini.++| Skill | Direction | Tool |+|-------|-----------|------|+| **gemini-guide** (this) | Gemini docs -> Claude | Local docs, WebFetch |+| gemini-peer-review | Code -> Gemini | gemini-coach CLI |++## Documentation Sources++Check in this priority order:++| Priority | Source | Best For |+|----------|--------|----------|+| 1 | Local cached docs (`~/Documents/google-gemini-context/`) | Most topics — 24 JS, 24 Python, 7 common topics |+| 2 | GitHub codegen_instructions | Always-current SDK patterns — fetch `https://raw.githubusercontent.com/googleapis/js-genai/refs/heads/main/codegen_instructions.md` |+| 3 | Google AI docs via WebFetch | When local docs don't cover it — `https://ai.google.dev/gemini-api/docs/{topic}` |++## Lookup Workflow++When the user asks about a Gemini topic:++1. **Check corrections first**: Read [references/deprecated-patterns.md](references/deprecated-patterns.md) — know what NOT to suggest before writing any code+2. **Map the query to a topic**: Read [references/topic-index.md](references/topic-index.md) to find the right local doc file+3. **Read the local doc**: The file path will be `~/Documents/google-gemini-context/{path from topic index}`+4. **If local doc seems stale**: Fetch the GitHub codegen_instructions.md for latest SDK patterns+5. **Synthesise**: Combine the documentation into a clear answer with working code examples. Always use the CORRECT patterns from step 1.++## Quick Corrections++These are the most common mistakes. Apply these even without reading the full references:++| Claude Might Suggest | Correct |+|---------------------|---------|+| `@google/generative-ai` | `@google/genai` |+| `google-generativeai` (Python) | `google-genai` |+| `GoogleGenerativeAI` | `GoogleGenAI` |+| `genAI.getGenerativeModel()` | `ai.models.generateContent()` |+| `model.startChat()` / `chat.sendMessage()` | `ai.chats.create()` / `chat.send()` |+| `generationConfig` | `config` |+| `stream=True` (method param) | `config={"stream": True}` |+| `gemini-pro` | `gemini-2.5-flash` |+| `gemini-pro-vision` | `gemini-2.5-flash` (unified multimodal) |+| 4 safety categories | 5 categories (include `HARM_CATEGORY_CIVIC_INTEGRITY`) |+| `HARM_CATEGORY_DANGEROUS_CONTENT` | `HARM_CATEGORY_DANGEROUS` (no `_CONTENT`) |+| `X-Goog-Api-Key` (capitalised) | `x-goog-api-key` (lowercase) |+| Daily rate limits | No daily limits — only per-minute (RPM, TPM) |++### Correct Initialisation (JS)++```javascript+import { GoogleGenAI } from "@google/genai";+const ai = new GoogleGenAI({}); // auto-reads GEMINI_API_KEY env var+const response = await ai.models.generateContent({+ model: "gemini-2.5-flash",+ contents: "Your prompt"+});+```++### Correct Initialisation (Python)++```python+from google import genai+client = genai.Client() # auto-reads GEMINI_API_KEY env var+response = client.models.generate_content(+ model="gemini-2.5-flash",+ contents="Your prompt"+)+```++## Local Docs Structure++All at `~/Documents/google-gemini-context/`:++| Directory | Contents |+|-----------|----------|+| `javascript/` | 24 topic files — quickstart, function-calling, streaming, structured-output, etc. |+| `python/` | 24 topic files — same topics as JavaScript |+| `common/` | 7 cross-language files — safety, pricing, rate-limits, errors, auth, regions, openai-compat |+| `rest-api/` | REST endpoint docs |+| `MODELS.md` | Current model IDs, capabilities, token limits, rate limits |+| `CLAUDE.md` | Full correction reference (source for deprecated-patterns.md) |+| `googlegenai-gemini-api.md` | Comprehensive SDK guide (608 lines, JS + Python) |+| `INDEX.md` | Keyword index mapping topics to files |++## Current Models++| Model | ID | Best For |+|-------|-----|----------|+| Gemini 2.5 Pro | `gemini-2.5-pro` | Complex reasoning, advanced coding |+| Gemini 2.5 Flash | `gemini-2.5-flash` | Most tasks (recommended default) |+| Gemini 2.5 Flash-Lite | `gemini-2.5-flash-lite-preview-06-17` | Budget, low latency |+| Gemini 2.0 Flash | `gemini-2.0-flash` | Fast inference |+| Text Embedding | `text-embedding-004` | Semantic search, RAG (768 dims) |++For full model details including token limits and rate limits, read `~/Documents/google-gemini-context/MODELS.md`.++## Maintenance++The local docs at `~/Documents/google-gemini-context/` were curated in January 2025. When information seems wrong or outdated:++1. Check the GitHub codegen_instructions.md (always current)+2. Verify model IDs against `https://ai.google.dev/gemini-api/docs/models`+3. Flag stale docs to the user++## Reference Files++| When | Read |+|------|------|+| Mapping a query to a documentation file | [references/topic-index.md](references/topic-index.md) |+| Checking for deprecated patterns before writing code | [references/deprecated-patterns.md](references/deprecated-patterns.md) |diff --git a/plugins/dev-tools/skills/gemini-guide/references/deprecated-patterns.md b/plugins/dev-tools/skills/gemini-guide/references/deprecated-patterns.mdnew file mode 100644index 00000000..9ff366f2--- /dev/null+++ b/plugins/dev-tools/skills/gemini-guide/references/deprecated-patterns.md@@ -0,0 +1,152 @@+# Deprecated Patterns++Common mistakes Claude makes when generating Gemini API code. Check this BEFORE writing any Gemini code.++Source: curated from `~/Documents/google-gemini-context/CLAUDE.md`++---++## Package Names++| Language | Wrong (old) | Correct (current) |+|----------|-------------|-------------------|+| JavaScript | `@google/generative-ai` | `@google/genai` |+| Python | `google-generativeai` or `google.generativeai` | `google-genai` |++## Imports++### JavaScript+```javascript+// WRONG+import { GoogleGenerativeAI } from "@google/generative-ai";++// CORRECT+import { GoogleGenAI } from "@google/genai";+```++### Python+```python+# WRONG+import google.generativeai as genai+genai.configure(api_key=os.environ["GEMINI_API_KEY"])++# CORRECT+from google import genai+client = genai.Client() # auto-reads GEMINI_API_KEY+```++## Initialisation++### JavaScript+```javascript+// WRONG - old pattern+const genAI = new GoogleGenerativeAI(process.env.GEMINI_API_KEY);+const model = genAI.getGenerativeModel({ model: "gemini-pro" });+const result = await model.generateContent("prompt");++// CORRECT - new pattern+const ai = new GoogleGenAI({}); // auto-reads GEMINI_API_KEY+const response = await ai.models.generateContent({+ model: "gemini-2.5-flash",+ contents: "prompt"+});+```++### Python+```python+# WRONG - old pattern+genai.configure(api_key=os.environ["GEMINI_API_KEY"])+model = genai.GenerativeModel("gemini-pro")+response = model.generate_content("prompt")++# CORRECT - new pattern+client = genai.Client() # auto-reads GEMINI_API_KEY+response = client.models.generate_content(+ model="gemini-2.5-flash",+ contents="prompt"+)+```++## Model IDs++| Wrong (deprecated) | Correct (current) |+|--------------------|-------------------|+| `gemini-pro` | `gemini-2.5-flash` |+| `gemini-pro-vision` | `gemini-2.5-flash` (unified multimodal) |+| `gemini-2.0-flash-exp` | `gemini-2.0-flash` |+| `gemini-1.5-pro-002` | `gemini-2.5-pro` |++Default recommendation: `gemini-2.5-flash` for most tasks, `gemini-2.5-pro` for complex reasoning.++## Chat API++### JavaScript+```javascript+// WRONG - old pattern+const chat = model.startChat();+const result = await chat.sendMessage("Hello");++// CORRECT - new pattern+const chat = await ai.chats.create({ model: "gemini-2.5-flash" });+const result = await chat.send("Hello");+```++### Python+```python+# WRONG - old streaming parameter+response = model.generate_content("prompt", stream=True)++# CORRECT - config-based streaming+response = client.models.generate_content(+ model="gemini-2.5-flash",+ contents="prompt",+ config={"stream": True}+)+```++## Safety Categories++Claude consistently forgets the 5th category and uses the wrong name for the 4th:++```python+# WRONG - 4 categories, wrong name+categories = [+ "HARM_CATEGORY_HARASSMENT",+ "HARM_CATEGORY_HATE_SPEECH",+ "HARM_CATEGORY_SEXUALLY_EXPLICIT",+ "HARM_CATEGORY_DANGEROUS_CONTENT" # wrong: no _CONTENT+]++# CORRECT - 5 categories+categories = [+ "HARM_CATEGORY_HARASSMENT",+ "HARM_CATEGORY_HATE_SPEECH",+ "HARM_CATEGORY_SEXUALLY_EXPLICIT",+ "HARM_CATEGORY_DANGEROUS", # no _CONTENT suffix+ "HARM_CATEGORY_CIVIC_INTEGRITY" # don't forget this one+]+```++## REST API Headers++```bash+# WRONG - Claude often capitalises this+-H "X-Goog-Api-Key: $GEMINI_API_KEY"++# CORRECT - lowercase+-H "x-goog-api-key: $GEMINI_API_KEY"+```++## Parameter Names++| Wrong (old) | Correct (current) |+|-------------|-------------------|+| `generationConfig` | `config` |+| `safetySettings` (as constructor param) | `config.safety_settings` |+| `stream=True` (as method param) | `config={"stream": True}` |++## Rate Limits++- There are NO daily limits -- only per-minute (RPM, TPM)+- Claude sometimes invents "1,500 requests per day" -- this is wrong+- Free tier: per-model RPM/TPM limits onlydiff --git a/plugins/dev-tools/skills/gemini-guide/references/topic-index.md b/plugins/dev-tools/skills/gemini-guide/references/topic-index.mdnew file mode 100644index 00000000..fbc4b6dc--- /dev/null+++ b/plugins/dev-tools/skills/gemini-guide/references/topic-index.md@@ -0,0 +1,76 @@+# Topic Index++Maps Gemini API topics to documentation files. All paths relative to `~/Documents/google-gemini-context/`.++## Topic-to-File Mapping++| Topic | JS Doc | Python Doc | Common Doc |+|-------|--------|------------|------------|+| Quickstart / setup | javascript/quickstart.md | python/quickstart.md | -- |+| Client initialisation | javascript/client-setup.md | python/client-setup.md | -- |+| Text generation | javascript/text-generation.md | python/text-generation.md | -- |+| Chat / multi-turn | javascript/chat.md | python/chat.md | -- |+| Streaming | javascript/streaming.md | python/streaming.md | -- |+| Function calling / tools | javascript/function-calling.md | python/function-calling.md | -- |+| Structured output / JSON | javascript/structured-output.md | python/structured-output.md | -- |+| Vision / image understanding | javascript/vision.md | python/vision.md | -- |+| Image generation | javascript/image-generation.md | python/image-generation.md | -- |+| Video understanding | javascript/video.md | python/video.md | -- |+| Video generation | javascript/video-generation.md | python/video-generation.md | -- |+| Audio | javascript/audio.md | python/audio.md | -- |+| Speech generation | javascript/speech-generation.md | python/speech-generation.md | -- |+| Music generation | javascript/music-generation.md | python/music-generation.md | -- |+| Document understanding | javascript/document-understanding.md | python/document-understanding.md | -- |+| Embeddings | javascript/embeddings.md | python/embeddings.md | -- |+| File API / uploads | javascript/files-api.md | python/files-api.md | -- |+| Context caching | javascript/caching.md | python/caching.md | -- |+| Code execution | javascript/code-execution.md | python/code-execution.md | -- |+| Thinking / reasoning | javascript/thinking.md | python/thinking.md | -- |+| Token counting | javascript/token-counting.md | python/token-counting.md | -- |+| Grounding / search | javascript/grounding.md | python/grounding.md | -- |+| URL context | javascript/url-context.md | python/url-context.md | -- |+| Batch processing | javascript/batch.md | python/batch.md | -- |+| Safety settings | -- | -- | common/safety.md |+| Authentication | -- | -- | common/authentication.md |+| Pricing | -- | -- | common/pricing.md |+| Rate limits | -- | -- | common/rate-limits.md |+| Error handling | -- | -- | common/errors.md |+| Regions | -- | -- | common/regions.md |+| OpenAI compatibility | -- | -- | common/openai-compatibility.md |+| Models reference | -- | -- | MODELS.md |+| SDK overview (JS+Python) | -- | -- | googlegenai-gemini-api.md |++## Keyword Mapping++When the user's query doesn't map directly to a topic name:++| User Says | Maps To |+|-----------|---------|+| "JSON output", "schema", "typed response" | Structured output |+| "tool use", "tool calling", "tools" | Function calling |+| "upload file", "send image", "attach" | File API |+| "real-time", "live", "websocket" | Streaming |+| "reasoning", "chain of thought", "deep thinking" | Thinking |+| "search grounding", "Google Search" | Grounding |+| "OCR", "PDF", "read document" | Document understanding |+| "RAG", "semantic search", "vector" | Embeddings |+| "save tokens", "reduce cost" | Context caching |+| "run code", "execute Python" | Code execution |+| "how much does it cost" | Pricing |+| "which model", "model comparison" | Models reference |+| "API key", "credentials" | Authentication |+| "429", "quota", "too many requests" | Rate limits |+| "OpenAI compatible", "drop-in replacement" | OpenAI compatibility |+| "TTS", "text to speech", "voice" | Speech generation |+| "generate music", "audio creation" | Music generation |++## Live Documentation Sources++When local docs seem stale or a topic isn't covered locally:++| Source | URL | Notes |+|--------|-----|-------|+| GitHub JS SDK (codegen_instructions) | `https://raw.githubusercontent.com/googleapis/js-genai/refs/heads/main/codegen_instructions.md` | Always current SDK patterns |+| GitHub JS SDK README | `https://raw.githubusercontent.com/googleapis/js-genai/refs/heads/main/README.md` | Package overview |+| Google AI docs (try markdown) | `https://ai.google.dev/gemini-api/docs/{topic}` | HTML only -- use WebFetch |+| NPM package info | `https://www.npmjs.com/package/@google/genai` | Version tracking |diff --git a/plugins/dev-tools/skills/project-kickoff/SKILL.md b/plugins/dev-tools/skills/project-kickoff/SKILL.mdnew file mode 100644index 00000000..1b52ced3--- /dev/null+++ b/plugins/dev-tools/skills/project-kickoff/SKILL.md@@ -0,0 +1,114 @@+---+name: project-kickoff+description: "Bootstrap new projects with curated settings.local.json permissions, CLAUDE.md, and .gitignore. Detects project type (cloudflare-worker, vercel-app, node-generic, python, ops-admin) and generates grouped, commented permission presets. Also tidies existing messy settings files (removes leaked secrets, shell fragments, deprecated MCP refs, duplicate entries). Trigger with 'kickoff', 'new project', 'bootstrap', 'setup claude', 'tidy permissions', 'clean settings', or 'init project'."+compatibility: claude-code-only+---++# Project Kickoff++Bootstrap a new project or clean up an existing one so Claude Code has the right permissions, documentation, and git setup from the start.++**Problem**: Every new project accumulates dozens of permission approvals one click at a time, resulting in bloated settings files with leaked secrets, shell fragments, and deprecated MCP refs. This skill generates HQ-quality project scaffolding upfront.++**Output**: `settings.local.json`, `CLAUDE.md`, `.gitignore` (and optionally git init + GitHub repo).++## Operating Modes++### Mode 1: New Project Setup++**When**: Starting a new project, or working in a directory without `.claude/settings.local.json`.++**Steps**:++1. **Detect project type** from files present in the directory:++ | Indicator | Type |+ |-----------|------|+ | `wrangler.jsonc` or `wrangler.toml` | cloudflare-worker |+ | `vercel.json` or `next.config.*` | vercel-app |+ | `package.json` (no deploy target) | node-generic |+ | `pyproject.toml` or `setup.py` | python |+ | `.claude/agents/` or operational scripts | ops-admin |+ | Empty directory | Ask the user |++ If ambiguous, ask. Types can stack (e.g. cloudflare-worker + node-generic).++2. **Generate `.claude/settings.local.json`**:+ - Read [references/permission-presets.md](references/permission-presets.md) for the preset definitions+ - Combine Universal Base + type-specific preset+ - Write with `//` comment groups for organisation+ - Warn the user: "Project settings.local.json SHADOWS your global settings — it does not merge"++3. **Generate `CLAUDE.md`**:+ - Read [references/claude-md-templates.md](references/claude-md-templates.md) for templates+ - Fill in: project name (from directory name or ask), today's date, detected stack+ - Pre-fill Jez's defaults (Cloudflare account ID, pnpm, EN-AU)++4. **Generate `.gitignore`**:+ - Use the type-appropriate template from [references/claude-md-templates.md](references/claude-md-templates.md)+ - Always include `.claude/settings.local.json` and `.dev.vars`++5. **Optionally** (ask first):+ - `git init` + first commit+ - `gh repo create jezweb/[name] --private` + push++### Mode 2: Tidy Existing Permissions++**When**: User says "tidy permissions", "clean settings", or the existing `settings.local.json` has more than ~50 entries.++**Steps**:++1. Run the tidy script to analyse the current file:+ ```bash+ python3 ${SKILL_DIR}/scripts/tidy_permissions.py .claude/settings.local.json+ ```++2. Review the report. It flags:+ - **Leaked secrets**: API keys, tokens, hex strings embedded in approval patterns+ - **Shell fragments**: `Bash(do)`, `Bash(fi)`, `Bash(then)`, `Bash(else)`, `Bash(done)`+ - **Deprecated MCP refs**: `mcp__bitwarden__*` and similar+ - **Duplicates**: Entries covered by a broader pattern already present+ - **One-time entries**: Entire commit messages, hardcoded paths that will never match again+ - **Consolidation opportunities**: e.g. 5 separate `Bash(git add:*)`, `Bash(git commit:*)` could become `Bash(git *)`++3. Present the cleaned version with a diff showing what changed.++4. Apply after user confirmation. Recommend the user rotate any leaked secrets.++### Mode 3: Add Preset++**When**: User says "add wrangler permissions" or "add MCP permissions" to an existing project.++**Steps**:++1. Read the relevant preset section from [references/permission-presets.md](references/permission-presets.md)+2. Read the existing `.claude/settings.local.json`+3. Merge without duplicating — add new entries, keep existing groups+4. Write the updated file++## Permission Syntax Quick Reference++| Pattern | Meaning |+|---------|---------|+| `Bash(git *)` | Current syntax — space before `*` = word boundary |+| `Bash(git:*)` | Deprecated colon syntax (still works) |+| `WebFetch(domain:x.com)` | Domain-scoped web access |+| `WebSearch` | Blanket web search |+| `mcp__server__tool` | Specific MCP tool |++**Critical**: Project `settings.local.json` **shadows** global settings. It does not merge. If a project has its own allow list, the global allow list is ignored entirely for that project.++Shell operators (`&&`, `||`, `;`) are handled safely — `Bash(git *)` won't match `git add && rm -rf /`.++## Autonomy++- **Just do it**: Detect project type, read existing files+- **Brief confirmation**: Write settings.local.json, CLAUDE.md, .gitignore (show what will be written)+- **Ask first**: git init, GitHub repo creation, overwriting existing files, applying tidy fixes++## Reference Files++| When | Read |+|------|------|+| Building permission presets | [references/permission-presets.md](references/permission-presets.md) |+| Generating CLAUDE.md and .gitignore | [references/claude-md-templates.md](references/claude-md-templates.md) |diff --git a/plugins/dev-tools/skills/project-kickoff/references/claude-md-templates.md b/plugins/dev-tools/skills/project-kickoff/references/claude-md-templates.mdnew file mode 100644index 00000000..bbe9c1b7--- /dev/null+++ b/plugins/dev-tools/skills/project-kickoff/references/claude-md-templates.md@@ -0,0 +1,246 @@+# CLAUDE.md Templates++Templates for generating project CLAUDE.md files. Each template includes Jez's defaults pre-filled.++## Detection Heuristics++Detect project type from file presence (first match wins, types can stack):++| Indicator | Project Type |+|-----------|-------------|+| `wrangler.jsonc` or `wrangler.toml` | cloudflare-worker |+| `vercel.json` or `next.config.*` | vercel-app |+| `package.json` with no deploy target | node-generic |+| `pyproject.toml` or `setup.py` | python |+| `.claude/agents/` + operational scripts | ops-admin |++---++## Cloudflare Worker Template++```markdown+# [Project Name]++**Repository**: https://github.com/jezweb/[repo-name]+**Last Updated**: [date]++## Stack++- Cloudflare Workers + Static Assets+- Vite + React 19 + @cloudflare/vite-plugin+- Tailwind v4 + shadcn/ui (neutral palette)+- D1 (SQLite) + Drizzle ORM+- Hono (API routing)+- pnpm++## Commands++| Command | Purpose |+|---------|---------|+| `pnpm dev` | Local dev server (Vite + Miniflare) |+| `pnpm build` | Production build |+| `pnpm deploy` | Deploy to Cloudflare |+| `pnpm db:migrate:local` | Run D1 migrations locally |+| `pnpm db:migrate:remote` | Run D1 migrations on production |++## Directory Structure++[Fill in after scaffolding]++## Cloudflare++- **Account**: Jezweb Team (`0460574641fdbb98159c98ebf593e2bd`)+- **Compatibility flags**: `nodejs_compat` (never use `node_compat`)+- Always use Workers + Static Assets (never Cloudflare Pages)++## Critical Rules++- Run migrations on BOTH local AND remote before testing+- Set `account_id` in wrangler.jsonc to avoid interactive prompts+- D1 bulk inserts: batch into chunks of ~10 rows (parameter limit)+- `wrangler secret put` does NOT auto-deploy — run `wrangler deploy` after++## Gotchas++[Add as discovered]+```++---++## Vercel App Template++```markdown+# [Project Name]++**Repository**: https://github.com/jezweb/[repo-name]+**Last Updated**: [date]++## Stack++- Next.js / Vite + React 19+- Tailwind v4 + shadcn/ui (neutral palette)+- Vercel (Jezweb team account)+- pnpm++## Commands++| Command | Purpose |+|---------|---------|+| `pnpm dev` | Local dev server |+| `pnpm build` | Production build |+| `vercel deploy` | Deploy to Vercel |+| `vercel deploy --prod` | Deploy to production |++## Vercel++- **Team**: jezweb (always use team account)+- Run `vercel switch jezweb` before deploying+- Run `vercel link --yes` to connect project++## Gotchas++[Add as discovered]+```++---++## Node Generic Template++```markdown+# [Project Name]++**Repository**: https://github.com/jezweb/[repo-name]+**Last Updated**: [date]++## Stack++- Node.js + TypeScript (ES modules)+- pnpm++## Commands++| Command | Purpose |+|---------|---------|+| `pnpm dev` | Local dev server |+| `pnpm build` | Production build |+| `pnpm test` | Run tests |++## Directory Structure++[Fill in after scaffolding]++## Gotchas++[Add as discovered]+```++---++## Python Template++```markdown+# [Project Name]++**Repository**: https://github.com/jezweb/[repo-name]+**Last Updated**: [date]++## Stack++- Python 3.12++- uv (package management)++## Commands++| Command | Purpose |+|---------|---------|+| `uv run python main.py` | Run the application |+| `uv sync` | Install dependencies |+| `uv run pytest` | Run tests |++## Directory Structure++[Fill in after scaffolding]++## Gotchas++[Add as discovered]+```++---++## Ops / Admin Template++```markdown+# [Project Name]++**Repository**: https://github.com/jezweb/[repo-name]+**Last Updated**: [date]++## Purpose++[What this operational project does]++## MCP Servers++This project uses the following MCP integrations:++| Server | Purpose |+|--------|---------|+| Brain | Client/site/contact CRM |+| Vault | Secrets and knowledge store |+| Rocket.net | WordPress hosting management |+| Synergy Wholesale | Domain registration and DNS |+| Gmail (Jez + Anthro) | Email management |+| Google Chat (Jez + Anthro) | Team messaging |+| Google Docs/Sheets | Document management |+| Calendar | Event management |++## Anthro Persona++When communicating with Jezweb staff via Google Chat or email, use the Anthro persona. See `~/Documents/anthro/ANTHRO.md` for full briefing.++## Gotchas++[Add as discovered]+```++---++## .gitignore Templates++### Cloudflare Worker / Node++```+node_modules/+.wrangler/+dist/+.dev.vars+*.log+.DS_Store+.env+.env.local+.claude/settings.local.json+```++### Python++```+__pycache__/+*.pyc+.venv/+dist/+*.egg-info/+.env+.env.local+.DS_Store+.claude/settings.local.json+```++### Ops / Admin++```+.DS_Store+.env+.env.local+.claude/settings.local.json+```diff --git a/plugins/dev-tools/skills/project-kickoff/references/permission-presets.md b/plugins/dev-tools/skills/project-kickoff/references/permission-presets.mdnew file mode 100644index 00000000..88d47a6c--- /dev/null+++ b/plugins/dev-tools/skills/project-kickoff/references/permission-presets.md@@ -0,0 +1,316 @@+# Permission Presets++Curated permission presets for `settings.local.json`. Each preset is a JSON array of permission strings grouped with `//` comments.++## Syntax Reference++| Pattern | Meaning |+|---------|---------|+| `Bash(git *)` | Space before `*` = word boundary (current preferred syntax) |+| `Bash(git:*)` | Colon syntax (deprecated, still works) |+| `Bash(git*)` | No space = no boundary (matches `gitk` too) |+| `WebFetch(domain:example.com)` | Domain-scoped web access |+| `WebSearch` | Blanket web search (no specifiers) |+| `mcp__server__tool` | Specific MCP tool |++**Critical**: Project `settings.local.json` SHADOWS global settings (does not merge). If a project has its own allow list, it completely replaces the global one.++---++## Universal Base++Every project gets these. Git and GitHub CLI are needed for all development work.++```json+"// --- Git ---",+"Bash(git *)",++"// --- GitHub CLI ---",+"Bash(gh *)",+"Bash(gh repo:*)",+"Bash(gh issue:*)",+"Bash(gh pr:*)",+"Bash(gh api:*)",+"Bash(gh search:*)",+"Bash(gh run:*)",+"Bash(gh release:*)",+"Bash(gh label:*)",+"Bash(gh workflow:*)",++"// --- Web ---",+"WebSearch"+```++Note: `Bash(gh *)` has a known bug where some subcommands don't match. Include both the broad pattern and explicit subcommand patterns as a workaround.++---++## Cloudflare Worker++For projects using Cloudflare Workers, D1, R2, KV. Add to Universal Base.++```json+"// --- Wrangler ---",+"Bash(npx wrangler *)",+"Bash(wrangler *)",++"// --- Package Managers ---",+"Bash(pnpm *)",+"Bash(npm *)",+"Bash(npx *)",++"// --- Cloudflare Docs ---",+"mcp__claude_ai_cloudflare-docs__search_cloudflare_documentation",+"WebFetch(domain:developers.cloudflare.com)",++"// --- Build & Dev ---",+"Bash(curl *)",+"Bash(node *)"+```++### Cloudflare Account Note++Default account: Jezweb Team `0460574641fdbb98159c98ebf593e2bd`. Add `account_id` to `wrangler.jsonc` to avoid interactive prompts — don't put it in permission patterns.++---++## Vercel App++For Next.js or other Vercel-deployed projects. Add to Universal Base.++```json+"// --- Vercel CLI ---",+"Bash(npx vercel *)",+"Bash(vercel *)",++"// --- Package Managers ---",+"Bash(pnpm *)",+"Bash(npm *)",+"Bash(npx *)",++"// --- Database ---",+"Bash(npx prisma *)",+"Bash(prisma *)",++"// --- Build & Dev ---",+"Bash(curl *)",+"Bash(node *)"+```++### Vercel Account Note++Always use the Jezweb team account. Run `vercel switch jezweb` before deploying.++---++## Node Generic++For generic Node.js projects without a specific deployment target. Add to Universal Base.++```json+"// --- Package Managers ---",+"Bash(pnpm *)",+"Bash(npm *)",+"Bash(npx *)",++"// --- Runtime ---",+"Bash(node *)",+"Bash(npx tsx *)"+```++---++## Python++For Python projects using uv or pip. Add to Universal Base.++```json+"// --- Python ---",+"Bash(python3 *)",+"Bash(python *)",+"Bash(pip *)",+"Bash(uv *)",++"// --- Testing ---",+"Bash(pytest *)",+"Bash(mypy *)"+```++---++## Ops / Admin++For operational repos (like HQ, Anthro) that interact with many MCP services. Add to Universal Base.++```json+"// --- Gmail ---",+"mcp__claude_ai_google-gmail-jez__gmail_messages",+"mcp__claude_ai_google-gmail-jez__gmail_threads",+"mcp__claude_ai_google-gmail-jez__gmail_labels",+"mcp__claude_ai_google-gmail-jez__gmail_drafts",+"mcp__claude_ai_google-gmail-jez__gmail_contacts",+"mcp__claude_ai_google-gmail-anthro__gmail_messages",+"mcp__claude_ai_google-gmail-anthro__gmail_threads",+"mcp__claude_ai_google-gmail-anthro__gmail_labels",+"mcp__claude_ai_google-gmail-anthro__gmail_drafts",+"mcp__claude_ai_google-gmail-anthro__gmail_contacts",++"// --- Google Chat ---",+"mcp__claude_ai_google-chat-jez__chat_spaces",+"mcp__claude_ai_google-chat-jez__chat_messages",+"mcp__claude_ai_google-chat-jez__chat_members",+"mcp__claude_ai_google-chat-anthro__chat_spaces",+"mcp__claude_ai_google-chat-anthro__chat_messages",+"mcp__claude_ai_google-chat-anthro__chat_members",++"// --- Google Docs ---",+"mcp__claude_ai_google-docs-jez__docs_documents",+"mcp__claude_ai_google-docs-jez__docs_content",+"mcp__claude_ai_google-docs-jez__docs_format",+"mcp__claude_ai_google-docs-jez__docs_collaborate",+"mcp__claude_ai_google-docs-anthro__docs_documents",+"mcp__claude_ai_google-docs-anthro__docs_content",+"mcp__claude_ai_google-docs-anthro__docs_format",+"mcp__claude_ai_google-docs-anthro__docs_collaborate",++"// --- Google Sheets ---",+"mcp__claude_ai_google-sheets-jez__sheets_spreadsheets",+"mcp__claude_ai_google-sheets-jez__sheets_values",+"mcp__claude_ai_google-sheets-jez__sheets_data",+"mcp__claude_ai_google-sheets-jez__sheets_format",+"mcp__claude_ai_google-sheets-anthro__sheets_spreadsheets",+"mcp__claude_ai_google-sheets-anthro__sheets_values",+"mcp__claude_ai_google-sheets-anthro__sheets_data",+"mcp__claude_ai_google-sheets-anthro__sheets_format",++"// --- Calendar ---",+"mcp__claude_ai_calendar__calendar_calendars",+"mcp__claude_ai_calendar__calendar_events",++"// --- Google Tasks ---",+"mcp__claude_ai_google-tasks-jez__tasks_lists",+"mcp__claude_ai_google-tasks-jez__tasks_tasks",+"mcp__claude_ai_google-tasks-anthro__tasks_lists",+"mcp__claude_ai_google-tasks-anthro__tasks_tasks",++"// --- Google Search Console ---",+"mcp__claude_ai_google-search-console__search_console_analytics",+"mcp__claude_ai_google-search-console__search_console_sitemaps",+"mcp__claude_ai_google-search-console__search_console_sites",++"// --- Brain (CRM) ---",+"mcp__claude_ai_brain__brain_clients",+"mcp__claude_ai_brain__brain_sites",+"mcp__claude_ai_brain__brain_contacts",+"mcp__claude_ai_brain__brain_issues",+"mcp__claude_ai_brain__brain_knowledge",+"mcp__claude_ai_brain__brain_comms",+"mcp__claude_ai_brain__brain_documents",+"mcp__claude_ai_brain__brain_billing",+"mcp__claude_ai_brain__brain_admin",+"mcp__claude_ai_brain__brain_recall",+"mcp__claude_ai_brain__brain_client_get",+"mcp__claude_ai_brain__brain_site_get",+"mcp__claude_ai_brain__brain_projects",+"mcp__claude_ai_brain__brain_tasks",++"// --- Vault ---",+"mcp__claude_ai_Vault__secret_get",+"mcp__claude_ai_Vault__secret_set",+"mcp__claude_ai_Vault__secret_list",+"mcp__claude_ai_Vault__secret_delete",+"mcp__claude_ai_Vault__remember",+"mcp__claude_ai_Vault__recall",+"mcp__claude_ai_Vault__knowledge_list",+"mcp__claude_ai_Vault__forget",+"mcp__claude_ai_Vault__update_knowledge",++"// --- Rocket.net ---",+"mcp__claude_ai_rocket__rocketnet_sites",+"mcp__claude_ai_rocket__rocketnet_performance",+"mcp__claude_ai_rocket__rocketnet_backups",+"mcp__claude_ai_rocket__rocketnet_domains",+"mcp__claude_ai_rocket__rocketnet_wordpress",+"mcp__claude_ai_rocket__rocketnet_credentials",+"mcp__claude_ai_rocket__rocketnet_activity",+"mcp__claude_ai_rocket__rocketnet_access",++"// --- Synergy Wholesale ---",+"mcp__claude_ai_synergy_wholesale__synergy_domains",+"mcp__claude_ai_synergy_wholesale__synergy_dns",+"mcp__claude_ai_synergy_wholesale__synergy_hosting",+"mcp__claude_ai_synergy_wholesale__synergy_email",+"mcp__claude_ai_synergy_wholesale__synergy_contacts",+"mcp__claude_ai_synergy_wholesale__synergy_transfers",+"mcp__claude_ai_synergy_wholesale__synergy_account",+"mcp__claude_ai_synergy_wholesale__synergy_credentials",+"mcp__claude_ai_synergy_wholesale__synergy_discovery",++"// --- Network ---",+"mcp__claude_ai_network__network_check",+"mcp__claude_ai_network__network_lookup",++"// --- Australian Business ---",+"mcp__claude_ai_australian_business__australia_business",+"mcp__claude_ai_australian_business__australia_datetime",+"mcp__claude_ai_australian_business__australia_ip",++"// --- Cloudflare Docs ---",+"mcp__claude_ai_cloudflare-docs__search_cloudflare_documentation",++"// --- GitHub MCP ---",+"mcp__claude_ai_github__github_repos",+"mcp__claude_ai_github__github_issues",+"mcp__claude_ai_github__github_pulls",+"mcp__claude_ai_github__get_user_info",++"// --- Scraper ---",+"mcp__claude_ai_scraper__web_scraper",+"mcp__claude_ai_scraper__web_crawler",++"// --- YouTube ---",+"mcp__claude_ai_youtube__youtube_video",+"mcp__claude_ai_youtube__youtube_search",+"mcp__claude_ai_youtube__youtube_channel",+"mcp__claude_ai_youtube__youtube_playlist",++"// --- Weather ---",+"mcp__claude_ai_weather__weather",++"// --- Web ---",+"WebFetch(domain:github.com)",+"WebFetch(domain:developers.cloudflare.com)",+"WebFetch(domain:rocket.net)",++"// --- Bash ---",+"Bash(curl *)",+"Bash(playwright-cli *)",+"Bash(pm2 *)",+"Bash(claude *)",+"Bash(dig *)",+"Bash(node *)",+"Bash(python3 *)"+```++---++## Combining Presets++Presets stack. A Cloudflare Worker project gets: Universal + Cloudflare Worker. An ops project gets: Universal + Ops/Admin.++When merging, deduplicate and keep the grouped `//` comment structure. The final `settings.local.json` should look like:++```json+{+ "permissions": {+ "allow": [+ "// --- Git ---",+ "Bash(git *)",+ "// --- GitHub CLI ---",+ "Bash(gh *)",+ ...+ ],+ "deny": []+ }+}+```diff --git a/plugins/dev-tools/skills/project-kickoff/scripts/tidy_permissions.py b/plugins/dev-tools/skills/project-kickoff/scripts/tidy_permissions.pynew file mode 100755index 00000000..b9148a5d--- /dev/null+++ b/plugins/dev-tools/skills/project-kickoff/scripts/tidy_permissions.py@@ -0,0 +1,285 @@+#!/usr/bin/env python3+"""Analyse and tidy a Claude Code settings.local.json permissions file.++Usage:+ python3 tidy_permissions.py <path> # Report mode (default)+ python3 tidy_permissions.py <path> --fix # Output cleaned JSON+ python3 tidy_permissions.py <path> --json # Report as JSON+"""++import json+import re+import sys+from pathlib import Path+++# Patterns that indicate leaked secrets+SECRET_PATTERNS = [+ r"sk-ant-api\d+-[A-Za-z0-9_-]{20,}", # Anthropic API keys+ r"[A-Za-z0-9_-]{32,}", # Long tokens/keys (32+ chars)+ r"Bearer [A-Za-z0-9_-]{20,}", # Bearer tokens+ r"ANTHROPIC_API_KEY='[^']+", # Explicit key assignments+ r"CLOUDFLARE_API_TOKEN=\"[^\"]+", # Cloudflare tokens+ r"Authorization: [A-Za-z]+ [A-Za-z0-9_-]{20,}", # Auth headers with tokens+]++# Shell fragments that get accidentally approved+SHELL_FRAGMENTS = {+ "Bash(do)", "Bash(done)", "Bash(fi)", "Bash(then)", "Bash(else)",+ "Bash(break)", "Bash(if)", "Bash(for)", "Bash(while)",+}++# Deprecated MCP references+DEPRECATED_MCP = [+ "mcp__bitwarden__",+ "mcp__google-chat__", # Old format (not claude_ai_ prefixed)+ "mcp__google-docs__", # Old format+ "mcp__google-drive__", # Old format+ "mcp__google-sheets__", # Old format+ "mcp__gmail__", # Old format (not gmail-jez or gmail-anthro)+]++# Patterns that can be consolidated into broader ones+CONSOLIDATION_MAP = {+ "Bash(git *)": [+ r"Bash\(git (add|commit|push|pull|fetch|checkout|branch|merge|stash|rm|reset|log|diff|status|remote|revert|mv|check-ignore|ls-tree|merge-tree)",+ ],+ "Bash(gh *)": [+ r"Bash\(gh (repo|issue|pr|api|search|run|release|label|workflow|gist|auth|project)",+ ],+ "Bash(pnpm *)": [+ r"Bash\(pnpm (install|add|remove|build|dev|test|deploy|list|ls|why|run|exec|update|audit|tsc|vitest|dlx|--filter)",+ ],+ "Bash(npm *)": [+ r"Bash\(npm (install|run|view|audit|init|info|ls)",+ ],+ "Bash(npx *)": [+ r"Bash\(npx (wrangler|vercel|tsc|tsx|prettier|vitest|shadcn|prisma|vite)",+ ],+}+++def strip_json_comments(text: str) -> str:+ """Remove // comments from JSON (Claude Code JSON5-style)."""+ lines = text.split("\n")+ cleaned = []+ for line in lines:+ stripped = line.strip()+ # Keep lines that are comment-only strings in arrays (like "// --- Git ---")+ if stripped.startswith('"//'):+ cleaned.append(line)+ else:+ # Remove inline comments (not inside strings)+ cleaned.append(line)+ return "\n".join(cleaned)+++def load_settings(path: Path) -> dict:+ """Load settings.local.json, handling // comments."""+ text = path.read_text()+ # Try parsing as-is first+ try:+ return json.loads(text)+ except json.JSONDecodeError:+ pass+ # Strip comments and retry+ cleaned = strip_json_comments(text)+ return json.loads(cleaned)+++def check_secrets(entry: str) -> bool:+ """Check if a permission entry contains a suspected secret."""+ # MCP tool names and WebFetch/WebSearch/Skill entries aren't secrets+ if entry.startswith(("mcp__", "WebFetch", "WebSearch", "Skill")):+ return False+ # Only check Bash entries and other patterns+ for pattern in SECRET_PATTERNS:+ if re.search(pattern, entry):+ return True+ return False+++def check_shell_fragment(entry: str) -> bool:+ """Check if an entry is a shell fragment."""+ return entry in SHELL_FRAGMENTS or entry.startswith("Bash(__NEW_LINE_")+++def check_deprecated_mcp(entry: str) -> bool:+ """Check if an entry references a deprecated MCP server."""+ for prefix in DEPRECATED_MCP:+ if entry.startswith(prefix):+ return True+ return False+++def check_one_time(entry: str) -> bool:+ """Check if an entry looks like a one-time command that won't match again."""+ # Entries with embedded commit messages+ if "EOF" in entry and "git commit" in entry:+ return True+ # Entries with hardcoded absolute paths to specific files+ if re.search(r"Bash\(git -C /[^\s]+", entry):+ return True+ # Entries with hardcoded for-loop values+ if entry.startswith("Bash(for ") and "in " in entry:+ return True+ # Entries with specific file copies+ if "cp " in entry and "/" in entry and entry.count("/") > 3:+ return True+ return False+++def find_consolidations(entries: list[str]) -> dict[str, list[str]]:+ """Find entries that could be consolidated into broader patterns."""+ consolidations = {}+ for broad, patterns in CONSOLIDATION_MAP.items():+ # Skip if the broad pattern already exists+ if broad in entries:+ continue+ matches = []+ for entry in entries:+ for pattern in patterns:+ if re.match(pattern, entry):+ matches.append(entry)+ break+ if len(matches) >= 2:+ consolidations[broad] = matches+ return consolidations+++def find_duplicates(entries: list[str]) -> list[str]:+ """Find duplicate entries."""+ seen = set()+ dupes = []+ for entry in entries:+ if entry in seen:+ dupes.append(entry)+ seen.add(entry)+ return dupes+++def analyse(settings: dict) -> dict:+ """Analyse permissions and return a report."""+ entries = settings.get("permissions", {}).get("allow", [])++ # Filter out comment strings+ real_entries = [e for e in entries if not e.startswith("//")]+ comments = [e for e in entries if e.startswith("//")]++ report = {+ "total_entries": len(real_entries),+ "comment_lines": len(comments),+ "secrets": [e for e in real_entries if check_secrets(e)],+ "shell_fragments": [e for e in real_entries if check_shell_fragment(e)],+ "deprecated_mcp": [e for e in real_entries if check_deprecated_mcp(e)],+ "one_time": [e for e in real_entries if check_one_time(e)],+ "duplicates": find_duplicates(real_entries),+ "consolidations": find_consolidations(real_entries),+ }++ issues = (+ len(report["secrets"])+ + len(report["shell_fragments"])+ + len(report["deprecated_mcp"])+ + len(report["one_time"])+ + len(report["duplicates"])+ )+ report["total_issues"] = issues+ report["consolidation_count"] = sum(+ len(v) for v in report["consolidations"].values()+ )++ return report+++def print_report(report: dict, path: str) -> None:+ """Print human-readable report."""+ print(f"\n=== Permission Tidy Report: {path} ===\n")+ print(f"Total entries: {report['total_entries']} ({report['comment_lines']} comment lines)")+ print(f"Issues found: {report['total_issues']}")+ print(f"Consolidation opportunities: {report['consolidation_count']} entries -> {len(report['consolidations'])} broad patterns")+ print()++ if report["secrets"]:+ print(f"LEAKED SECRETS ({len(report['secrets'])}):")+ for s in report["secrets"]:+ # Truncate to avoid printing full secrets+ display = s[:60] + "..." if len(s) > 60 else s+ print(f" - {display}")+ print()++ if report["shell_fragments"]:+ print(f"Shell fragments ({len(report['shell_fragments'])}):")+ for s in report["shell_fragments"]:+ print(f" - {s}")+ print()++ if report["deprecated_mcp"]:+ print(f"Deprecated MCP refs ({len(report['deprecated_mcp'])}):")+ for s in report["deprecated_mcp"]:+ print(f" - {s}")+ print()++ if report["one_time"]:+ print(f"One-time entries ({len(report['one_time'])}):")+ for s in report["one_time"]:+ display = s[:80] + "..." if len(s) > 80 else s+ print(f" - {display}")+ print()++ if report["duplicates"]:+ print(f"Duplicates ({len(report['duplicates'])}):")+ for s in report["duplicates"]:+ print(f" - {s}")+ print()++ if report["consolidations"]:+ print("Consolidation opportunities:")+ for broad, specifics in report["consolidations"].items():+ print(f" {broad} would replace {len(specifics)} entries:")+ for s in specifics[:5]:+ print(f" - {s}")+ if len(specifics) > 5:+ print(f" ... and {len(specifics) - 5} more")+ print()+++def main():+ if len(sys.argv) < 2:+ print(__doc__)+ sys.exit(1)++ path = Path(sys.argv[1])+ if not path.exists():+ print(f"Error: {path} not found")+ sys.exit(1)++ mode = sys.argv[2] if len(sys.argv) > 2 else "--report"++ settings = load_settings(path)+ report = analyse(settings)++ if mode == "--json":+ # Don't include full secret values in JSON output+ safe_report = report.copy()+ safe_report["secrets"] = [s[:40] + "..." for s in report["secrets"]]+ print(json.dumps(safe_report, indent=2))+ elif mode == "--fix":+ # Output a cleaned version+ entries = settings.get("permissions", {}).get("allow", [])+ remove = set()+ remove.update(report["secrets"])+ remove.update(report["shell_fragments"])+ remove.update(report["deprecated_mcp"])+ remove.update(report["one_time"])+ remove.update(report["duplicates"])++ cleaned = [e for e in entries if e not in remove]+ settings["permissions"]["allow"] = cleaned+ print(json.dumps(settings, indent=2))+ else:+ print_report(report, str(path))+++if __name__ == "__main__":+ main()