Full Byte Developer.

Claude Code for QA and security triage

Run Playwright with workers 1 in CI, triage Dependabot with /review, and block risky shell via hooks.

Published here , updated · 9 sources

QA and security triage with Claude Code works when Playwright CI sets workers to 1, Dependabot alerts get a /review pass, and PreToolUse hooks exit 2 on risky shell. Flakes drop when parallel workers stay off in CI per Playwright's CI guide. [1] [2]

After this page you can scaffold Playwright with workers locked to 1, triage Dependabot with Engineering /review, and block risky shell with deny rules and hooks. Related: Claude Code deny rules, Claude Code for DevOps and CI/CD, Claude Code for coding. Browse the Claude Code topic.

Scaffold Playwright, then lock CI to workers 1

Playwright's intro uses npm init playwright@latest to add config, browsers, and an example test (optional GitHub Actions workflow). CI docs install with npm ci, then npx playwright install --with-deps, then npx playwright test, and recommend workers: 1 in CI for stability and reproducibility. [1] [2]

bash
npm init playwright@latest
yaml
# CI shape from Playwright CI docs
- run: npm ci
- run: npx playwright install --with-deps
- run: npx playwright test
ts
// playwright.config.ts excerpt for CI
export default defineConfig({
  workers: process.env.CI ? 1 : undefined,
});

Ask Claude to add failing specs from a bug report before it edits product code. Best practices: a failing check defines "done". [6]

You should see the same failure locally and in CI when workers are 1. [1]

Triage Dependabot PRs with Engineering /review

When Dependabot security updates are enabled, Dependabot opens pull requests for alerts that have an available patch. Treat each PR as a change set: read the advisory, run tests, then /review on the diff. [3] [4]

bash
claude plugin marketplace add anthropics/knowledge-work-plugins
claude plugin install engineering@knowledge-work-plugins
text
/review https://github.com/org/repo/pull/456

Do not auto-merge on the label alone. Ask Claude to summarize breaking changes in the changelog and to name the test command that proves the app still boots. [3] [6]

Keep secrets out with deny rules and hooks

Deny rules in .claude/settings.json stop Read/Bash patterns for .env and secrets paths; details live on Claude Code deny rules. Hooks add pattern blocks deny rules miss: on PreToolUse, exit code 2 refuses the tool call and returns stderr. [5] [7]

.claude/settings.json
{
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "Bash",
        "hooks": [
          {
            "type": "command",
            "command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/block-prod-shell.sh"
          }
        ]
      }
    ]
  }
}

Block force-push, production kubectl, and secret exfil patterns in that script. Keep the matcher narrow enough that npm test still runs. [5] [6]

Warning: instruction files are guidance. Markdown "never" lines do not replace hooks or deny rules. [5] [6]

Close triage with evidence, not labels

For each Dependabot or Playwright failure, ask for severity, owning package or spec, repro command, and fix PR link. Re-run Playwright with workers 1 after the fix. Then: red CI or alert, /review on the fix, green jobs, person merges. The agent does not dismiss alerts without a cited reason. [1] [3] [4]

For workflow YAML and deploy checklists, continue on Claude Code for DevOps and CI/CD. For broader coding hooks and memory, use Claude Code for coding. [8] [9]

You now have a QA and security loop: Playwright CI with workers 1, Dependabot review via /review, deny rules plus hooks, human merge.

Send this to the QA lead who wants Claude triaging alerts without force pushing or reading env files.

Keep this guide

By Full Byte Developer

Filed under Claude Code, Dev tools

Questions about this guide

What Playwright install command belongs in CI?

Playwright's CI docs show npm ci, then npx playwright install --with-deps, then npx playwright test. They recommend workers set to 1 in CI for stability.

How do I start a local Playwright project?

The intro docs use npm init playwright@latest (or yarn/pnpm create). It scaffolds config, an example test, and can add a GitHub Actions workflow.

What does Dependabot security updates do?

GitHub's Dependabot docs say that when security updates are enabled, Dependabot opens pull requests to resolve Dependabot alerts that have an available patch.

Where do deny rules for secrets live on this site?

See Claude Code deny rules for settings.json deny entries on rm, .env, and secrets paths. Pair those with hooks for patterns deny rules cannot express.

Sources

Next in this stack