@rune-kit/rune 2.8.0 → 2.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +68 -34
- package/agents/adversary.md +27 -0
- package/agents/architect.md +19 -29
- package/agents/asset-creator.md +18 -4
- package/agents/audit.md +25 -4
- package/agents/autopsy.md +19 -4
- package/agents/ba.md +35 -0
- package/agents/brainstorm.md +31 -4
- package/agents/browser-pilot.md +21 -4
- package/agents/coder.md +21 -29
- package/agents/completion-gate.md +20 -4
- package/agents/constraint-check.md +18 -4
- package/agents/context-engine.md +22 -4
- package/agents/context-pack.md +32 -0
- package/agents/cook.md +41 -4
- package/agents/db.md +19 -4
- package/agents/debug.md +33 -4
- package/agents/dependency-doctor.md +20 -4
- package/agents/deploy.md +27 -4
- package/agents/design.md +22 -4
- package/agents/doc-processor.md +27 -0
- package/agents/docs-seeker.md +19 -4
- package/agents/docs.md +31 -0
- package/agents/fix.md +37 -4
- package/agents/git.md +29 -0
- package/agents/hallucination-guard.md +20 -4
- package/agents/incident.md +21 -4
- package/agents/integrity-check.md +18 -4
- package/agents/journal.md +19 -4
- package/agents/launch.md +32 -4
- package/agents/logic-guardian.md +26 -11
- package/agents/marketing.md +23 -4
- package/agents/mcp-builder.md +26 -0
- package/agents/neural-memory.md +30 -0
- package/agents/onboard.md +22 -4
- package/agents/perf.md +21 -4
- package/agents/plan.md +29 -4
- package/agents/preflight.md +22 -4
- package/agents/problem-solver.md +20 -4
- package/agents/rescue.md +23 -4
- package/agents/research.md +19 -4
- package/agents/researcher.md +19 -29
- package/agents/retro.md +32 -0
- package/agents/review-intake.md +20 -4
- package/agents/review.md +32 -4
- package/agents/reviewer.md +20 -28
- package/agents/safeguard.md +19 -4
- package/agents/sast.md +18 -4
- package/agents/scaffold.md +41 -0
- package/agents/scanner.md +19 -28
- package/agents/scope-guard.md +18 -4
- package/agents/scout.md +23 -4
- package/agents/sentinel-env.md +26 -0
- package/agents/sentinel.md +33 -4
- package/agents/sequential-thinking.md +20 -4
- package/agents/session-bridge.md +24 -4
- package/agents/skill-forge.md +22 -4
- package/agents/skill-router.md +26 -4
- package/agents/slides.md +24 -0
- package/agents/surgeon.md +19 -4
- package/agents/team.md +30 -4
- package/agents/test.md +36 -4
- package/agents/trend-scout.md +17 -4
- package/agents/verification.md +20 -4
- package/agents/video-creator.md +20 -4
- package/agents/watchdog.md +19 -4
- package/agents/worktree.md +17 -4
- package/commands/rune.md +168 -168
- package/compiler/__tests__/analytics.test.js +370 -0
- package/compiler/adapters/openclaw.js +2 -2
- package/compiler/analytics.js +385 -0
- package/compiler/bin/rune.js +68 -2
- package/compiler/dashboard.js +883 -0
- package/compiler/transforms/branding.js +1 -1
- package/contexts/dev.md +34 -34
- package/contexts/research.md +43 -43
- package/contexts/review.md +55 -55
- package/extensions/ai-ml/PACK.md +88 -88
- package/extensions/ai-ml/skills/ai-agents.md +172 -172
- package/extensions/ai-ml/skills/code-sandbox.md +187 -187
- package/extensions/ai-ml/skills/deep-research.md +146 -146
- package/extensions/ai-ml/skills/embedding-search.md +66 -66
- package/extensions/ai-ml/skills/fine-tuning-guide.md +74 -74
- package/extensions/ai-ml/skills/llm-architect.md +125 -125
- package/extensions/ai-ml/skills/llm-integration.md +64 -64
- package/extensions/ai-ml/skills/prompt-patterns.md +72 -72
- package/extensions/ai-ml/skills/rag-patterns.md +66 -66
- package/extensions/ai-ml/skills/web-extraction.md +114 -114
- package/extensions/analytics/PACK.md +92 -92
- package/extensions/analytics/skills/ab-testing.md +72 -72
- package/extensions/analytics/skills/dashboard-patterns.md +83 -83
- package/extensions/analytics/skills/data-validation.md +68 -68
- package/extensions/analytics/skills/funnel-analysis.md +81 -81
- package/extensions/analytics/skills/sql-patterns.md +57 -57
- package/extensions/analytics/skills/statistical-analysis.md +79 -79
- package/extensions/analytics/skills/tracking-setup.md +71 -71
- package/extensions/backend/PACK.md +104 -104
- package/extensions/backend/skills/api-patterns.md +84 -84
- package/extensions/backend/skills/async-pipeline.md +193 -193
- package/extensions/backend/skills/auth-patterns.md +97 -97
- package/extensions/backend/skills/background-jobs.md +133 -133
- package/extensions/backend/skills/caching-patterns.md +108 -108
- package/extensions/backend/skills/cli-generation.md +133 -133
- package/extensions/backend/skills/database-patterns.md +87 -87
- package/extensions/backend/skills/middleware-patterns.md +104 -104
- package/extensions/chrome-ext/PACK.md +93 -93
- package/extensions/chrome-ext/skills/cws-preflight.md +143 -143
- package/extensions/chrome-ext/skills/cws-publish.md +104 -104
- package/extensions/chrome-ext/skills/ext-ai-integration.md +251 -251
- package/extensions/chrome-ext/skills/ext-messaging.md +139 -139
- package/extensions/chrome-ext/skills/ext-storage.md +133 -133
- package/extensions/chrome-ext/skills/mv3-scaffold.md +164 -164
- package/extensions/content/PACK.md +96 -96
- package/extensions/content/skills/blog-patterns.md +88 -88
- package/extensions/content/skills/cms-integration.md +131 -131
- package/extensions/content/skills/content-scoring.md +107 -107
- package/extensions/content/skills/i18n.md +83 -83
- package/extensions/content/skills/mdx-authoring.md +137 -137
- package/extensions/content/skills/reference.md +1014 -1014
- package/extensions/content/skills/seo-patterns.md +67 -67
- package/extensions/content/skills/video-repurpose.md +153 -153
- package/extensions/devops/PACK.md +101 -101
- package/extensions/devops/skills/chaos-testing.md +67 -67
- package/extensions/devops/skills/ci-cd.md +75 -75
- package/extensions/devops/skills/docker.md +58 -58
- package/extensions/devops/skills/edge-serverless.md +163 -163
- package/extensions/devops/skills/infra-as-code.md +158 -158
- package/extensions/devops/skills/kubernetes.md +110 -110
- package/extensions/devops/skills/monitoring.md +57 -57
- package/extensions/devops/skills/server-setup.md +64 -64
- package/extensions/devops/skills/ssl-domain.md +42 -42
- package/extensions/ecommerce/PACK.md +116 -116
- package/extensions/ecommerce/skills/cart-system.md +79 -79
- package/extensions/ecommerce/skills/inventory-mgmt.md +102 -102
- package/extensions/ecommerce/skills/order-management.md +126 -126
- package/extensions/ecommerce/skills/payment-integration.md +472 -472
- package/extensions/ecommerce/skills/shopify-dev.md +69 -69
- package/extensions/ecommerce/skills/subscription-billing.md +93 -93
- package/extensions/ecommerce/skills/tax-compliance.md +117 -117
- package/extensions/gamedev/PACK.md +142 -142
- package/extensions/gamedev/skills/asset-pipeline.md +74 -74
- package/extensions/gamedev/skills/audio-system.md +129 -129
- package/extensions/gamedev/skills/camera-system.md +87 -87
- package/extensions/gamedev/skills/ecs.md +98 -98
- package/extensions/gamedev/skills/game-loops.md +72 -72
- package/extensions/gamedev/skills/input-system.md +199 -199
- package/extensions/gamedev/skills/multiplayer.md +180 -180
- package/extensions/gamedev/skills/particles.md +105 -105
- package/extensions/gamedev/skills/physics-engine.md +89 -89
- package/extensions/gamedev/skills/scene-management.md +146 -146
- package/extensions/gamedev/skills/threejs-patterns.md +90 -90
- package/extensions/gamedev/skills/webgl.md +71 -71
- package/extensions/mobile/PACK.md +106 -106
- package/extensions/mobile/skills/app-store-connect.md +152 -152
- package/extensions/mobile/skills/app-store-prep.md +66 -66
- package/extensions/mobile/skills/deep-linking.md +109 -109
- package/extensions/mobile/skills/flutter.md +60 -60
- package/extensions/mobile/skills/ios-build-pipeline.md +142 -142
- package/extensions/mobile/skills/native-bridge.md +66 -66
- package/extensions/mobile/skills/ota-updates.md +97 -97
- package/extensions/mobile/skills/push-notifications.md +111 -111
- package/extensions/mobile/skills/react-native.md +82 -82
- package/extensions/saas/PACK.md +116 -116
- package/extensions/saas/skills/billing-integration.md +200 -200
- package/extensions/saas/skills/feature-flags.md +130 -130
- package/extensions/saas/skills/multi-tenant.md +103 -103
- package/extensions/saas/skills/onboarding-flow.md +139 -139
- package/extensions/saas/skills/subscription-flow.md +95 -95
- package/extensions/saas/skills/team-management.md +144 -144
- package/extensions/security/PACK.md +99 -99
- package/extensions/security/skills/api-security.md +140 -140
- package/extensions/security/skills/compliance.md +68 -68
- package/extensions/security/skills/owasp-audit.md +64 -64
- package/extensions/security/skills/pentest-patterns.md +77 -77
- package/extensions/security/skills/secret-mgmt.md +65 -65
- package/extensions/security/skills/supply-chain.md +65 -65
- package/extensions/trading/PACK.md +80 -80
- package/extensions/trading/skills/chart-components.md +55 -55
- package/extensions/trading/skills/experiment-loop.md +125 -125
- package/extensions/trading/skills/fintech-patterns.md +47 -47
- package/extensions/trading/skills/indicator-library.md +58 -58
- package/extensions/trading/skills/quant-analysis.md +111 -111
- package/extensions/trading/skills/realtime-data.md +58 -58
- package/extensions/trading/skills/trade-logic.md +104 -104
- package/extensions/ui/PACK.md +130 -130
- package/extensions/ui/skills/a11y-audit.md +91 -91
- package/extensions/ui/skills/animation-patterns.md +127 -106
- package/extensions/ui/skills/component-patterns.md +100 -75
- package/extensions/ui/skills/design-decision.md +108 -108
- package/extensions/ui/skills/design-system.md +68 -68
- package/extensions/ui/skills/landing-patterns.md +155 -155
- package/extensions/ui/skills/palette-picker.md +173 -173
- package/extensions/ui/skills/react-health.md +90 -90
- package/extensions/ui/skills/type-system.md +125 -125
- package/extensions/ui/skills/web-vitals.md +153 -153
- package/extensions/zalo/PACK.md +145 -145
- package/extensions/zalo/skills/zalo-oa-mcp.md +317 -317
- package/extensions/zalo/skills/zalo-oa-messaging.md +429 -429
- package/extensions/zalo/skills/zalo-oa-setup.md +236 -236
- package/extensions/zalo/skills/zalo-oa-webhook.md +189 -189
- package/extensions/zalo/skills/zalo-personal-messaging.md +194 -194
- package/extensions/zalo/skills/zalo-personal-setup.md +153 -153
- package/extensions/zalo/skills/zalo-rate-guard.md +219 -219
- package/hooks/auto-format/index.cjs +48 -48
- package/hooks/context-watch/index.cjs +95 -68
- package/hooks/hooks.json +111 -111
- package/hooks/metrics-collector/index.cjs +86 -42
- package/hooks/post-session-reflect/index.cjs +189 -153
- package/hooks/pre-compact/index.cjs +95 -95
- package/hooks/run-hook.cmd +1 -1
- package/hooks/secrets-scan/index.cjs +100 -100
- package/hooks/session-start/index.cjs +71 -65
- package/hooks/typecheck/index.cjs +65 -65
- package/package.json +63 -63
- package/references/ui-pro-max-data/LICENSE-UI-PRO-MAX +21 -21
- package/references/ui-pro-max-data/charts.csv +26 -26
- package/references/ui-pro-max-data/colors.csv +161 -161
- package/references/ui-pro-max-data/styles.csv +68 -68
- package/references/ui-pro-max-data/typography.csv +74 -74
- package/references/ui-pro-max-data/ui-reasoning.csv +162 -162
- package/references/ui-pro-max-data/ux-guidelines.csv +99 -99
- package/skills/adversary/SKILL.md +283 -283
- package/skills/asset-creator/SKILL.md +157 -157
- package/skills/audit/SKILL.md +148 -2
- package/skills/autopsy/SKILL.md +335 -259
- package/skills/autopsy/references/repo-analysis-patterns.md +113 -0
- package/skills/ba/SKILL.md +72 -2
- package/skills/brainstorm/SKILL.md +342 -341
- package/skills/browser-pilot/SKILL.md +168 -168
- package/skills/constraint-check/SKILL.md +165 -165
- package/skills/context-engine/SKILL.md +404 -404
- package/skills/cook/SKILL.md +917 -834
- package/skills/cook/references/output-format.md +33 -0
- package/skills/db/SKILL.md +273 -272
- package/skills/debug/SKILL.md +465 -443
- package/skills/dependency-doctor/SKILL.md +265 -235
- package/skills/deploy/SKILL.md +274 -231
- package/skills/design/DESIGN-REFERENCE.md +365 -365
- package/skills/design/SKILL.md +589 -482
- package/skills/doc-processor/SKILL.md +254 -254
- package/skills/docs/SKILL.md +374 -373
- package/skills/docs-seeker/SKILL.md +177 -177
- package/skills/fix/SKILL.md +330 -308
- package/skills/git/SKILL.md +339 -339
- package/skills/graft/SKILL.md +352 -0
- package/skills/graft/references/challenge-framework.md +98 -0
- package/skills/graft/references/mode-decision.md +44 -0
- package/skills/hallucination-guard/SKILL.md +219 -219
- package/skills/incident/SKILL.md +254 -251
- package/skills/integrity-check/SKILL.md +169 -169
- package/skills/journal/SKILL.md +240 -238
- package/skills/launch/SKILL.md +344 -342
- package/skills/logic-guardian/SKILL.md +251 -251
- package/skills/marketing/SKILL.md +290 -245
- package/skills/mcp-builder/SKILL.md +425 -423
- package/skills/mcp-builder/references/auto-discovery-pattern.md +169 -0
- package/skills/neural-memory/SKILL.md +362 -362
- package/skills/onboard/SKILL.md +404 -403
- package/skills/perf/SKILL.md +346 -346
- package/skills/plan/SKILL.md +433 -370
- package/skills/plan/references/feature-map.md +84 -0
- package/skills/preflight/SKILL.md +415 -396
- package/skills/problem-solver/SKILL.md +380 -284
- package/skills/rescue/SKILL.md +474 -450
- package/skills/retro/SKILL.md +5 -1
- package/skills/review/SKILL.md +612 -535
- package/skills/review-intake/SKILL.md +249 -249
- package/skills/safeguard/SKILL.md +200 -200
- package/skills/sast/SKILL.md +190 -190
- package/skills/scaffold/SKILL.md +328 -286
- package/skills/scope-guard/SKILL.md +180 -162
- package/skills/scout/SKILL.md +263 -263
- package/skills/sentinel/SKILL.md +382 -353
- package/skills/sentinel-env/SKILL.md +254 -254
- package/skills/sequential-thinking/SKILL.md +234 -234
- package/skills/session-bridge/SKILL.md +543 -397
- package/skills/skill-forge/SKILL.md +581 -539
- package/skills/skill-router/{skill.md → SKILL.md} +30 -2
- package/skills/surgeon/SKILL.md +215 -215
- package/skills/team/SKILL.md +556 -514
- package/skills/test/SKILL.md +614 -587
- package/skills/trend-scout/SKILL.md +145 -145
- package/skills/verification/SKILL.md +326 -325
- package/skills/video-creator/SKILL.md +201 -201
- package/skills/watchdog/SKILL.md +168 -168
- package/skills/worktree/SKILL.md +140 -140
|
@@ -1,93 +1,93 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: "@rune/chrome-ext"
|
|
3
|
-
description: Chrome extension development patterns — Manifest V3 scaffolding, service worker lifecycle, message passing, storage patterns, Chrome Web Store compliance, and built-in AI integration.
|
|
4
|
-
metadata:
|
|
5
|
-
author: runedev
|
|
6
|
-
version: "0.1.0"
|
|
7
|
-
layer: L4
|
|
8
|
-
price: "free"
|
|
9
|
-
target: Chrome extension developers
|
|
10
|
-
format: split
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
# @rune/chrome-ext
|
|
14
|
-
|
|
15
|
-
## Purpose
|
|
16
|
-
|
|
17
|
-
Chrome extension development has a steep cliff of Manifest V3 gotchas that no other AI coding pack addresses. Service workers terminate silently after 30 seconds of idle, taking all JS-variable state with them. Fifty-eight percent of Chrome Web Store rejections are preventable compliance errors. The new Chrome AI APIs (Gemini Nano, Chrome 138+) require hardware checks, graceful fallbacks, and port-based streaming — none of which are obvious from the docs. This pack groups six tightly-coupled concerns — MV3 scaffolding, message passing, storage, CWS preflight, store listing, and built-in AI — because a gap in any single layer produces a broken, rejected, or battery-draining extension. Activates automatically when `manifest.json` with `manifest_version: 3` or `chrome.*` API usage is detected.
|
|
18
|
-
|
|
19
|
-
## Triggers
|
|
20
|
-
|
|
21
|
-
- Auto-trigger: when `manifest.json` containing `"manifest_version": 3` is found in project root or `src/`
|
|
22
|
-
- Auto-trigger: when files matching `**/background.ts`, `**/service-worker.ts`, `**/content.ts`, `**/popup.ts` exist alongside a `manifest.json`
|
|
23
|
-
- Auto-trigger: when `chrome.*` API calls are found in project source files
|
|
24
|
-
- `/rune chrome-ext` — manual invocation
|
|
25
|
-
- Called by `cook` (L1) when Chrome extension project context is detected
|
|
26
|
-
- Called by `scaffold` (L1) when user requests a new browser extension project
|
|
27
|
-
|
|
28
|
-
## Skills Included
|
|
29
|
-
|
|
30
|
-
| Skill | Model | Description |
|
|
31
|
-
|-------|-------|-------------|
|
|
32
|
-
| [mv3-scaffold](skills/mv3-scaffold.md) | sonnet | Manifest V3 project scaffolding — detect extension type, generate minimal-permission manifest, scaffold service worker with correct lifecycle patterns, scaffold content script, and generate build config. |
|
|
33
|
-
| [ext-messaging](skills/ext-messaging.md) | sonnet | Typed message passing between popup, service worker, and content script — discriminated union message types, one-shot sendMessage, long-lived port connections for streaming, and Chrome 146+ error handling. |
|
|
34
|
-
| [ext-storage](skills/ext-storage.md) | sonnet | Typed Chrome storage patterns — choose the right storage tier, define schema, implement typed helpers, handle schema migrations, and monitor quota. |
|
|
35
|
-
| [cws-preflight](skills/cws-preflight.md) | sonnet | Chrome Web Store compliance audit — scan for over-permissioning, remote code execution, CSP violations, missing assets, and generate permission justification text. |
|
|
36
|
-
| [cws-publish](skills/cws-publish.md) | sonnet | Chrome Web Store listing preparation and submission guide — store listing copy, screenshot descriptions, permission justifications, visibility settings, and timeline expectations. |
|
|
37
|
-
| [ext-ai-integration](skills/ext-ai-integration.md) | sonnet | Chrome built-in AI and external API integration — detect AI type, check hardware requirements, implement Gemini Nano with graceful fallback, wire streaming responses via ports, handle rate limits, and test offline behavior. |
|
|
38
|
-
|
|
39
|
-
## Tech Stack Support
|
|
40
|
-
|
|
41
|
-
| Build Tool | Plugin | Hot Reload | Notes |
|
|
42
|
-
|------------|--------|------------|-------|
|
|
43
|
-
| Vite 5 | @crxjs/vite-plugin | Yes | Best DX — recommended for MV3 |
|
|
44
|
-
| Webpack 5 | chrome-extension-webpack | Partial | Mature, more config overhead |
|
|
45
|
-
| Parcel 2 | @parcel/config-webextension | Yes | Zero-config option |
|
|
46
|
-
| Vanilla tsc | Manual copy scripts | No | Fine for simple extensions |
|
|
47
|
-
|
|
48
|
-
| API | Min Chrome Version | Notes |
|
|
49
|
-
|-----|-------------------|-------|
|
|
50
|
-
| chrome.sidePanel | 114 | Sidebar panel (replaces popup for persistent UI) |
|
|
51
|
-
| chrome.aiLanguageModel | 138 | Gemini Nano — built-in LLM |
|
|
52
|
-
| chrome.aiSummarizer | 138 | Specialized summarization API |
|
|
53
|
-
| chrome.offscreen | 109 | Background DOM/audio access workaround |
|
|
54
|
-
| chrome.storage.session | 102 | Session storage surviving SW termination |
|
|
55
|
-
|
|
56
|
-
## Connections
|
|
57
|
-
|
|
58
|
-
```
|
|
59
|
-
Calls → sentinel (L2): security audit on permissions, CSP, and storage patterns
|
|
60
|
-
Calls → verification (L3): validate TypeScript types, run extension build
|
|
61
|
-
Calls → git (L3): semantic commit after scaffold or publish prep
|
|
62
|
-
Called By ← cook (L1): when Chrome extension project context detected
|
|
63
|
-
Called By ← scaffold (L1): when user requests new browser extension project
|
|
64
|
-
Called By ← launch (L1): pre-flight check before CWS submission
|
|
65
|
-
Called By ← preflight (L2): runs cws-preflight as part of broader pre-deploy audit
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
## Sharp Edges
|
|
69
|
-
|
|
70
|
-
| Failure Mode | Severity | Mitigation |
|
|
71
|
-
|---|---|---|
|
|
72
|
-
| Event listener registered inside `addEventListener('load', ...)` or async IIFE — silently ignored after SW termination | CRITICAL | Grep for `onMessage.addListener` not at module top level; scaffold always generates top-level listeners |
|
|
73
|
-
| `setTimeout` keepalive hack breaks on Chrome 119+ — Chrome patched the timeout extension trick | HIGH | Use `chrome.alarms` for periodic work; use `chrome.storage.session` for state; never rely on SW staying alive |
|
|
74
|
-
| `sendMessage` returns `undefined` when no listener responds — mistaken for success | HIGH | Check `chrome.runtime.lastError` in callback; use typed response interface that includes `error?: string` |
|
|
75
|
-
| Streaming AI returns cumulative text (not delta chunks) — UI duplicates content | HIGH | Slice previous from current: `const delta = chunk.slice(prev.length); prev = chunk` |
|
|
76
|
-
| `chrome.tabs.sendMessage` throws when content script not yet injected or tab is restricted | HIGH | Wrap in try/catch; check `sender.tab` exists; use `executeScript` to inject first if needed |
|
|
77
|
-
| Extension passes local testing but fails CWS review for `eval()` in bundled node_modules | CRITICAL | Run `grep -r "eval(" node_modules/` before submission; replace or patch offending dependency |
|
|
78
|
-
|
|
79
|
-
## Done When
|
|
80
|
-
|
|
81
|
-
- `manifest.json` has no declared permissions absent from source code (verified by Grep)
|
|
82
|
-
- Service worker registers all listeners synchronously at module top level — no listener inside async function
|
|
83
|
-
- `chrome.storage` is used for all state — no JS variables relied upon to survive termination
|
|
84
|
-
- No `eval()`, `Function()`, remote `<script>` tags, or external `import()` in any source or bundled file
|
|
85
|
-
- `cws-preflight` report shows no FAIL items and WARN items are reviewed
|
|
86
|
-
- `chrome.aiLanguageModel.capabilities()` is checked before use and graceful fallback is implemented
|
|
87
|
-
- Streaming AI uses port-based messaging and correctly extracts deltas from cumulative chunks
|
|
88
|
-
- Store listing copy is under character limits, permission justifications are written in plain English
|
|
89
|
-
- Extension loads in Chrome via `chrome://extensions → Load unpacked` without errors
|
|
90
|
-
|
|
91
|
-
## Cost Profile
|
|
92
|
-
|
|
93
|
-
~1,500–3,000 tokens per skill activation. `haiku` for file scans (Grep, Glob, manifest reading); `sonnet` for scaffold generation, storage schema, and message type definitions; `sonnet` for cws-preflight audit and store listing copy; `sonnet` for AI integration wiring. Full pack activation (all 6 skills) runs ~12,000–18,000 tokens end-to-end. `cws-preflight` is the heaviest single skill (~3,000 tokens) due to multi-pass scanning.
|
|
1
|
+
---
|
|
2
|
+
name: "@rune/chrome-ext"
|
|
3
|
+
description: Chrome extension development patterns — Manifest V3 scaffolding, service worker lifecycle, message passing, storage patterns, Chrome Web Store compliance, and built-in AI integration.
|
|
4
|
+
metadata:
|
|
5
|
+
author: runedev
|
|
6
|
+
version: "0.1.0"
|
|
7
|
+
layer: L4
|
|
8
|
+
price: "free"
|
|
9
|
+
target: Chrome extension developers
|
|
10
|
+
format: split
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# @rune/chrome-ext
|
|
14
|
+
|
|
15
|
+
## Purpose
|
|
16
|
+
|
|
17
|
+
Chrome extension development has a steep cliff of Manifest V3 gotchas that no other AI coding pack addresses. Service workers terminate silently after 30 seconds of idle, taking all JS-variable state with them. Fifty-eight percent of Chrome Web Store rejections are preventable compliance errors. The new Chrome AI APIs (Gemini Nano, Chrome 138+) require hardware checks, graceful fallbacks, and port-based streaming — none of which are obvious from the docs. This pack groups six tightly-coupled concerns — MV3 scaffolding, message passing, storage, CWS preflight, store listing, and built-in AI — because a gap in any single layer produces a broken, rejected, or battery-draining extension. Activates automatically when `manifest.json` with `manifest_version: 3` or `chrome.*` API usage is detected.
|
|
18
|
+
|
|
19
|
+
## Triggers
|
|
20
|
+
|
|
21
|
+
- Auto-trigger: when `manifest.json` containing `"manifest_version": 3` is found in project root or `src/`
|
|
22
|
+
- Auto-trigger: when files matching `**/background.ts`, `**/service-worker.ts`, `**/content.ts`, `**/popup.ts` exist alongside a `manifest.json`
|
|
23
|
+
- Auto-trigger: when `chrome.*` API calls are found in project source files
|
|
24
|
+
- `/rune chrome-ext` — manual invocation
|
|
25
|
+
- Called by `cook` (L1) when Chrome extension project context is detected
|
|
26
|
+
- Called by `scaffold` (L1) when user requests a new browser extension project
|
|
27
|
+
|
|
28
|
+
## Skills Included
|
|
29
|
+
|
|
30
|
+
| Skill | Model | Description |
|
|
31
|
+
|-------|-------|-------------|
|
|
32
|
+
| [mv3-scaffold](skills/mv3-scaffold.md) | sonnet | Manifest V3 project scaffolding — detect extension type, generate minimal-permission manifest, scaffold service worker with correct lifecycle patterns, scaffold content script, and generate build config. |
|
|
33
|
+
| [ext-messaging](skills/ext-messaging.md) | sonnet | Typed message passing between popup, service worker, and content script — discriminated union message types, one-shot sendMessage, long-lived port connections for streaming, and Chrome 146+ error handling. |
|
|
34
|
+
| [ext-storage](skills/ext-storage.md) | sonnet | Typed Chrome storage patterns — choose the right storage tier, define schema, implement typed helpers, handle schema migrations, and monitor quota. |
|
|
35
|
+
| [cws-preflight](skills/cws-preflight.md) | sonnet | Chrome Web Store compliance audit — scan for over-permissioning, remote code execution, CSP violations, missing assets, and generate permission justification text. |
|
|
36
|
+
| [cws-publish](skills/cws-publish.md) | sonnet | Chrome Web Store listing preparation and submission guide — store listing copy, screenshot descriptions, permission justifications, visibility settings, and timeline expectations. |
|
|
37
|
+
| [ext-ai-integration](skills/ext-ai-integration.md) | sonnet | Chrome built-in AI and external API integration — detect AI type, check hardware requirements, implement Gemini Nano with graceful fallback, wire streaming responses via ports, handle rate limits, and test offline behavior. |
|
|
38
|
+
|
|
39
|
+
## Tech Stack Support
|
|
40
|
+
|
|
41
|
+
| Build Tool | Plugin | Hot Reload | Notes |
|
|
42
|
+
|------------|--------|------------|-------|
|
|
43
|
+
| Vite 5 | @crxjs/vite-plugin | Yes | Best DX — recommended for MV3 |
|
|
44
|
+
| Webpack 5 | chrome-extension-webpack | Partial | Mature, more config overhead |
|
|
45
|
+
| Parcel 2 | @parcel/config-webextension | Yes | Zero-config option |
|
|
46
|
+
| Vanilla tsc | Manual copy scripts | No | Fine for simple extensions |
|
|
47
|
+
|
|
48
|
+
| API | Min Chrome Version | Notes |
|
|
49
|
+
|-----|-------------------|-------|
|
|
50
|
+
| chrome.sidePanel | 114 | Sidebar panel (replaces popup for persistent UI) |
|
|
51
|
+
| chrome.aiLanguageModel | 138 | Gemini Nano — built-in LLM |
|
|
52
|
+
| chrome.aiSummarizer | 138 | Specialized summarization API |
|
|
53
|
+
| chrome.offscreen | 109 | Background DOM/audio access workaround |
|
|
54
|
+
| chrome.storage.session | 102 | Session storage surviving SW termination |
|
|
55
|
+
|
|
56
|
+
## Connections
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
Calls → sentinel (L2): security audit on permissions, CSP, and storage patterns
|
|
60
|
+
Calls → verification (L3): validate TypeScript types, run extension build
|
|
61
|
+
Calls → git (L3): semantic commit after scaffold or publish prep
|
|
62
|
+
Called By ← cook (L1): when Chrome extension project context detected
|
|
63
|
+
Called By ← scaffold (L1): when user requests new browser extension project
|
|
64
|
+
Called By ← launch (L1): pre-flight check before CWS submission
|
|
65
|
+
Called By ← preflight (L2): runs cws-preflight as part of broader pre-deploy audit
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Sharp Edges
|
|
69
|
+
|
|
70
|
+
| Failure Mode | Severity | Mitigation |
|
|
71
|
+
|---|---|---|
|
|
72
|
+
| Event listener registered inside `addEventListener('load', ...)` or async IIFE — silently ignored after SW termination | CRITICAL | Grep for `onMessage.addListener` not at module top level; scaffold always generates top-level listeners |
|
|
73
|
+
| `setTimeout` keepalive hack breaks on Chrome 119+ — Chrome patched the timeout extension trick | HIGH | Use `chrome.alarms` for periodic work; use `chrome.storage.session` for state; never rely on SW staying alive |
|
|
74
|
+
| `sendMessage` returns `undefined` when no listener responds — mistaken for success | HIGH | Check `chrome.runtime.lastError` in callback; use typed response interface that includes `error?: string` |
|
|
75
|
+
| Streaming AI returns cumulative text (not delta chunks) — UI duplicates content | HIGH | Slice previous from current: `const delta = chunk.slice(prev.length); prev = chunk` |
|
|
76
|
+
| `chrome.tabs.sendMessage` throws when content script not yet injected or tab is restricted | HIGH | Wrap in try/catch; check `sender.tab` exists; use `executeScript` to inject first if needed |
|
|
77
|
+
| Extension passes local testing but fails CWS review for `eval()` in bundled node_modules | CRITICAL | Run `grep -r "eval(" node_modules/` before submission; replace or patch offending dependency |
|
|
78
|
+
|
|
79
|
+
## Done When
|
|
80
|
+
|
|
81
|
+
- `manifest.json` has no declared permissions absent from source code (verified by Grep)
|
|
82
|
+
- Service worker registers all listeners synchronously at module top level — no listener inside async function
|
|
83
|
+
- `chrome.storage` is used for all state — no JS variables relied upon to survive termination
|
|
84
|
+
- No `eval()`, `Function()`, remote `<script>` tags, or external `import()` in any source or bundled file
|
|
85
|
+
- `cws-preflight` report shows no FAIL items and WARN items are reviewed
|
|
86
|
+
- `chrome.aiLanguageModel.capabilities()` is checked before use and graceful fallback is implemented
|
|
87
|
+
- Streaming AI uses port-based messaging and correctly extracts deltas from cumulative chunks
|
|
88
|
+
- Store listing copy is under character limits, permission justifications are written in plain English
|
|
89
|
+
- Extension loads in Chrome via `chrome://extensions → Load unpacked` without errors
|
|
90
|
+
|
|
91
|
+
## Cost Profile
|
|
92
|
+
|
|
93
|
+
~1,500–3,000 tokens per skill activation. `haiku` for file scans (Grep, Glob, manifest reading); `sonnet` for scaffold generation, storage schema, and message type definitions; `sonnet` for cws-preflight audit and store listing copy; `sonnet` for AI integration wiring. Full pack activation (all 6 skills) runs ~12,000–18,000 tokens end-to-end. `cws-preflight` is the heaviest single skill (~3,000 tokens) due to multi-pass scanning.
|
|
@@ -1,143 +1,143 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: "cws-preflight"
|
|
3
|
-
pack: "@rune/chrome-ext"
|
|
4
|
-
description: "Chrome Web Store compliance audit — scan for over-permissioning, remote code execution, CSP violations, missing assets, and generate permission justification text."
|
|
5
|
-
model: sonnet
|
|
6
|
-
tools: [Read, Edit, Write, Grep, Glob, Bash]
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# cws-preflight
|
|
10
|
-
|
|
11
|
-
Chrome Web Store compliance audit — scan for over-permissioning, remote code execution, CSP violations, missing assets, and generate permission justification text. The highest-value skill in this pack: 58% of CWS rejections are preventable compliance errors caught here before submission.
|
|
12
|
-
|
|
13
|
-
**Top 5 CWS rejection reasons (2024 data):**
|
|
14
|
-
1. Over-permissioning — requesting permissions not demonstrably used in submitted code
|
|
15
|
-
2. Remote code execution — `eval()`, `Function()` constructor, CDN `<script>` tags, `import()` from external URLs
|
|
16
|
-
3. Misleading description — functionality not matching store listing claims
|
|
17
|
-
4. Missing or inaccessible privacy policy — required for any extension that handles user data
|
|
18
|
-
5. Branding violations — trademarked names (Google, Chrome, YouTube) in extension name or icon
|
|
19
|
-
|
|
20
|
-
**Triggers for manual review (3+ weeks instead of 24-72h):**
|
|
21
|
-
- Broad `host_permissions` with `<all_urls>` or `https://*/*`
|
|
22
|
-
- Sensitive permission combinations: `tabs` + `history` + `cookies`
|
|
23
|
-
- New developer account submitting extension with sensitive permissions
|
|
24
|
-
- Relaxed `content_security_policy` (`unsafe-eval`, `unsafe-inline`)
|
|
25
|
-
- First submission of a new extension (always manual)
|
|
26
|
-
|
|
27
|
-
#### Workflow
|
|
28
|
-
|
|
29
|
-
**Step 1 — Lint manifest for over-permissioning**
|
|
30
|
-
Use `Read` on `manifest.json`. For each declared permission, verify it is actually used in source code with `Grep`. Flag any permission declared but not found in `*.ts` / `*.js` source files. Severity: HIGH.
|
|
31
|
-
|
|
32
|
-
Common over-permissioning patterns to flag:
|
|
33
|
-
- `"tabs"` declared when only `activeTab` is needed (activeTab is granted on user click, requires no declaration)
|
|
34
|
-
- `"history"` declared without `chrome.history.*` usage
|
|
35
|
-
- `"bookmarks"` declared without `chrome.bookmarks.*` usage
|
|
36
|
-
- `"<all_urls>"` in `host_permissions` when specific domains suffice
|
|
37
|
-
- `"cookies"` declared without `chrome.cookies.*` usage
|
|
38
|
-
|
|
39
|
-
**Step 2 — Scan for remote code execution**
|
|
40
|
-
Use `Grep` to find patterns that trigger automatic CWS rejection:
|
|
41
|
-
|
|
42
|
-
```
|
|
43
|
-
pattern: "eval\s*\(" → remote code execution
|
|
44
|
-
pattern: "new Function\s*\(" → remote code execution
|
|
45
|
-
pattern: "<script[^>]+src=['\"]https?://" → remote script loading in HTML files
|
|
46
|
-
pattern: "import\s*\(['\"]https?://" → dynamic import from external URL
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
Flag each result as CRITICAL — these cause automatic rejection with no appeal path.
|
|
50
|
-
|
|
51
|
-
**Step 3 — Validate Content Security Policy**
|
|
52
|
-
Read the `content_security_policy.extension_pages` value from `manifest.json`. Flag any of:
|
|
53
|
-
- `'unsafe-eval'` in `script-src` — allows eval, triggers rejection
|
|
54
|
-
- `'unsafe-inline'` in `script-src` — allows inline scripts, triggers rejection
|
|
55
|
-
- External domains in `script-src` (anything not `'self'`) — remote code execution risk
|
|
56
|
-
- Missing CSP entirely — defaults to `script-src 'self'` which is fine, but document it
|
|
57
|
-
|
|
58
|
-
**Step 4 — Verify privacy policy**
|
|
59
|
-
Check if the extension collects user data (network requests to external servers, `chrome.storage` usage, content script reading page content). If yes:
|
|
60
|
-
- Privacy policy URL must be set in CWS Developer Dashboard
|
|
61
|
-
- Privacy policy must be publicly accessible (verify URL is live)
|
|
62
|
-
- Generate a minimal privacy policy template if none exists
|
|
63
|
-
|
|
64
|
-
**Step 5 — Check required assets**
|
|
65
|
-
Verify the following exist at declared paths in `manifest.json`:
|
|
66
|
-
- Icon at 128×128px (required for store listing)
|
|
67
|
-
- Screenshots: at least 1, dimensions 1280×800 or 640×400 (PNG or JPEG)
|
|
68
|
-
- Promotional tile: 440×280px (optional but strongly recommended)
|
|
69
|
-
- All declared icons (16, 32, 48, 128px) present at referenced paths
|
|
70
|
-
|
|
71
|
-
Use `Glob` to verify file existence. Use `Bash` to check image dimensions with `file` or `identify` if ImageMagick is available.
|
|
72
|
-
|
|
73
|
-
**Step 6 — Generate permission justification text**
|
|
74
|
-
For each declared permission, generate CWS-ready justification text. The CWS dashboard requires one justification per permission. Justifications must be specific — "We need this to work" is rejected.
|
|
75
|
-
|
|
76
|
-
**Step 7 — Produce preflight report**
|
|
77
|
-
Write `.rune/chrome-ext/preflight-report.md` with:
|
|
78
|
-
- PASS / WARN / FAIL per check
|
|
79
|
-
- Specific file + line for each issue
|
|
80
|
-
- Fix instructions
|
|
81
|
-
- Estimated review timeline (fast-track vs manual review triggers)
|
|
82
|
-
- Submission checklist
|
|
83
|
-
|
|
84
|
-
#### Example
|
|
85
|
-
|
|
86
|
-
```markdown
|
|
87
|
-
<!-- .rune/chrome-ext/preflight-report.md (generated by cws-preflight) -->
|
|
88
|
-
|
|
89
|
-
# CWS Preflight Report — Page Summarizer v1.0.0
|
|
90
|
-
Generated: 2026-03-12
|
|
91
|
-
|
|
92
|
-
## Summary
|
|
93
|
-
| Check | Status | Issues |
|
|
94
|
-
|-------|--------|--------|
|
|
95
|
-
| Permissions audit | ⚠️ WARN | 1 over-permission |
|
|
96
|
-
| Remote code execution | ✅ PASS | None found |
|
|
97
|
-
| Content Security Policy | ✅ PASS | Correct default |
|
|
98
|
-
| Privacy policy | ⚠️ WARN | URL not set in manifest |
|
|
99
|
-
| Required assets | ✅ PASS | All present |
|
|
100
|
-
| Permission justifications | ✅ READY | Generated below |
|
|
101
|
-
|
|
102
|
-
## Issues
|
|
103
|
-
|
|
104
|
-
### WARN: Over-permission — `"tabs"` not required
|
|
105
|
-
**File**: manifest.json line 7
|
|
106
|
-
**Detail**: `"tabs"` permission is declared but no `chrome.tabs.*` API calls found in source.
|
|
107
|
-
The extension uses `activeTab` (implicit on action click) — remove `"tabs"` from permissions array.
|
|
108
|
-
**Fix**: Remove `"tabs"` from `"permissions"` array.
|
|
109
|
-
|
|
110
|
-
### WARN: Privacy policy URL missing
|
|
111
|
-
**Detail**: Extension reads page content via content script (content.ts:L12 — `document.body.innerText`).
|
|
112
|
-
This constitutes user data handling and requires a privacy policy URL in the CWS Developer Dashboard.
|
|
113
|
-
**Fix**: Add privacy policy URL at publish time. Template: `.rune/chrome-ext/privacy-policy-template.md`
|
|
114
|
-
|
|
115
|
-
## Permission Justifications (paste into CWS dashboard)
|
|
116
|
-
|
|
117
|
-
### activeTab
|
|
118
|
-
"The extension reads the content of the current active tab when the user clicks the toolbar button
|
|
119
|
-
to initiate a summarization. No data is collected without explicit user action."
|
|
120
|
-
|
|
121
|
-
### storage
|
|
122
|
-
"The extension stores user settings (AI preference, API key, summary length) locally to persist
|
|
123
|
-
preferences between browser sessions. No data is synced externally."
|
|
124
|
-
|
|
125
|
-
### sidePanel
|
|
126
|
-
"The extension uses the Side Panel API to display AI-generated summaries in a persistent panel
|
|
127
|
-
without obscuring the page content."
|
|
128
|
-
|
|
129
|
-
## Estimated Review Timeline
|
|
130
|
-
- No sensitive permissions detected
|
|
131
|
-
- No broad host_permissions
|
|
132
|
-
- Timeline: **24–72 hours** (standard review)
|
|
133
|
-
- Recommendation: submit Tuesday–Thursday for fastest turnaround
|
|
134
|
-
|
|
135
|
-
## Submission Checklist
|
|
136
|
-
- [ ] Remove `"tabs"` from permissions array
|
|
137
|
-
- [ ] Add privacy policy URL to CWS Developer Dashboard
|
|
138
|
-
- [ ] Upload 1280×800 screenshot showing extension in use
|
|
139
|
-
- [ ] Write store description (min 132 chars for detailed description)
|
|
140
|
-
- [ ] Set category: Productivity
|
|
141
|
-
- [ ] Set language: English
|
|
142
|
-
- [ ] $5 one-time developer registration fee paid
|
|
143
|
-
```
|
|
1
|
+
---
|
|
2
|
+
name: "cws-preflight"
|
|
3
|
+
pack: "@rune/chrome-ext"
|
|
4
|
+
description: "Chrome Web Store compliance audit — scan for over-permissioning, remote code execution, CSP violations, missing assets, and generate permission justification text."
|
|
5
|
+
model: sonnet
|
|
6
|
+
tools: [Read, Edit, Write, Grep, Glob, Bash]
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# cws-preflight
|
|
10
|
+
|
|
11
|
+
Chrome Web Store compliance audit — scan for over-permissioning, remote code execution, CSP violations, missing assets, and generate permission justification text. The highest-value skill in this pack: 58% of CWS rejections are preventable compliance errors caught here before submission.
|
|
12
|
+
|
|
13
|
+
**Top 5 CWS rejection reasons (2024 data):**
|
|
14
|
+
1. Over-permissioning — requesting permissions not demonstrably used in submitted code
|
|
15
|
+
2. Remote code execution — `eval()`, `Function()` constructor, CDN `<script>` tags, `import()` from external URLs
|
|
16
|
+
3. Misleading description — functionality not matching store listing claims
|
|
17
|
+
4. Missing or inaccessible privacy policy — required for any extension that handles user data
|
|
18
|
+
5. Branding violations — trademarked names (Google, Chrome, YouTube) in extension name or icon
|
|
19
|
+
|
|
20
|
+
**Triggers for manual review (3+ weeks instead of 24-72h):**
|
|
21
|
+
- Broad `host_permissions` with `<all_urls>` or `https://*/*`
|
|
22
|
+
- Sensitive permission combinations: `tabs` + `history` + `cookies`
|
|
23
|
+
- New developer account submitting extension with sensitive permissions
|
|
24
|
+
- Relaxed `content_security_policy` (`unsafe-eval`, `unsafe-inline`)
|
|
25
|
+
- First submission of a new extension (always manual)
|
|
26
|
+
|
|
27
|
+
#### Workflow
|
|
28
|
+
|
|
29
|
+
**Step 1 — Lint manifest for over-permissioning**
|
|
30
|
+
Use `Read` on `manifest.json`. For each declared permission, verify it is actually used in source code with `Grep`. Flag any permission declared but not found in `*.ts` / `*.js` source files. Severity: HIGH.
|
|
31
|
+
|
|
32
|
+
Common over-permissioning patterns to flag:
|
|
33
|
+
- `"tabs"` declared when only `activeTab` is needed (activeTab is granted on user click, requires no declaration)
|
|
34
|
+
- `"history"` declared without `chrome.history.*` usage
|
|
35
|
+
- `"bookmarks"` declared without `chrome.bookmarks.*` usage
|
|
36
|
+
- `"<all_urls>"` in `host_permissions` when specific domains suffice
|
|
37
|
+
- `"cookies"` declared without `chrome.cookies.*` usage
|
|
38
|
+
|
|
39
|
+
**Step 2 — Scan for remote code execution**
|
|
40
|
+
Use `Grep` to find patterns that trigger automatic CWS rejection:
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
pattern: "eval\s*\(" → remote code execution
|
|
44
|
+
pattern: "new Function\s*\(" → remote code execution
|
|
45
|
+
pattern: "<script[^>]+src=['\"]https?://" → remote script loading in HTML files
|
|
46
|
+
pattern: "import\s*\(['\"]https?://" → dynamic import from external URL
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Flag each result as CRITICAL — these cause automatic rejection with no appeal path.
|
|
50
|
+
|
|
51
|
+
**Step 3 — Validate Content Security Policy**
|
|
52
|
+
Read the `content_security_policy.extension_pages` value from `manifest.json`. Flag any of:
|
|
53
|
+
- `'unsafe-eval'` in `script-src` — allows eval, triggers rejection
|
|
54
|
+
- `'unsafe-inline'` in `script-src` — allows inline scripts, triggers rejection
|
|
55
|
+
- External domains in `script-src` (anything not `'self'`) — remote code execution risk
|
|
56
|
+
- Missing CSP entirely — defaults to `script-src 'self'` which is fine, but document it
|
|
57
|
+
|
|
58
|
+
**Step 4 — Verify privacy policy**
|
|
59
|
+
Check if the extension collects user data (network requests to external servers, `chrome.storage` usage, content script reading page content). If yes:
|
|
60
|
+
- Privacy policy URL must be set in CWS Developer Dashboard
|
|
61
|
+
- Privacy policy must be publicly accessible (verify URL is live)
|
|
62
|
+
- Generate a minimal privacy policy template if none exists
|
|
63
|
+
|
|
64
|
+
**Step 5 — Check required assets**
|
|
65
|
+
Verify the following exist at declared paths in `manifest.json`:
|
|
66
|
+
- Icon at 128×128px (required for store listing)
|
|
67
|
+
- Screenshots: at least 1, dimensions 1280×800 or 640×400 (PNG or JPEG)
|
|
68
|
+
- Promotional tile: 440×280px (optional but strongly recommended)
|
|
69
|
+
- All declared icons (16, 32, 48, 128px) present at referenced paths
|
|
70
|
+
|
|
71
|
+
Use `Glob` to verify file existence. Use `Bash` to check image dimensions with `file` or `identify` if ImageMagick is available.
|
|
72
|
+
|
|
73
|
+
**Step 6 — Generate permission justification text**
|
|
74
|
+
For each declared permission, generate CWS-ready justification text. The CWS dashboard requires one justification per permission. Justifications must be specific — "We need this to work" is rejected.
|
|
75
|
+
|
|
76
|
+
**Step 7 — Produce preflight report**
|
|
77
|
+
Write `.rune/chrome-ext/preflight-report.md` with:
|
|
78
|
+
- PASS / WARN / FAIL per check
|
|
79
|
+
- Specific file + line for each issue
|
|
80
|
+
- Fix instructions
|
|
81
|
+
- Estimated review timeline (fast-track vs manual review triggers)
|
|
82
|
+
- Submission checklist
|
|
83
|
+
|
|
84
|
+
#### Example
|
|
85
|
+
|
|
86
|
+
```markdown
|
|
87
|
+
<!-- .rune/chrome-ext/preflight-report.md (generated by cws-preflight) -->
|
|
88
|
+
|
|
89
|
+
# CWS Preflight Report — Page Summarizer v1.0.0
|
|
90
|
+
Generated: 2026-03-12
|
|
91
|
+
|
|
92
|
+
## Summary
|
|
93
|
+
| Check | Status | Issues |
|
|
94
|
+
|-------|--------|--------|
|
|
95
|
+
| Permissions audit | ⚠️ WARN | 1 over-permission |
|
|
96
|
+
| Remote code execution | ✅ PASS | None found |
|
|
97
|
+
| Content Security Policy | ✅ PASS | Correct default |
|
|
98
|
+
| Privacy policy | ⚠️ WARN | URL not set in manifest |
|
|
99
|
+
| Required assets | ✅ PASS | All present |
|
|
100
|
+
| Permission justifications | ✅ READY | Generated below |
|
|
101
|
+
|
|
102
|
+
## Issues
|
|
103
|
+
|
|
104
|
+
### WARN: Over-permission — `"tabs"` not required
|
|
105
|
+
**File**: manifest.json line 7
|
|
106
|
+
**Detail**: `"tabs"` permission is declared but no `chrome.tabs.*` API calls found in source.
|
|
107
|
+
The extension uses `activeTab` (implicit on action click) — remove `"tabs"` from permissions array.
|
|
108
|
+
**Fix**: Remove `"tabs"` from `"permissions"` array.
|
|
109
|
+
|
|
110
|
+
### WARN: Privacy policy URL missing
|
|
111
|
+
**Detail**: Extension reads page content via content script (content.ts:L12 — `document.body.innerText`).
|
|
112
|
+
This constitutes user data handling and requires a privacy policy URL in the CWS Developer Dashboard.
|
|
113
|
+
**Fix**: Add privacy policy URL at publish time. Template: `.rune/chrome-ext/privacy-policy-template.md`
|
|
114
|
+
|
|
115
|
+
## Permission Justifications (paste into CWS dashboard)
|
|
116
|
+
|
|
117
|
+
### activeTab
|
|
118
|
+
"The extension reads the content of the current active tab when the user clicks the toolbar button
|
|
119
|
+
to initiate a summarization. No data is collected without explicit user action."
|
|
120
|
+
|
|
121
|
+
### storage
|
|
122
|
+
"The extension stores user settings (AI preference, API key, summary length) locally to persist
|
|
123
|
+
preferences between browser sessions. No data is synced externally."
|
|
124
|
+
|
|
125
|
+
### sidePanel
|
|
126
|
+
"The extension uses the Side Panel API to display AI-generated summaries in a persistent panel
|
|
127
|
+
without obscuring the page content."
|
|
128
|
+
|
|
129
|
+
## Estimated Review Timeline
|
|
130
|
+
- No sensitive permissions detected
|
|
131
|
+
- No broad host_permissions
|
|
132
|
+
- Timeline: **24–72 hours** (standard review)
|
|
133
|
+
- Recommendation: submit Tuesday–Thursday for fastest turnaround
|
|
134
|
+
|
|
135
|
+
## Submission Checklist
|
|
136
|
+
- [ ] Remove `"tabs"` from permissions array
|
|
137
|
+
- [ ] Add privacy policy URL to CWS Developer Dashboard
|
|
138
|
+
- [ ] Upload 1280×800 screenshot showing extension in use
|
|
139
|
+
- [ ] Write store description (min 132 chars for detailed description)
|
|
140
|
+
- [ ] Set category: Productivity
|
|
141
|
+
- [ ] Set language: English
|
|
142
|
+
- [ ] $5 one-time developer registration fee paid
|
|
143
|
+
```
|