Skip to content

gaia-research/gaia-skill-tree / .agents/skills/impeccable

impeccable

Flagged

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.

FileKindSize
SKILL.mdskill md21.9 KB
agents/impeccable_asset_producer.tomlconfig8.1 KB
agents/impeccable_manual_edit_applier.tomlconfig6.9 KB
agents/openai.yamlconfig235 B
reference/adapt.mdmarkdown9.9 KB
reference/animate.mdmarkdown10.2 KB
reference/audit.mdmarkdown7.1 KB
reference/bolder.mdmarkdown6.4 KB
reference/brand.mdmarkdown10.3 KB
reference/clarify.mdmarkdown10.4 KB
reference/codex.mdmarkdown6.8 KB
reference/colorize.mdmarkdown13.3 KB
reference/craft.mdmarkdown11.7 KB
reference/critique.mdmarkdown38.6 KB
reference/delight.mdmarkdown9.6 KB
reference/distill.mdmarkdown5.6 KB
reference/document.mdmarkdown27.3 KB
reference/extract.mdmarkdown3.4 KB
reference/harden.mdmarkdown8.4 KB
reference/hooks.mdmarkdown7.4 KB
reference/init.mdmarkdown12.7 KB
reference/interaction-design.mdmarkdown6.4 KB
reference/layout.mdmarkdown8.5 KB
reference/live.mdmarkdown58.5 KB
reference/onboard.mdmarkdown7.6 KB
reference/optimize.mdmarkdown7.4 KB
reference/overdrive.mdmarkdown8.9 KB
reference/polish.mdmarkdown12.7 KB
reference/product.mdmarkdown3.7 KB
reference/quieter.mdmarkdown4.8 KB
reference/shape.mdmarkdown11.3 KB
reference/typeset.mdmarkdown13.9 KB
scripts/cleanup-deprecated.mjsscript8.9 KB
scripts/command-metadata.jsonconfig7.8 KB
scripts/context-signals.mjsscript7.9 KB
scripts/context.mjsscript9.7 KB
scripts/critique-storage.mjsscript8.8 KB
scripts/design-parser.mjsscript218 B
scripts/detect-csp.mjsscript6.6 KB
scripts/detect.mjsscript620 B
scripts/detector/browser/injected/index.mjsscript67.2 KB
scripts/detector/cli/main.mjsscript9.5 KB
scripts/detector/design-system.mjsscript24.1 KB
scripts/detector/detect-antipatterns-browser.jsscript187.9 KB
scripts/detector/detect-antipatterns.mjsscript1.6 KB
scripts/detector/engines/browser/detect-url.mjsscript8.6 KB
scripts/detector/engines/regex/detect-text.mjsscript22.8 KB
scripts/detector/engines/static-html/css-cascade.mjsscript32.9 KB
scripts/detector/engines/static-html/detect-html.mjsscript8.9 KB
scripts/detector/engines/visual/screenshot-contrast.mjsscript6.4 KB
scripts/detector/findings.mjsscript363 B
scripts/detector/node/file-system.mjsscript6.7 KB
scripts/detector/profile/profiler.mjsscript4.4 KB
scripts/detector/registry/antipatterns.mjsscript16.9 KB
scripts/detector/rules/checks.mjsscript98.3 KB
scripts/detector/shared/color.mjsscript4.4 KB
scripts/detector/shared/constants.mjsscript4.1 KB
scripts/detector/shared/page.mjsscript252 B
scripts/hook-admin.mjsscript22.8 KB
scripts/hook-before-edit.mjsscript16.2 KB
scripts/hook-lib.mjsscript54.7 KB
scripts/hook.mjsscript2.0 KB
scripts/impeccable-paths.mjsscript3.8 KB
scripts/is-generated.mjsscript2.2 KB
scripts/lib/design-parser.mjsscript25.2 KB
scripts/lib/impeccable-config.mjsscript21.0 KB
scripts/lib/impeccable-paths.mjsscript3.8 KB
scripts/lib/is-generated.mjsscript2.2 KB
scripts/live-accept.mjsscript29.6 KB
scripts/live-browser-dom.jsscript4.2 KB
scripts/live-browser-session.jsscript3.2 KB
scripts/live-browser.jsscript395.7 KB
scripts/live-commit-manual-edits.mjsscript41.1 KB
scripts/live-complete.mjsscript2.9 KB
scripts/live-completion.mjsscript969 B
scripts/live-copy-edit-agent.mjsscript28.2 KB
scripts/live-discard-manual-edits.mjsscript1.6 KB
scripts/live-event-validation.mjsscript269 B
scripts/live-inject.mjsscript21.1 KB
scripts/live-insert-ui.mjsscript15.3 KB
scripts/live-insert.mjsscript8.9 KB
scripts/live-manual-edit-evidence.mjsscript11.4 KB
scripts/live-manual-edits-buffer.mjsscript5.0 KB
scripts/live-poll.mjsscript13.2 KB
scripts/live-resume.mjsscript4.4 KB
scripts/live-server.mjsscript87.2 KB
scripts/live-session-store.mjsscript10.4 KB
scripts/live-status.mjsscript2.1 KB
scripts/live-svelte-component.mjsscript27.2 KB
scripts/live-sveltekit-adapter.mjsscript9.1 KB
scripts/live-ui-core.mjsscript5.4 KB
scripts/live-wrap.mjsscript35.1 KB
scripts/live.mjsscript8.3 KB
scripts/live/browser-script-parts.mjsscript1.7 KB
scripts/live/completion.mjsscript969 B
scripts/live/event-validation.mjsscript6.2 KB
scripts/live/insert-ui.mjsscript15.3 KB
scripts/live/manual-apply.mjsscript34.1 KB
scripts/live/manual-edit-routes.mjsscript14.6 KB
scripts/live/manual-edits-buffer.mjsscript5.0 KB
scripts/live/session-store.mjsscript10.4 KB
scripts/live/svelte-component.mjsscript27.2 KB
scripts/live/sveltekit-adapter.mjsscript9.1 KB
scripts/live/ui-core.mjsscript5.4 KB
scripts/live/vocabulary.mjsscript3.2 KB
scripts/modern-screenshot.umd.jsscript28.6 KB
scripts/palette.mjsscript56.9 KB
scripts/pin.mjsscript6.0 KB

