From 1c137cd8d26619115c2925e8c342167b8b3d0bcf Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 2 Sep 2026 00:21:36 +0000 Subject: [PATCH] Sync generated provider output --- .agents/skills/impeccable/SKILL.md | 3 +- .agents/skills/impeccable/scripts/context.mjs | 36 +++++++++++++++++-- .claude/skills/impeccable/scripts/context.mjs | 36 +++++++++++++++++-- .cursor/skills/impeccable/scripts/context.mjs | 36 +++++++++++++++++-- .gemini/skills/impeccable/scripts/context.mjs | 36 +++++++++++++++++-- .github/skills/impeccable/scripts/context.mjs | 36 +++++++++++++++++-- .grok/skills/impeccable/scripts/context.mjs | 36 +++++++++++++++++-- .hermes/skills/impeccable/scripts/context.mjs | 36 +++++++++++++++++-- .kiro/skills/impeccable/scripts/context.mjs | 36 +++++++++++++++++-- .../skills/impeccable/scripts/context.mjs | 36 +++++++++++++++++-- .pi/skills/impeccable/scripts/context.mjs | 36 +++++++++++++++++-- .qoder/skills/impeccable/scripts/context.mjs | 36 +++++++++++++++++-- .../skills/impeccable/scripts/context.mjs | 36 +++++++++++++++++-- .../skills/impeccable/scripts/context.mjs | 36 +++++++++++++++++-- .trae/skills/impeccable/scripts/context.mjs | 36 +++++++++++++++++-- .vibe/skills/impeccable/scripts/context.mjs | 36 +++++++++++++++++-- plugin/skills/impeccable/scripts/context.mjs | 36 +++++++++++++++++-- 17 files changed, 546 insertions(+), 33 deletions(-) diff --git a/.agents/skills/impeccable/SKILL.md b/.agents/skills/impeccable/SKILL.md index ea13a0d42..1b81f8efa 100644 --- a/.agents/skills/impeccable/SKILL.md +++ b/.agents/skills/impeccable/SKILL.md @@ -1,7 +1,8 @@ --- name: impeccable description: Use when the user wants to design, redesign, shape, critique, audit, polish, clarify, distill, harden, optimize, adapt, animate, colorize, extract, or otherwise improve a frontend interface. Covers websites, landing pages, dashboards, product UI, app shells, components, forms, settings, onboarding, and empty states. Handles UX review, visual hierarchy, information architecture, cognitive load, accessibility, performance, responsive behavior, theming, anti-patterns, typography, fonts, spacing, layout, alignment, color, motion, micro-interactions, UX copy, error states, edge cases, i18n, and reusable design systems or tokens. Also use for bland designs that need to become bolder or more delightful, loud designs that should become quieter, live browser iteration on UI elements, or ambitious visual effects that should feel technically extraordinary. Not for backend-only or non-UI tasks. -version: 4.1.2 +metadata: + version: 4.1.2 --- This skill gives you the tools and permission to create design that earns to be called out-of-distribution craft: Whereas before, your design work would have been safe, timid and measured, you now approach every design task as an award-winning design director with impeccable understanding for what makes exceptional design work: production-grade code, peak creativity, a clear POV, deep understanding of the needs of the client and users, and exceptional craft. diff --git a/.agents/skills/impeccable/scripts/context.mjs b/.agents/skills/impeccable/scripts/context.mjs index 41112429a..cb16553c2 100644 --- a/.agents/skills/impeccable/scripts/context.mjs +++ b/.agents/skills/impeccable/scripts/context.mjs @@ -962,13 +962,45 @@ export function extractPlatform(product) { * (this file lives at `/scripts/context.mjs`). Returns null when the * frontmatter is missing or unreadable. */ +function parseSkillFrontmatterVersion(content) { + const match = String(content).match(/^---[ \t]*\r?\n([\s\S]*?)\r?\n---(?:[ \t]*\r?\n|[ \t]*$)/); + if (!match) return null; + + let metadataVersion = null; + let topLevelVersion = null; + let inMetadata = false; + let metadataIndent = null; + + for (const line of match[1].split(/\r?\n/)) { + if (!line.trim() || line.trimStart().startsWith('#')) continue; + const indentText = line.match(/^[ \t]*/)[0]; + const indent = indentText.replace(/\t/g, ' ').length; + + if (indent === 0) { + inMetadata = /^metadata:\s*(?:#.*)?$/.test(line); + metadataIndent = null; + const version = line.match(/^version:\s*(.+?)\s*$/); + if (version) topLevelVersion = version[1]; + continue; + } + + if (!inMetadata) continue; + if (metadataIndent === null) metadataIndent = indent; + if (indent !== metadataIndent) continue; + const version = line.trim().match(/^version:\s*(.+?)\s*$/); + if (version) metadataVersion = version[1]; + } + + const value = metadataVersion || topLevelVersion; + return value ? value.trim().replace(/^(["'])(.*)\1$/, '$2') : null; +} + function readLocalSkillVersion() { try { const here = path.dirname(fileURLToPath(import.meta.url)); const skillMd = path.join(here, '..', 'SKILL.md'); const content = fs.readFileSync(skillMd, 'utf-8'); - const match = content.match(/^version:\s*(.+)$/m); - return match ? match[1].trim().replace(/^["']|["']$/g, '') : null; + return parseSkillFrontmatterVersion(content); } catch { return null; } diff --git a/.claude/skills/impeccable/scripts/context.mjs b/.claude/skills/impeccable/scripts/context.mjs index 41112429a..cb16553c2 100644 --- a/.claude/skills/impeccable/scripts/context.mjs +++ b/.claude/skills/impeccable/scripts/context.mjs @@ -962,13 +962,45 @@ export function extractPlatform(product) { * (this file lives at `/scripts/context.mjs`). Returns null when the * frontmatter is missing or unreadable. */ +function parseSkillFrontmatterVersion(content) { + const match = String(content).match(/^---[ \t]*\r?\n([\s\S]*?)\r?\n---(?:[ \t]*\r?\n|[ \t]*$)/); + if (!match) return null; + + let metadataVersion = null; + let topLevelVersion = null; + let inMetadata = false; + let metadataIndent = null; + + for (const line of match[1].split(/\r?\n/)) { + if (!line.trim() || line.trimStart().startsWith('#')) continue; + const indentText = line.match(/^[ \t]*/)[0]; + const indent = indentText.replace(/\t/g, ' ').length; + + if (indent === 0) { + inMetadata = /^metadata:\s*(?:#.*)?$/.test(line); + metadataIndent = null; + const version = line.match(/^version:\s*(.+?)\s*$/); + if (version) topLevelVersion = version[1]; + continue; + } + + if (!inMetadata) continue; + if (metadataIndent === null) metadataIndent = indent; + if (indent !== metadataIndent) continue; + const version = line.trim().match(/^version:\s*(.+?)\s*$/); + if (version) metadataVersion = version[1]; + } + + const value = metadataVersion || topLevelVersion; + return value ? value.trim().replace(/^(["'])(.*)\1$/, '$2') : null; +} + function readLocalSkillVersion() { try { const here = path.dirname(fileURLToPath(import.meta.url)); const skillMd = path.join(here, '..', 'SKILL.md'); const content = fs.readFileSync(skillMd, 'utf-8'); - const match = content.match(/^version:\s*(.+)$/m); - return match ? match[1].trim().replace(/^["']|["']$/g, '') : null; + return parseSkillFrontmatterVersion(content); } catch { return null; } diff --git a/.cursor/skills/impeccable/scripts/context.mjs b/.cursor/skills/impeccable/scripts/context.mjs index 41112429a..cb16553c2 100644 --- a/.cursor/skills/impeccable/scripts/context.mjs +++ b/.cursor/skills/impeccable/scripts/context.mjs @@ -962,13 +962,45 @@ export function extractPlatform(product) { * (this file lives at `/scripts/context.mjs`). Returns null when the * frontmatter is missing or unreadable. */ +function parseSkillFrontmatterVersion(content) { + const match = String(content).match(/^---[ \t]*\r?\n([\s\S]*?)\r?\n---(?:[ \t]*\r?\n|[ \t]*$)/); + if (!match) return null; + + let metadataVersion = null; + let topLevelVersion = null; + let inMetadata = false; + let metadataIndent = null; + + for (const line of match[1].split(/\r?\n/)) { + if (!line.trim() || line.trimStart().startsWith('#')) continue; + const indentText = line.match(/^[ \t]*/)[0]; + const indent = indentText.replace(/\t/g, ' ').length; + + if (indent === 0) { + inMetadata = /^metadata:\s*(?:#.*)?$/.test(line); + metadataIndent = null; + const version = line.match(/^version:\s*(.+?)\s*$/); + if (version) topLevelVersion = version[1]; + continue; + } + + if (!inMetadata) continue; + if (metadataIndent === null) metadataIndent = indent; + if (indent !== metadataIndent) continue; + const version = line.trim().match(/^version:\s*(.+?)\s*$/); + if (version) metadataVersion = version[1]; + } + + const value = metadataVersion || topLevelVersion; + return value ? value.trim().replace(/^(["'])(.*)\1$/, '$2') : null; +} + function readLocalSkillVersion() { try { const here = path.dirname(fileURLToPath(import.meta.url)); const skillMd = path.join(here, '..', 'SKILL.md'); const content = fs.readFileSync(skillMd, 'utf-8'); - const match = content.match(/^version:\s*(.+)$/m); - return match ? match[1].trim().replace(/^["']|["']$/g, '') : null; + return parseSkillFrontmatterVersion(content); } catch { return null; } diff --git a/.gemini/skills/impeccable/scripts/context.mjs b/.gemini/skills/impeccable/scripts/context.mjs index 41112429a..cb16553c2 100644 --- a/.gemini/skills/impeccable/scripts/context.mjs +++ b/.gemini/skills/impeccable/scripts/context.mjs @@ -962,13 +962,45 @@ export function extractPlatform(product) { * (this file lives at `/scripts/context.mjs`). Returns null when the * frontmatter is missing or unreadable. */ +function parseSkillFrontmatterVersion(content) { + const match = String(content).match(/^---[ \t]*\r?\n([\s\S]*?)\r?\n---(?:[ \t]*\r?\n|[ \t]*$)/); + if (!match) return null; + + let metadataVersion = null; + let topLevelVersion = null; + let inMetadata = false; + let metadataIndent = null; + + for (const line of match[1].split(/\r?\n/)) { + if (!line.trim() || line.trimStart().startsWith('#')) continue; + const indentText = line.match(/^[ \t]*/)[0]; + const indent = indentText.replace(/\t/g, ' ').length; + + if (indent === 0) { + inMetadata = /^metadata:\s*(?:#.*)?$/.test(line); + metadataIndent = null; + const version = line.match(/^version:\s*(.+?)\s*$/); + if (version) topLevelVersion = version[1]; + continue; + } + + if (!inMetadata) continue; + if (metadataIndent === null) metadataIndent = indent; + if (indent !== metadataIndent) continue; + const version = line.trim().match(/^version:\s*(.+?)\s*$/); + if (version) metadataVersion = version[1]; + } + + const value = metadataVersion || topLevelVersion; + return value ? value.trim().replace(/^(["'])(.*)\1$/, '$2') : null; +} + function readLocalSkillVersion() { try { const here = path.dirname(fileURLToPath(import.meta.url)); const skillMd = path.join(here, '..', 'SKILL.md'); const content = fs.readFileSync(skillMd, 'utf-8'); - const match = content.match(/^version:\s*(.+)$/m); - return match ? match[1].trim().replace(/^["']|["']$/g, '') : null; + return parseSkillFrontmatterVersion(content); } catch { return null; } diff --git a/.github/skills/impeccable/scripts/context.mjs b/.github/skills/impeccable/scripts/context.mjs index 41112429a..cb16553c2 100644 --- a/.github/skills/impeccable/scripts/context.mjs +++ b/.github/skills/impeccable/scripts/context.mjs @@ -962,13 +962,45 @@ export function extractPlatform(product) { * (this file lives at `/scripts/context.mjs`). Returns null when the * frontmatter is missing or unreadable. */ +function parseSkillFrontmatterVersion(content) { + const match = String(content).match(/^---[ \t]*\r?\n([\s\S]*?)\r?\n---(?:[ \t]*\r?\n|[ \t]*$)/); + if (!match) return null; + + let metadataVersion = null; + let topLevelVersion = null; + let inMetadata = false; + let metadataIndent = null; + + for (const line of match[1].split(/\r?\n/)) { + if (!line.trim() || line.trimStart().startsWith('#')) continue; + const indentText = line.match(/^[ \t]*/)[0]; + const indent = indentText.replace(/\t/g, ' ').length; + + if (indent === 0) { + inMetadata = /^metadata:\s*(?:#.*)?$/.test(line); + metadataIndent = null; + const version = line.match(/^version:\s*(.+?)\s*$/); + if (version) topLevelVersion = version[1]; + continue; + } + + if (!inMetadata) continue; + if (metadataIndent === null) metadataIndent = indent; + if (indent !== metadataIndent) continue; + const version = line.trim().match(/^version:\s*(.+?)\s*$/); + if (version) metadataVersion = version[1]; + } + + const value = metadataVersion || topLevelVersion; + return value ? value.trim().replace(/^(["'])(.*)\1$/, '$2') : null; +} + function readLocalSkillVersion() { try { const here = path.dirname(fileURLToPath(import.meta.url)); const skillMd = path.join(here, '..', 'SKILL.md'); const content = fs.readFileSync(skillMd, 'utf-8'); - const match = content.match(/^version:\s*(.+)$/m); - return match ? match[1].trim().replace(/^["']|["']$/g, '') : null; + return parseSkillFrontmatterVersion(content); } catch { return null; } diff --git a/.grok/skills/impeccable/scripts/context.mjs b/.grok/skills/impeccable/scripts/context.mjs index 41112429a..cb16553c2 100644 --- a/.grok/skills/impeccable/scripts/context.mjs +++ b/.grok/skills/impeccable/scripts/context.mjs @@ -962,13 +962,45 @@ export function extractPlatform(product) { * (this file lives at `/scripts/context.mjs`). Returns null when the * frontmatter is missing or unreadable. */ +function parseSkillFrontmatterVersion(content) { + const match = String(content).match(/^---[ \t]*\r?\n([\s\S]*?)\r?\n---(?:[ \t]*\r?\n|[ \t]*$)/); + if (!match) return null; + + let metadataVersion = null; + let topLevelVersion = null; + let inMetadata = false; + let metadataIndent = null; + + for (const line of match[1].split(/\r?\n/)) { + if (!line.trim() || line.trimStart().startsWith('#')) continue; + const indentText = line.match(/^[ \t]*/)[0]; + const indent = indentText.replace(/\t/g, ' ').length; + + if (indent === 0) { + inMetadata = /^metadata:\s*(?:#.*)?$/.test(line); + metadataIndent = null; + const version = line.match(/^version:\s*(.+?)\s*$/); + if (version) topLevelVersion = version[1]; + continue; + } + + if (!inMetadata) continue; + if (metadataIndent === null) metadataIndent = indent; + if (indent !== metadataIndent) continue; + const version = line.trim().match(/^version:\s*(.+?)\s*$/); + if (version) metadataVersion = version[1]; + } + + const value = metadataVersion || topLevelVersion; + return value ? value.trim().replace(/^(["'])(.*)\1$/, '$2') : null; +} + function readLocalSkillVersion() { try { const here = path.dirname(fileURLToPath(import.meta.url)); const skillMd = path.join(here, '..', 'SKILL.md'); const content = fs.readFileSync(skillMd, 'utf-8'); - const match = content.match(/^version:\s*(.+)$/m); - return match ? match[1].trim().replace(/^["']|["']$/g, '') : null; + return parseSkillFrontmatterVersion(content); } catch { return null; } diff --git a/.hermes/skills/impeccable/scripts/context.mjs b/.hermes/skills/impeccable/scripts/context.mjs index 41112429a..cb16553c2 100644 --- a/.hermes/skills/impeccable/scripts/context.mjs +++ b/.hermes/skills/impeccable/scripts/context.mjs @@ -962,13 +962,45 @@ export function extractPlatform(product) { * (this file lives at `/scripts/context.mjs`). Returns null when the * frontmatter is missing or unreadable. */ +function parseSkillFrontmatterVersion(content) { + const match = String(content).match(/^---[ \t]*\r?\n([\s\S]*?)\r?\n---(?:[ \t]*\r?\n|[ \t]*$)/); + if (!match) return null; + + let metadataVersion = null; + let topLevelVersion = null; + let inMetadata = false; + let metadataIndent = null; + + for (const line of match[1].split(/\r?\n/)) { + if (!line.trim() || line.trimStart().startsWith('#')) continue; + const indentText = line.match(/^[ \t]*/)[0]; + const indent = indentText.replace(/\t/g, ' ').length; + + if (indent === 0) { + inMetadata = /^metadata:\s*(?:#.*)?$/.test(line); + metadataIndent = null; + const version = line.match(/^version:\s*(.+?)\s*$/); + if (version) topLevelVersion = version[1]; + continue; + } + + if (!inMetadata) continue; + if (metadataIndent === null) metadataIndent = indent; + if (indent !== metadataIndent) continue; + const version = line.trim().match(/^version:\s*(.+?)\s*$/); + if (version) metadataVersion = version[1]; + } + + const value = metadataVersion || topLevelVersion; + return value ? value.trim().replace(/^(["'])(.*)\1$/, '$2') : null; +} + function readLocalSkillVersion() { try { const here = path.dirname(fileURLToPath(import.meta.url)); const skillMd = path.join(here, '..', 'SKILL.md'); const content = fs.readFileSync(skillMd, 'utf-8'); - const match = content.match(/^version:\s*(.+)$/m); - return match ? match[1].trim().replace(/^["']|["']$/g, '') : null; + return parseSkillFrontmatterVersion(content); } catch { return null; } diff --git a/.kiro/skills/impeccable/scripts/context.mjs b/.kiro/skills/impeccable/scripts/context.mjs index 41112429a..cb16553c2 100644 --- a/.kiro/skills/impeccable/scripts/context.mjs +++ b/.kiro/skills/impeccable/scripts/context.mjs @@ -962,13 +962,45 @@ export function extractPlatform(product) { * (this file lives at `/scripts/context.mjs`). Returns null when the * frontmatter is missing or unreadable. */ +function parseSkillFrontmatterVersion(content) { + const match = String(content).match(/^---[ \t]*\r?\n([\s\S]*?)\r?\n---(?:[ \t]*\r?\n|[ \t]*$)/); + if (!match) return null; + + let metadataVersion = null; + let topLevelVersion = null; + let inMetadata = false; + let metadataIndent = null; + + for (const line of match[1].split(/\r?\n/)) { + if (!line.trim() || line.trimStart().startsWith('#')) continue; + const indentText = line.match(/^[ \t]*/)[0]; + const indent = indentText.replace(/\t/g, ' ').length; + + if (indent === 0) { + inMetadata = /^metadata:\s*(?:#.*)?$/.test(line); + metadataIndent = null; + const version = line.match(/^version:\s*(.+?)\s*$/); + if (version) topLevelVersion = version[1]; + continue; + } + + if (!inMetadata) continue; + if (metadataIndent === null) metadataIndent = indent; + if (indent !== metadataIndent) continue; + const version = line.trim().match(/^version:\s*(.+?)\s*$/); + if (version) metadataVersion = version[1]; + } + + const value = metadataVersion || topLevelVersion; + return value ? value.trim().replace(/^(["'])(.*)\1$/, '$2') : null; +} + function readLocalSkillVersion() { try { const here = path.dirname(fileURLToPath(import.meta.url)); const skillMd = path.join(here, '..', 'SKILL.md'); const content = fs.readFileSync(skillMd, 'utf-8'); - const match = content.match(/^version:\s*(.+)$/m); - return match ? match[1].trim().replace(/^["']|["']$/g, '') : null; + return parseSkillFrontmatterVersion(content); } catch { return null; } diff --git a/.opencode/skills/impeccable/scripts/context.mjs b/.opencode/skills/impeccable/scripts/context.mjs index 41112429a..cb16553c2 100644 --- a/.opencode/skills/impeccable/scripts/context.mjs +++ b/.opencode/skills/impeccable/scripts/context.mjs @@ -962,13 +962,45 @@ export function extractPlatform(product) { * (this file lives at `/scripts/context.mjs`). Returns null when the * frontmatter is missing or unreadable. */ +function parseSkillFrontmatterVersion(content) { + const match = String(content).match(/^---[ \t]*\r?\n([\s\S]*?)\r?\n---(?:[ \t]*\r?\n|[ \t]*$)/); + if (!match) return null; + + let metadataVersion = null; + let topLevelVersion = null; + let inMetadata = false; + let metadataIndent = null; + + for (const line of match[1].split(/\r?\n/)) { + if (!line.trim() || line.trimStart().startsWith('#')) continue; + const indentText = line.match(/^[ \t]*/)[0]; + const indent = indentText.replace(/\t/g, ' ').length; + + if (indent === 0) { + inMetadata = /^metadata:\s*(?:#.*)?$/.test(line); + metadataIndent = null; + const version = line.match(/^version:\s*(.+?)\s*$/); + if (version) topLevelVersion = version[1]; + continue; + } + + if (!inMetadata) continue; + if (metadataIndent === null) metadataIndent = indent; + if (indent !== metadataIndent) continue; + const version = line.trim().match(/^version:\s*(.+?)\s*$/); + if (version) metadataVersion = version[1]; + } + + const value = metadataVersion || topLevelVersion; + return value ? value.trim().replace(/^(["'])(.*)\1$/, '$2') : null; +} + function readLocalSkillVersion() { try { const here = path.dirname(fileURLToPath(import.meta.url)); const skillMd = path.join(here, '..', 'SKILL.md'); const content = fs.readFileSync(skillMd, 'utf-8'); - const match = content.match(/^version:\s*(.+)$/m); - return match ? match[1].trim().replace(/^["']|["']$/g, '') : null; + return parseSkillFrontmatterVersion(content); } catch { return null; } diff --git a/.pi/skills/impeccable/scripts/context.mjs b/.pi/skills/impeccable/scripts/context.mjs index 41112429a..cb16553c2 100644 --- a/.pi/skills/impeccable/scripts/context.mjs +++ b/.pi/skills/impeccable/scripts/context.mjs @@ -962,13 +962,45 @@ export function extractPlatform(product) { * (this file lives at `/scripts/context.mjs`). Returns null when the * frontmatter is missing or unreadable. */ +function parseSkillFrontmatterVersion(content) { + const match = String(content).match(/^---[ \t]*\r?\n([\s\S]*?)\r?\n---(?:[ \t]*\r?\n|[ \t]*$)/); + if (!match) return null; + + let metadataVersion = null; + let topLevelVersion = null; + let inMetadata = false; + let metadataIndent = null; + + for (const line of match[1].split(/\r?\n/)) { + if (!line.trim() || line.trimStart().startsWith('#')) continue; + const indentText = line.match(/^[ \t]*/)[0]; + const indent = indentText.replace(/\t/g, ' ').length; + + if (indent === 0) { + inMetadata = /^metadata:\s*(?:#.*)?$/.test(line); + metadataIndent = null; + const version = line.match(/^version:\s*(.+?)\s*$/); + if (version) topLevelVersion = version[1]; + continue; + } + + if (!inMetadata) continue; + if (metadataIndent === null) metadataIndent = indent; + if (indent !== metadataIndent) continue; + const version = line.trim().match(/^version:\s*(.+?)\s*$/); + if (version) metadataVersion = version[1]; + } + + const value = metadataVersion || topLevelVersion; + return value ? value.trim().replace(/^(["'])(.*)\1$/, '$2') : null; +} + function readLocalSkillVersion() { try { const here = path.dirname(fileURLToPath(import.meta.url)); const skillMd = path.join(here, '..', 'SKILL.md'); const content = fs.readFileSync(skillMd, 'utf-8'); - const match = content.match(/^version:\s*(.+)$/m); - return match ? match[1].trim().replace(/^["']|["']$/g, '') : null; + return parseSkillFrontmatterVersion(content); } catch { return null; } diff --git a/.qoder/skills/impeccable/scripts/context.mjs b/.qoder/skills/impeccable/scripts/context.mjs index 41112429a..cb16553c2 100644 --- a/.qoder/skills/impeccable/scripts/context.mjs +++ b/.qoder/skills/impeccable/scripts/context.mjs @@ -962,13 +962,45 @@ export function extractPlatform(product) { * (this file lives at `/scripts/context.mjs`). Returns null when the * frontmatter is missing or unreadable. */ +function parseSkillFrontmatterVersion(content) { + const match = String(content).match(/^---[ \t]*\r?\n([\s\S]*?)\r?\n---(?:[ \t]*\r?\n|[ \t]*$)/); + if (!match) return null; + + let metadataVersion = null; + let topLevelVersion = null; + let inMetadata = false; + let metadataIndent = null; + + for (const line of match[1].split(/\r?\n/)) { + if (!line.trim() || line.trimStart().startsWith('#')) continue; + const indentText = line.match(/^[ \t]*/)[0]; + const indent = indentText.replace(/\t/g, ' ').length; + + if (indent === 0) { + inMetadata = /^metadata:\s*(?:#.*)?$/.test(line); + metadataIndent = null; + const version = line.match(/^version:\s*(.+?)\s*$/); + if (version) topLevelVersion = version[1]; + continue; + } + + if (!inMetadata) continue; + if (metadataIndent === null) metadataIndent = indent; + if (indent !== metadataIndent) continue; + const version = line.trim().match(/^version:\s*(.+?)\s*$/); + if (version) metadataVersion = version[1]; + } + + const value = metadataVersion || topLevelVersion; + return value ? value.trim().replace(/^(["'])(.*)\1$/, '$2') : null; +} + function readLocalSkillVersion() { try { const here = path.dirname(fileURLToPath(import.meta.url)); const skillMd = path.join(here, '..', 'SKILL.md'); const content = fs.readFileSync(skillMd, 'utf-8'); - const match = content.match(/^version:\s*(.+)$/m); - return match ? match[1].trim().replace(/^["']|["']$/g, '') : null; + return parseSkillFrontmatterVersion(content); } catch { return null; } diff --git a/.rovodev/skills/impeccable/scripts/context.mjs b/.rovodev/skills/impeccable/scripts/context.mjs index 41112429a..cb16553c2 100644 --- a/.rovodev/skills/impeccable/scripts/context.mjs +++ b/.rovodev/skills/impeccable/scripts/context.mjs @@ -962,13 +962,45 @@ export function extractPlatform(product) { * (this file lives at `/scripts/context.mjs`). Returns null when the * frontmatter is missing or unreadable. */ +function parseSkillFrontmatterVersion(content) { + const match = String(content).match(/^---[ \t]*\r?\n([\s\S]*?)\r?\n---(?:[ \t]*\r?\n|[ \t]*$)/); + if (!match) return null; + + let metadataVersion = null; + let topLevelVersion = null; + let inMetadata = false; + let metadataIndent = null; + + for (const line of match[1].split(/\r?\n/)) { + if (!line.trim() || line.trimStart().startsWith('#')) continue; + const indentText = line.match(/^[ \t]*/)[0]; + const indent = indentText.replace(/\t/g, ' ').length; + + if (indent === 0) { + inMetadata = /^metadata:\s*(?:#.*)?$/.test(line); + metadataIndent = null; + const version = line.match(/^version:\s*(.+?)\s*$/); + if (version) topLevelVersion = version[1]; + continue; + } + + if (!inMetadata) continue; + if (metadataIndent === null) metadataIndent = indent; + if (indent !== metadataIndent) continue; + const version = line.trim().match(/^version:\s*(.+?)\s*$/); + if (version) metadataVersion = version[1]; + } + + const value = metadataVersion || topLevelVersion; + return value ? value.trim().replace(/^(["'])(.*)\1$/, '$2') : null; +} + function readLocalSkillVersion() { try { const here = path.dirname(fileURLToPath(import.meta.url)); const skillMd = path.join(here, '..', 'SKILL.md'); const content = fs.readFileSync(skillMd, 'utf-8'); - const match = content.match(/^version:\s*(.+)$/m); - return match ? match[1].trim().replace(/^["']|["']$/g, '') : null; + return parseSkillFrontmatterVersion(content); } catch { return null; } diff --git a/.trae-cn/skills/impeccable/scripts/context.mjs b/.trae-cn/skills/impeccable/scripts/context.mjs index 41112429a..cb16553c2 100644 --- a/.trae-cn/skills/impeccable/scripts/context.mjs +++ b/.trae-cn/skills/impeccable/scripts/context.mjs @@ -962,13 +962,45 @@ export function extractPlatform(product) { * (this file lives at `/scripts/context.mjs`). Returns null when the * frontmatter is missing or unreadable. */ +function parseSkillFrontmatterVersion(content) { + const match = String(content).match(/^---[ \t]*\r?\n([\s\S]*?)\r?\n---(?:[ \t]*\r?\n|[ \t]*$)/); + if (!match) return null; + + let metadataVersion = null; + let topLevelVersion = null; + let inMetadata = false; + let metadataIndent = null; + + for (const line of match[1].split(/\r?\n/)) { + if (!line.trim() || line.trimStart().startsWith('#')) continue; + const indentText = line.match(/^[ \t]*/)[0]; + const indent = indentText.replace(/\t/g, ' ').length; + + if (indent === 0) { + inMetadata = /^metadata:\s*(?:#.*)?$/.test(line); + metadataIndent = null; + const version = line.match(/^version:\s*(.+?)\s*$/); + if (version) topLevelVersion = version[1]; + continue; + } + + if (!inMetadata) continue; + if (metadataIndent === null) metadataIndent = indent; + if (indent !== metadataIndent) continue; + const version = line.trim().match(/^version:\s*(.+?)\s*$/); + if (version) metadataVersion = version[1]; + } + + const value = metadataVersion || topLevelVersion; + return value ? value.trim().replace(/^(["'])(.*)\1$/, '$2') : null; +} + function readLocalSkillVersion() { try { const here = path.dirname(fileURLToPath(import.meta.url)); const skillMd = path.join(here, '..', 'SKILL.md'); const content = fs.readFileSync(skillMd, 'utf-8'); - const match = content.match(/^version:\s*(.+)$/m); - return match ? match[1].trim().replace(/^["']|["']$/g, '') : null; + return parseSkillFrontmatterVersion(content); } catch { return null; } diff --git a/.trae/skills/impeccable/scripts/context.mjs b/.trae/skills/impeccable/scripts/context.mjs index 41112429a..cb16553c2 100644 --- a/.trae/skills/impeccable/scripts/context.mjs +++ b/.trae/skills/impeccable/scripts/context.mjs @@ -962,13 +962,45 @@ export function extractPlatform(product) { * (this file lives at `/scripts/context.mjs`). Returns null when the * frontmatter is missing or unreadable. */ +function parseSkillFrontmatterVersion(content) { + const match = String(content).match(/^---[ \t]*\r?\n([\s\S]*?)\r?\n---(?:[ \t]*\r?\n|[ \t]*$)/); + if (!match) return null; + + let metadataVersion = null; + let topLevelVersion = null; + let inMetadata = false; + let metadataIndent = null; + + for (const line of match[1].split(/\r?\n/)) { + if (!line.trim() || line.trimStart().startsWith('#')) continue; + const indentText = line.match(/^[ \t]*/)[0]; + const indent = indentText.replace(/\t/g, ' ').length; + + if (indent === 0) { + inMetadata = /^metadata:\s*(?:#.*)?$/.test(line); + metadataIndent = null; + const version = line.match(/^version:\s*(.+?)\s*$/); + if (version) topLevelVersion = version[1]; + continue; + } + + if (!inMetadata) continue; + if (metadataIndent === null) metadataIndent = indent; + if (indent !== metadataIndent) continue; + const version = line.trim().match(/^version:\s*(.+?)\s*$/); + if (version) metadataVersion = version[1]; + } + + const value = metadataVersion || topLevelVersion; + return value ? value.trim().replace(/^(["'])(.*)\1$/, '$2') : null; +} + function readLocalSkillVersion() { try { const here = path.dirname(fileURLToPath(import.meta.url)); const skillMd = path.join(here, '..', 'SKILL.md'); const content = fs.readFileSync(skillMd, 'utf-8'); - const match = content.match(/^version:\s*(.+)$/m); - return match ? match[1].trim().replace(/^["']|["']$/g, '') : null; + return parseSkillFrontmatterVersion(content); } catch { return null; } diff --git a/.vibe/skills/impeccable/scripts/context.mjs b/.vibe/skills/impeccable/scripts/context.mjs index 41112429a..cb16553c2 100644 --- a/.vibe/skills/impeccable/scripts/context.mjs +++ b/.vibe/skills/impeccable/scripts/context.mjs @@ -962,13 +962,45 @@ export function extractPlatform(product) { * (this file lives at `/scripts/context.mjs`). Returns null when the * frontmatter is missing or unreadable. */ +function parseSkillFrontmatterVersion(content) { + const match = String(content).match(/^---[ \t]*\r?\n([\s\S]*?)\r?\n---(?:[ \t]*\r?\n|[ \t]*$)/); + if (!match) return null; + + let metadataVersion = null; + let topLevelVersion = null; + let inMetadata = false; + let metadataIndent = null; + + for (const line of match[1].split(/\r?\n/)) { + if (!line.trim() || line.trimStart().startsWith('#')) continue; + const indentText = line.match(/^[ \t]*/)[0]; + const indent = indentText.replace(/\t/g, ' ').length; + + if (indent === 0) { + inMetadata = /^metadata:\s*(?:#.*)?$/.test(line); + metadataIndent = null; + const version = line.match(/^version:\s*(.+?)\s*$/); + if (version) topLevelVersion = version[1]; + continue; + } + + if (!inMetadata) continue; + if (metadataIndent === null) metadataIndent = indent; + if (indent !== metadataIndent) continue; + const version = line.trim().match(/^version:\s*(.+?)\s*$/); + if (version) metadataVersion = version[1]; + } + + const value = metadataVersion || topLevelVersion; + return value ? value.trim().replace(/^(["'])(.*)\1$/, '$2') : null; +} + function readLocalSkillVersion() { try { const here = path.dirname(fileURLToPath(import.meta.url)); const skillMd = path.join(here, '..', 'SKILL.md'); const content = fs.readFileSync(skillMd, 'utf-8'); - const match = content.match(/^version:\s*(.+)$/m); - return match ? match[1].trim().replace(/^["']|["']$/g, '') : null; + return parseSkillFrontmatterVersion(content); } catch { return null; } diff --git a/plugin/skills/impeccable/scripts/context.mjs b/plugin/skills/impeccable/scripts/context.mjs index 41112429a..cb16553c2 100644 --- a/plugin/skills/impeccable/scripts/context.mjs +++ b/plugin/skills/impeccable/scripts/context.mjs @@ -962,13 +962,45 @@ export function extractPlatform(product) { * (this file lives at `/scripts/context.mjs`). Returns null when the * frontmatter is missing or unreadable. */ +function parseSkillFrontmatterVersion(content) { + const match = String(content).match(/^---[ \t]*\r?\n([\s\S]*?)\r?\n---(?:[ \t]*\r?\n|[ \t]*$)/); + if (!match) return null; + + let metadataVersion = null; + let topLevelVersion = null; + let inMetadata = false; + let metadataIndent = null; + + for (const line of match[1].split(/\r?\n/)) { + if (!line.trim() || line.trimStart().startsWith('#')) continue; + const indentText = line.match(/^[ \t]*/)[0]; + const indent = indentText.replace(/\t/g, ' ').length; + + if (indent === 0) { + inMetadata = /^metadata:\s*(?:#.*)?$/.test(line); + metadataIndent = null; + const version = line.match(/^version:\s*(.+?)\s*$/); + if (version) topLevelVersion = version[1]; + continue; + } + + if (!inMetadata) continue; + if (metadataIndent === null) metadataIndent = indent; + if (indent !== metadataIndent) continue; + const version = line.trim().match(/^version:\s*(.+?)\s*$/); + if (version) metadataVersion = version[1]; + } + + const value = metadataVersion || topLevelVersion; + return value ? value.trim().replace(/^(["'])(.*)\1$/, '$2') : null; +} + function readLocalSkillVersion() { try { const here = path.dirname(fileURLToPath(import.meta.url)); const skillMd = path.join(here, '..', 'SKILL.md'); const content = fs.readFileSync(skillMd, 'utf-8'); - const match = content.match(/^version:\s*(.+)$/m); - return match ? match[1].trim().replace(/^["']|["']$/g, '') : null; + return parseSkillFrontmatterVersion(content); } catch { return null; }