Skip to content

addyosmani/agent-skills / skills/constraint-driven-development

constraint-driven-development

Verified

Establishes a project's quality bar as a written contract and stops agents quietly lowering it. Interviews the user on which dimensions matter, supplies sane default thresholds when they have no number in mind, records everything in CONSTRAINTS.md, and watches the diff for a weakened bar — new @ts-ignore or eslint-disable suppressions, skipped or deleted tests, assertions stripped out, unimplemented stubs, thresholds edited down. Use when no quality bar is written down, when the user says "set up constraints" or "define our standards", when the user wants dimensions they care about — accessibility, web performance, coverage — set up as enforced constraints, when an agent keeps silencing checks or skipping tests to get to green, when you need a coverage or performance threshold and don't know what number to pick, or when an agent writes more code than anyone will read.

FileKindSize
SKILL.mdskill md21.7 KB
references/floor-guard.mdmarkdown10.5 KB
scripts/quality-gate.mjsscript1.9 KB

scripts/quality-gate.mjs

View on GitHub
#!/usr/bin/env node
// Exit 0: below threshold; 1: blocking findings; 2: unusable report or invocation.
import { readFileSync } from 'node:fs';

const [tool, file, ...extra] = process.argv.slice(2);
if (!['semgrep', 'axe'].includes(tool) || !file || extra.length) {
  console.error('quality-gate: usage: node quality-gate.mjs <semgrep|axe> <report.json>');
  process.exit(2);
}

try {
  const report = JSON.parse(readFileSync(file, 'utf8'));
  let levels;
  let allowed;
  let blocking;
  if (tool === 'semgrep') {
    if (!Array.isArray(report?.results) || !Array.isArray(report.errors)
        || report.errors.length || !Array.isArray(report.paths?.scanned)
        || !report.paths.scanned.length) {
      throw new Error('Incomplete scan');
    }
    levels = report.results.map(finding => finding?.extra?.severity);
    allowed = ['INFO', 'WARNING', 'ERROR', 'LOW', 'MEDIUM', 'HIGH', 'CRITICAL'];
    blocking = ['ERROR', 'HIGH', 'CRITICAL'];
  } else {
    // A browser error page can otherwise look like a successful accessibility scan.
    if (!Array.isArray(report) || !report.length
        || report.some(page => !Array.isArray(page?.violations)
          || typeof page.url !== 'string' || !['http:', 'https:'].includes(new URL(page.url).protocol))) {
      throw new Error('Incomplete scan');
    }
    levels = report.flatMap(page => page.violations.map(finding => finding?.impact));
    allowed = ['minor', 'moderate', 'serious', 'critical'];
    blocking = ['serious', 'critical'];
  }
  if (levels.some(level => !allowed.includes(level))) {
    throw new Error('Unknown severity');
  }
  const count = levels.filter(level => blocking.includes(level)).length;
  console.log(`${tool}: ${levels.length} findings, ${count} blocking`);
  process.exitCode = count ? 1 : 0;
} catch {
  console.error('quality-gate: unreadable, incomplete, or unsupported report; check the scanner output');
  process.exitCode = 2;
}
skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.Stars: 195kUpdated Claude CodeCodexVerifiedInstall
webapp-testinganthropics/skillsToolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.Stars: 195kUpdated Claude CodeCodexVerifiedInstall
browser-testing-with-devtoolsaddyosmani/agent-skillsTests in real browsers via Chrome DevTools MCP. Use when building or debugging anything that runs in a browser. Use when you need to inspect the DOM, capture console errors, analyze network requests, profile performance, or verify visual output with real runtime data. Requires the chrome-devtools MCP server to be configured.Stars: 118kUpdated Claude CodeCodexVerifiedInstall
ci-cd-and-automationaddyosmani/agent-skillsAutomates CI/CD pipeline setup. Use when setting up or modifying build and deployment pipelines. Use when you need to automate quality gates, configure test runners in CI, or establish deployment strategies.Stars: 118kUpdated Claude CodeCodexVerifiedInstall