scripts/cleanup-deprecated.mjs

View on GitHub
#!/usr/bin/env node
/**
 * Cleans up deprecated Impeccable skill files, symlinks, and
 * skills-lock.json entries left over from previous versions.
 *
 * Safe to run repeatedly -- it is a no-op when nothing needs cleaning.
 *
 * Usage (from the project root):
 *   node {{scripts_path}}/cleanup-deprecated.mjs
 *
 * What it does:
 *   1. Finds every harness-specific skills directory (.claude/skills,
 *      .cursor/skills, .agents/skills, etc.).
 *   2. For each deprecated skill name (with and without i- prefix),
 *      checks if the directory exists and its SKILL.md mentions
 *      "impeccable" (to avoid deleting unrelated user skills).
 *   3. Deletes confirmed matches (files, directories, or symlinks).
 *   4. Removes the corresponding entries from skills-lock.json.
 */

import { existsSync, readFileSync, writeFileSync, rmSync, readdirSync, statSync, lstatSync, unlinkSync } from 'node:fs';
import { join, resolve } from 'node:path';

// Skills that were renamed, merged, or folded in v2.0, v2.1, and v3.0.
const DEPRECATED_NAMES = [
  // v2.0 renames
  'frontend-design',    // renamed to impeccable
  'teach-impeccable',   // folded into /impeccable init
  // v2.1 merges
  'arrange',            // renamed to layout
  'normalize',          // merged into polish
  'onboard',            // merged into harden
  'extract',            // merged into /impeccable extract
  // v3.0 consolidation: all standalone skills -> /impeccable sub-commands
  'adapt',
  'animate',
  'audit',
  'bolder',
  'clarify',
  'colorize',
  'critique',
  'delight',
  'distill',
  'harden',
  'layout',
  'optimize',
  'overdrive',
  'polish',
  'quieter',
  'shape',
  'typeset',
];

