URL: /developers/skills/website-ci-gate

---
title: "Website CI gate skill for Claude Code, Codex and Cursor"
sidebarTitle: "website-ci-gate"
description: "The website-ci-gate agent skill adds a squirrelscan audit to CI and fails builds on a score threshold, errors or new issues. It covers GitHub Actions."
icon: "brain"
---

`website-ci-gate` is an Agent Skills `SKILL.md` from squirrelscan that adds a website audit check to CI: a GitHub Actions website audit and preview deploy gate for coding agents. It uses the squirrel CLI in Claude Code, Codex, Cursor and other agents to fail builds on a score threshold, error issues or new issues. It writes pipeline config and picks thresholds from a real baseline. It does not fix issues.

New to skills? Start with the [skills overview](/developers/skills/overview).

## What it does

- Runs a baseline audit first and chooses thresholds the website passes today, since a gate that is red on day one gets turned off.
- Writes `--fail-on` gates: `score<N`, `score:<category><N`, `severity>=error`, `errors>0` and `warnings>0`, quoted so the shell does not read `<` as redirection.
- Fails only on new issues with `squirrel ci <url> --website <id> --fail-on-new error`, using an org API key.
- Handles exit codes: `2` is a tripped threshold. `3`, `4` and `5` (blocked, redirected, unreachable) mean nothing was audited. The job must fail on any non-zero exit.
- Writes a GitHub Actions workflow with the official action or the plain CLI, plus the GitLab equivalent.
- Audits preview deploys (Vercel, Netlify, Cloudflare Pages) after the deploy is ready.
- Shows you the diff before editing a workflow file, and tells you which secret to create instead of adding it.
- Keeps `SQUIRRELSCAN_API_KEY` in the CI secret store, never in the repo.

## Questions it answers

- Add squirrelscan to GitHub Actions
- Fail CI on website audit errors
- Gate preview deploys on audit scores
- How do I fail a build when my website's score drops?
- What score threshold should I start with?
- What do squirrel exit codes 2, 3, 4 and 5 mean in CI?
- How do I fail only on new issues?
- How do I audit a preview deployment URL in a pull request?

## Install

<Note>`squirrel skills install` installs only `squirrelscan` and `audit-website`. This skill comes from `npx skills add` or the Claude Code plugin.</Note>

<Tabs>
  <Tab title="npx skills">
    Works with any Agent Skills tool (Claude Code, Codex, Cursor, Gemini CLI, Amp and others):

    ```bash
    npx skills add squirrelscan/skills --skill website-ci-gate
    ```
  </Tab>
  <Tab title="Claude Code plugin">
    The plugin installs all the skills and the hosted squirrelscan MCP server:

    <div class="sq-install">

    ```text
    /plugin marketplace add squirrelscan/skills
    ```

    ```text
    /plugin install squirrelscan@squirrelscan
    ```

    </div>
  </Tab>
  <Tab title="Codex">
    `npx skills add` puts the skill in `.agents/skills/`. To add the MCP server too, configure it in `~/.codex/config.toml`. See [squirrelscan for Codex](/developers/agents/codex).
  </Tab>
  <Tab title="Cursor">
    Run `npx skills add`, then use the Cursor plugin from the skills repository or the one-click MCP link. See [squirrelscan for Cursor](/developers/agents/cursor).
  </Tab>
  <Tab title="Other tools">
    Gemini CLI, GitHub Copilot, Amp and other Agent Skills tools: run `npx skills add`, then add the MCP server. See [coding agents](/developers/agents).
  </Tab>
</Tabs>

## Requirements

The squirrel CLI installed and in your `PATH`, or the hosted squirrelscan MCP server connected (`https://mcp.squirrelscan.com/mcp`). Check the CLI with `squirrel --version`. Setup steps are in [install](/install) and [MCP clients](/developers/mcp-clients).

Install the CLI on macOS or Linux:

```bash
curl -fsSL https://install.squirrelscan.com | bash
```

## Example prompts

Paste one of these into your coding agent:

<div class="sq-prompts">

```text
Add squirrelscan to GitHub Actions for https://staging.example.com
```

```text
Fail CI on website audit errors and score drops below 85
```

```text
Gate preview deploys on audit scores
```

</div>

The agent runs a baseline and proposes thresholds. It shows you the workflow diff and tells you which secret to create. Then it checks the job is green on main.

## How it works

1. Run a baseline locally with `squirrel audit` at `--level quick` and read the scores.
2. Pick the gate: absolute `--fail-on` thresholds, or `squirrel ci` with `--fail-on-new` for new issues.
3. Handle exit codes so `3`, `4` and `5` fail the job.
4. Write the workflow with the official action or the plain CLI, after showing you the diff.
5. Stop when the job is green on main and you have seen it go red on a deliberate regression. Document the thresholds next to the workflow.

## Related skills

- [`audit-website`](/developers/skills/audit-website): fixing what the gate finds.
- [`security-audit`](/developers/skills/security-audit): fixes for security findings.
- [`seo-audit`](/developers/skills/seo-audit): fixes for SEO findings.
- [`performance-audit`](/developers/skills/performance-audit): fixes for performance findings.

## Related rules and guides

- [Run squirrelscan in CI](/guides/ci)
- [squirrel ci](/cli/ci)

## Source on GitHub

- [`skills/website-ci-gate`](https://github.com/squirrelscan/skills/tree/main/skills/website-ci-gate): the skill folder
- [README.md](https://github.com/squirrelscan/skills/blob/main/skills/website-ci-gate/README.md)
- [SKILL.md](https://github.com/squirrelscan/skills/blob/main/skills/website-ci-gate/SKILL.md)
