scan-similar-bugs

Scans a design system codebase for recurring bug anti-patterns after fix commits.

5|9|Updated Mar 25, 2026
One-click install
npx skills add https://github.com/ajenchen/design-system --skill scan-similar-bugs-ajenchen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: scan-similar-bugs
Source: https://github.com/ajenchen/design-system/tree/main/.agents/skills/scan-similar-bugs
Command: npx skills add https://github.com/ajenchen/design-system --skill scan-similar-bugs-ajenchen

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? After fixing a bug, the same root-cause pattern often exists in other components, but developers rarely check. This Skill mechanically extracts the anti-pattern from a fix commit and scans the entire design system for matching occurrences, then batches the related fixes. ## Core Features & Use Cases - Root-cause extraction: Reads the last fix commit message and diff to derive a grep-able anti-pattern (token leaks, magic numbers, API misuse, a11y gaps, asymmetric icon sizing). - DS-wide detection: Runs static grep or Playwright-based visual scans across the design system source to build a candidate list with file and line evidence. - Authority-gated batch fixing: Classifies candidates into auto-fix, engineering-judgment, backlog, or human-decision paths, then verifies with TypeScript compilation, unit tests, and visual scans. - Use Case: After fixing a padding formula bug in one component, invoke the scan to find the same formula error in five other components, fix them all, and add a canonical hook to prevent regression. ## Quick Start Ask the AI to run /scan-similar-bugs after your fix commits to find and fix the same bug pattern across the whole design system.

Frequently Asked Questions about scan-similar-bugs

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find similar bugs across a codebase after fixing one?

Extract the root-cause pattern from the fix commit message and diff, then grep the entire source tree for that pattern. This Skill automates that flow with a predefined anti-pattern table covering token leaks, magic numbers, API misuse, and accessibility gaps.

How to detect visual bugs that grep cannot find?

Use Playwright-based visual scan scripts for geometry, accessibility, and interaction issues that static grep misses. The Skill supports dimension-specific scans such as asymmetric icon width and height measurement.

When should I not run a similar-bug scan after a fix?

Skip the scan for surgical visual fixes with an explicit defect list, pure refactors without bug-fix semantics, docs-only commits, and typo or import cleanups. It is designed for batch-end scans after sessions with two or more fix commits.

Does the scan automatically fix every matching occurrence?

Only deterministic fixes within the frozen scope are auto-fixed. Engineering-judgment cases are resolved per owning spec, out-of-scope items go to a backlog with evidence, and product or UX trade-offs require human decision.

How does this differ from a full design system audit?

This scan is a fix-time, root-pattern-targeted sweep triggered after bug fixes, while a design system audit is a periodic full-dimension batch review. The scan catches immediate recurrences; the audit covers architectural patterns broadly.