creating-bookmarklets — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited creating-bookmarklets (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
*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; // inlineAll 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:
This 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.htmlInstaller 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:
The 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.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.