Skip to content

Commit a6c0905

Browse files
authored
fix(extension): local content extraction for Chrome Web Store approval (#76)
* fix(extension): replace server API with local content extraction Chrome Web Store rejected the extension because the core "Save page as Skill" feature called https://skillkit.sh/api/save-skill which is unreachable during review. This rewires page saving to work entirely locally using chrome.scripting.executeScript to extract page content (title, meta description, headings, body text) directly in the browser. - Remove API_URL and callSaveApi() server dependency - Add extractPageContent() via chrome.scripting.executeScript - Add detectTags() with weighted keyword scoring (URL/headings/body) - Add buildPageSkill() to generate SKILL.md with frontmatter locally - Add scripting permission to manifest - Pass tabId from popup to background for script injection targeting - Block chrome-extension:// and chromewebstore.google.com URLs - Add console.error logging in catch blocks for debuggability - Guard currentTabId validity in popup click handler - Update store listing to reflect fully local processing - Bump version to 1.20.0 * fix(extension): address code review findings for robustness - Extract RESTRICTED_PREFIXES and isRestricted() into shared constants.ts so popup and background use the same URL blocklist - Fix yamlEscape to quote YAML bare scalars (true/false/null/yes/no/on/off) and numeric strings that parsers would coerce to non-string types - Apply yamlEscape to skill name fields in both buildPageSkill and buildSelectionSkill to prevent YAML misinterpretation - Switch tag detection from substring matching to word-boundary regex to eliminate false positives (e.g. "js" matching "adjustments") - Check chrome.runtime.lastError in download callback and always revoke blob URL to prevent leaks on download failure
1 parent 1cb76f9 commit a6c0905

File tree

7 files changed

+347
-122
lines changed

7 files changed

+347
-122
lines changed

packages/extension/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@skillkit/extension",
3-
"version": "1.19.2",
3+
"version": "1.20.0",
44
"private": true,
55
"description": "Chrome extension to save any webpage as an AI agent skill",
66
"type": "module",

0 commit comments

Comments
 (0)