// All known harness directories that may contain a skills/ subfolder.
const HARNESS_DIRS = [
  '.claude', '.cursor', '.gemini', '.codex', '.agents',
  '.trae', '.trae-cn', '.pi', '.opencode', '.kiro', '.rovodev',
];

// Per-skill fingerprints for SKILL.md bodies that never mentioned
// "impeccable" in their v2.x source. Used as a last-resort match
// when no skills-lock.json exists and the word heuristic fails.
// The strings are lifted verbatim from the v2.x frontmatter
// descriptions, so collisions with hand-written user skills are
// vanishingly unlikely.
const SKILL_FINGERPRINTS = {
  harden: 'Make interfaces production-ready: error handling, empty states',
  optimize: 'Diagnoses and fixes UI performance across loading speed',
};

/**
 * Walk up from startDir until we find a directory that looks like a
 * project root (has package.json, .git, or skills-lock.json).
 */
export function findProjectRoot(startDir = process.cwd()) {
  let dir = resolve(startDir);
  const { root } = { root: '/' };
  while (dir !== root) {
    if (
      existsSync(join(dir, 'package.json')) ||
      existsSync(join(dir, '.git')) ||
      existsSync(join(dir, 'skills-lock.json'))
    ) {
      return dir;
    }
    const parent = resolve(dir, '..');
    if (parent === dir) break;
    dir = parent;
  }
  return resolve(startDir);
}

/**
 * Load skills-lock.json from the project root, or null if missing/unreadable.
 */
export function loadLock(projectRoot) {
  const lockPath = join(projectRoot, 'skills-lock.json');
  if (!existsSync(lockPath)) return null;
  try {
    return JSON.parse(readFileSync(lockPath, 'utf-8'));
  } catch {
    return null;
  }
}

/**
 * Check whether a skill directory belongs to Impeccable. Three layered
 * signals, in order of reliability:
 *   1. Lock source equals "pbakaus/impeccable" (authoritative).
 *   2. SKILL.md body contains the word "impeccable".
 *   3. SKILL.md body contains a per-skill fingerprint (for harden and
 *      optimize, whose v2.x SKILL.md never mentioned the pack name).
 */
export function isImpeccableSkill(skillDir, { skillName, lock } = {}) {
  // 1. Authoritative: the lock file claims this skill is ours.
  if (skillName && lock?.skills?.[skillName]?.source === 'pbakaus/impeccable') {
    return true;
  }
  const skillMd = join(skillDir, 'SKILL.md');
  if (!existsSync(skillMd)) return false;
  let content;
  try {
    content = readFileSync(skillMd, 'utf-8');
  } catch {
    return false;
  }
  // 2. Word-level content heuristic.
  if (/impeccable/i.test(content)) return true;
  // 3. Per-skill fingerprint for old skills that never mentioned the pack.
  //    Strip the i- prefix so both `harden` and `i-harden` resolve to the
  //    same fingerprint entry.
  const unprefixed = skillName?.startsWith('i-') ? skillName.slice(2) : skillName;
  const fingerprint = unprefixed && SKILL_FINGERPRINTS[unprefixed];
  if (fingerprint && content.includes(fingerprint)) return true;
  return false;
}

/**
 * Build the full list of names to check: each deprecated name, plus
 * its i-prefixed variant.
 */
export function buildTargetNames() {
  const names = [];
  for (const name of DEPRECATED_NAMES) {
    names.push(name);
    names.push(`i-${name}`);
  }
  return names;
}

/**
 * Find every skills directory across all harness dirs in the project.
 * Returns absolute paths that exist on disk.
 */
export function findSkillsDirs(projectRoot) {
  const dirs = [];
  for (const harness of HARNESS_DIRS) {
    const candidate = join(projectRoot, harness, 'skills');
    if (existsSync(candidate)) {
      dirs.push(candidate);
    }
  }
  return dirs;
}

