mirror of
https://github.com/pbakaus/impeccable.git
synced 2026-09-21 18:47:02 +03:00
Bump skills to 3.0, remove prefixed bundle, redesign install section
- Bump skills plugin version 2.1.1 -> 3.0.0 (plugin.json, marketplace.json, harness SKILL.md files). CLI and Chrome extension unchanged. - Remove prefixed universal zip bundle and all related code: factory.js prefix/outputSuffix options, zip.js variant pass, utils.js prefixSkillReferences, the "universal-prefixed" entry in download-providers.js, and the matching test suite in utils.test.js. - Redesign Get Started step 1 "Install the skill and CLI": two terminal rows (npx skills + npm i -g impeccable) with paired notes, drop the Recommended badge. - Collapse "Other install methods" back into a <details> element so the primary install path is the first thing users see. - Simplify step 3 to "Add the Chrome extension": remove the CLI tool block (now in step 1), use standard .btn .btn-primary for the CTA so it matches other primary buttons (square corners, accent slide-up hover), and lay out the preview screenshot next to the button instead of stacked so the screenshot no longer dominates vertical space. - CLAUDE.md: rewrite with v3.0 architecture, the "no em dash also means no --" rule, the harness-dirs-are-tracked gotcha, the named-export test-spy warning, and the evals inline-skill.ts sync note. - AGENTS.md, DEVELOP.md: drop prefixed variant references. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
b0f44f83c6
commit
2233d82f3a
+3
-39
@@ -380,50 +380,14 @@ export const PROVIDER_PLACEHOLDERS = {
|
||||
/**
|
||||
* Replace all {{placeholder}} tokens with provider-specific values
|
||||
*/
|
||||
/**
|
||||
* Prefix skill cross-references in body text.
|
||||
* Replaces patterns like `/skillname` and `the skillname skill` with prefixed versions.
|
||||
*
|
||||
* @param {string} content - The skill body text
|
||||
* @param {string} prefix - The prefix to add (e.g., 'i-')
|
||||
* @param {string[]} skillNames - Array of all skill names
|
||||
* @param {string} commandPrefix - The command invocation prefix (e.g., '/' or '$')
|
||||
*/
|
||||
export function prefixSkillReferences(content, prefix, skillNames, commandPrefix = '/') {
|
||||
if (!prefix || !skillNames || skillNames.length === 0) return content;
|
||||
|
||||
let result = content;
|
||||
// Sort by length descending to avoid partial matches (e.g. 'teach-impeccable' before 'teach')
|
||||
const sorted = [...skillNames].sort((a, b) => b.length - a.length);
|
||||
|
||||
for (const name of sorted) {
|
||||
const prefixed = `${prefix}${name}`;
|
||||
|
||||
// Replace command invocations (e.g., `/skillname` or `$skillname`) with prefixed versions
|
||||
const escapedPrefix = escapeRegex(commandPrefix);
|
||||
result = result.replace(
|
||||
new RegExp(`${escapedPrefix}(?=${escapeRegex(name)}(?:[^a-zA-Z0-9_-]|$))`, 'g'),
|
||||
`${commandPrefix}${prefix}`
|
||||
);
|
||||
|
||||
// Replace `the skillname skill` references
|
||||
result = result.replace(
|
||||
new RegExp(`(the) ${escapeRegex(name)} skill`, 'gi'),
|
||||
(_, article) => `${article} ${prefixed} skill`
|
||||
);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
function escapeRegex(str) {
|
||||
return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
||||
}
|
||||
|
||||
const EXCLUDED_FROM_SUGGESTIONS = new Set([
|
||||
'impeccable', 'i-impeccable', // foundational skill, not a steering command
|
||||
'teach-impeccable', 'i-teach-impeccable', // deprecated shim
|
||||
'frontend-design', 'i-frontend-design', // deprecated shim
|
||||
'impeccable', // foundational skill, not a steering command
|
||||
'teach-impeccable', // deprecated shim
|
||||
'frontend-design', // deprecated shim
|
||||
]);
|
||||
|
||||
// Sub-commands of /impeccable that should appear in {{available_commands}}.
|
||||
|
||||
Reference in New Issue
Block a user