creating-bookmarklets/SKILL.md
Creates browser-executable JavaScript bookmarklets with strict formatting requirements. Use when users mention bookmarklets, browser utilities, dragging code to bookmarks bar, or need JavaScript that runs when clicked in the browser toolbar.
npx skillsauth add oaustegard/claude-skills creating-bookmarkletsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use ONLY /* */ comments. NEVER use // comments.
Bookmark execution contexts fail with // style. Every comment must use block format.
/* ✓ Correct */
const x = 5; /* inline */
/* ✗ Wrong - breaks bookmarklets */
// const x = 5;
const y = 10; // inline
All bookmarklets must wrap in IIFE:
(function() {
/* bookmarklet code */
})();
All delivered bookmarklets must begin with javascript: protocol:
javascript:(function() {
/* bookmarklet code */
})();
This makes the code immediately usable without requiring manual modification during installation.
Create readable source with:
javascript: protocol to the codeThis version with javascript: prefix gets stored in GitHub and shown to users, making it ready for installation without manual modification.
Default approach - reference installer:
Install: https://austegard.com/web-utilities/bookmarklet-installer.html
Installer handles:
Alternative - generate link programmatically: Use Terser.js to create installable link if requested:
async function createBookmarkletLink(code, title) {
const minified = await Terser.minify(code);
const encoded = encodeURIComponent(minified.code).replace(/'/g, "%27");
return `<a href="javascript:${encoded}">${title}</a>`;
}
Requires: <script src="https://cdn.jsdelivr.net/npm/terser/dist/bundle.min.js"></script>
Always provide:
javascript: protocol prependedThe code should be delivered in a format ready for direct use - users should be able to copy the entire code block (including javascript:) without modification.
(function() {
try {
/* main logic */
} catch (error) {
console.error('Bookmarklet error:', error);
alert('Operation failed: ' + error.message);
}
})();
Include debug traces by default:
console.log('Bookmarklet: Starting');
/* operations */
console.log('Bookmarklet: Complete');
/* Success */
alert('✓ Content copied to clipboard');
/* Error */
alert('✗ Failed to access clipboard');
(function() {
const element = document.querySelector('.target');
if (!element) {
alert('Element not found');
return;
}
/* manipulate element */
})();
(function() {
const data = Array.from(document.querySelectorAll('.item'))
.map(item => ({
title: item.querySelector('.title')?.textContent.trim(),
value: item.querySelector('.value')?.textContent.trim()
}));
console.log('Extracted:', data);
})();
(function() {
const text = 'content to copy';
navigator.clipboard.writeText(text)
.then(() => alert('✓ Copied'))
.catch(err => {
console.error('Clipboard error:', err);
alert('✗ Copy failed');
});
})();
(function() {
if (typeof someLibrary === 'undefined') {
const script = document.createElement('script');
script.src = 'https://cdn.example.com/library.js';
script.onload = function() {
/* proceed with logic */
};
document.head.appendChild(script);
}
})();
Provide fallbacks for unsupported features:
if (!navigator.clipboard) {
alert('Clipboard API not supported');
return;
}
Cannot use:
// style commentsCan use:
Before delivering:
// comments existjavascript:(function() {
/* Pretty-printed bookmarklet code */
})();
Install: https://austegard.com/web-utilities/bookmarklet-installer.html
Extracts all links from current page and copies to clipboard as markdown list. Works on any webpage.
User repository: https://github.com/oaustegard/bookmarklets
Pretty-printed format matches storage requirements. Installer loads directly from this repo.
development
In-process semantic search over text files or in-memory strings, using Gemini embeddings via the CF AI Gateway. Use when user wants fuzzy/conceptual search where exact-keyword grep would miss — "sessions discussing regulatory constraints", "code about retry logic", "notes mentioning burnout even if the word isn't there". Complements searching-codebases (regex/AST) and extracting-keywords (YAKE). Do NOT use when an exact string/regex match is what's wanted — grep/rg wins on speed and precision there.
development
Pre-change blast-radius report for a symbol or file. Walks tree-sitting references, augments with a plain-text scan over non-parsed files (configs, plain docs), and clusters affected sites by feature (`_FEATURES.md`) or top-level package. Use when about to refactor, rename, or delete something in a repo you don't own — "what breaks if I change `validateUser`", "who calls this", "is this safe to remove", "where is this used", "blast radius", "impact analysis". This is the CONVERGENT pre-change risk skill — for "what is this repo?" use exploring-codebases; for "where is X?" use searching-codebases.
development
Check that a document's claims about code are actually true by reading the prose, the code, and the tests and reporting (or fixing) where they disagree. Use whenever the user wants to verify a README, guide, spec, or docstring still matches the code; whenever they mention documentation drift, doc-code sync, "is this still accurate", stale docs, or keeping docs/tests/code consistent; before publishing or merging a docs change; or as a periodic doc-accuracy sweep. The agent reads the prose's meaning directly — there is no claim-comment DSL to maintain. Pairs with TDD — the test suite is the deterministic behavioral gate, this skill is the semantic prose-vs-reality review.
tools
Interpret video content visually by sampling frames into timestamped contact sheets that can be read as images. Use when: user asks what happens in a video; asks to summarize, describe, review, or QA video content or footage; asks about scenes, actions, people, or objects in a video; needs a storyboard-style overview of a clip; asks to find where something occurs in a video. Triggers on 'watch this video', 'what's in this video', 'summarize the video', 'describe the footage', 'contact sheet', 'storyboard', 'review this clip', 'find the scene where', 'scene detection', 'shot boundaries', 'detect cuts', 'dwell points'. For converting, trimming, or transcoding video, use processing-video instead.