/**
 * Remove deprecated skill directories/symlinks from all harness dirs.
 * Reads skills-lock.json so the authoritative "source" field can
 * drive deletion even when SKILL.md never mentions impeccable.
 * Returns an array of paths that were deleted.
 */
export function removeDeprecatedSkills(projectRoot, lock) {
  if (lock === undefined) lock = loadLock(projectRoot);
  const targets = buildTargetNames();
  const skillsDirs = findSkillsDirs(projectRoot);
  const deleted = [];

  for (const skillsDir of skillsDirs) {
    for (const name of targets) {
      const skillPath = join(skillsDir, name);

      // Use lstat to detect symlinks (existsSync follows symlinks and
      // returns false for dangling ones).
      let stat;
      try {
        stat = lstatSync(skillPath);
      } catch {
        continue; // does not exist at all
      }

      if (stat.isSymbolicLink()) {
        // Symlink: check the target if it's alive, otherwise treat
        // dangling symlinks to deprecated names as safe to remove.
        const targetAlive = existsSync(skillPath);
        const isMatch = targetAlive
          ? isImpeccableSkill(skillPath, { skillName: name, lock })
          : true;
        if (isMatch) {
          unlinkSync(skillPath);
          deleted.push(skillPath);
        }
        continue;
      }

      // Regular directory -- verify it belongs to impeccable
      if (isImpeccableSkill(skillPath, { skillName: name, lock })) {
        rmSync(skillPath, { recursive: true, force: true });
        deleted.push(skillPath);
      }
    }
  }

  return deleted;
}

/**
 * Remove deprecated entries from skills-lock.json.
 * Only removes entries whose source is "pbakaus/impeccable".
 * Returns the list of removed skill names.
 */
export function cleanSkillsLock(projectRoot) {
  const lockPath = join(projectRoot, 'skills-lock.json');
  if (!existsSync(lockPath)) return [];

  let lock;
  try {
    lock = JSON.parse(readFileSync(lockPath, 'utf-8'));
  } catch {
    return [];
  }

  if (!lock.skills || typeof lock.skills !== 'object') return [];

  const targets = buildTargetNames();
  const removed = [];

  for (const name of targets) {
    const entry = lock.skills[name];
    if (!entry) continue;
    // Only remove if it belongs to impeccable
    if (entry.source === 'pbakaus/impeccable') {
      delete lock.skills[name];
      removed.push(name);
    }
  }

  if (removed.length > 0) {
    writeFileSync(lockPath, JSON.stringify(lock, null, 2) + '\n', 'utf-8');
  }

  return removed;
}

/**
 * Run the full cleanup. Returns a summary object.
 *
 * Order matters: read the lock and delete directories first, then
 * strip lock entries. Otherwise the authoritative signal is gone by
 * the time directory deletion runs.
 */
export function cleanup(projectRoot) {
  const root = projectRoot || findProjectRoot();
  const lock = loadLock(root);
  const deletedPaths = removeDeprecatedSkills(root, lock);
  const removedLockEntries = cleanSkillsLock(root);
  return { deletedPaths, removedLockEntries, projectRoot: root };
}

// CLI entry point
if (process.argv[1] && resolve(process.argv[1]) === resolve(new URL(import.meta.url).pathname)) {
  const result = cleanup();
  if (result.deletedPaths.length === 0 && result.removedLockEntries.length === 0) {
    console.log('No deprecated Impeccable skills found. Nothing to clean up.');
  } else {
    if (result.deletedPaths.length > 0) {
      console.log(`Removed ${result.deletedPaths.length} deprecated skill(s):`);
      for (const p of result.deletedPaths) console.log(`  - ${p}`);
    }
    if (result.removedLockEntries.length > 0) {
      console.log(`Cleaned ${result.removedLockEntries.length} entry/entries from skills-lock.json:`);
      for (const name of result.removedLockEntries) console.log(`  - ${name}`);
    }
  }
}
rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first.Stars: 194kUpdated Claude CodeCodexVerifiedInstall