No skip

From proffesor-for-testing/agentic-qe · View interactive version

No skip is an AI agent skill from the GitHub repository proffesor-for-testing/agentic-qe. Use when you want to prevent .skip(), .only(), xit(), and xdescribe() from being committed to test files. Activate with /no-skip for session-scoped test skip prevention.

How to use this skill

Skill file

No-Skip Mode

When activated, blocks any write that adds test-skipping patterns to test files.

What It Does

Prevents these patterns from being written to test files:

Activation

/no-skip

Hook Configuration

Add this to .claude/settings.json (Claude Code settings schema):

{
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "Write|Edit|MultiEdit",
        "hooks": [
          {
            "type": "command",
            "command": "bash \"$CLAUDE_PROJECT_DIR\"/.claude/skills/no-skip/scripts/check-skips.sh"
          }
        ]
      }
    ]
  }
}

Claude Code sends the tool call as JSON on stdin. The script decodes it with node

(no jq needed) and, when it blocks, exits 2 with the reason on stderr, which Claude

Code shows to the model. Exit 0 allows the write.

Enforcement Logic

The hook runs the shipped detector, scripts/check-skips.sh. In hook mode it reads

tool_input.file_path and the written text (content for Write, new_string for Edit,

every edits[].new_string for MultiEdit). Only test files are checked; other files are

allowed.

Test files are defined once in scripts/test-files.sh (shared by no-skip and freeze-tests;

\ is normalised to /):

For manual or CI use, pass the content as the first argument or as plain text on stdin;

that content is always checked:

# Check content passed as an argument
bash .claude/skills/no-skip/scripts/check-skips.sh "$CONTENT"

# Or pipe it on stdin
printf '%s' "$CONTENT" | bash .claude/skills/no-skip/scripts/check-skips.sh

Exit codes are the same in every mode: 0 = allowed, 2 = blocked (reasons on stderr).

Stdin whose first character is { (after an optional UTF-8 BOM) is treated as a hook

payload. If it cannot be decoded (truncated JSON, no tool_input object, node missing),

the script blocks with the reason on stderr rather than allowing the write. To check plain

text that starts with { manually, pass it as the first argument.

Detected patterns: .skip(, .only(, xit(, xdescribe(, xcontext(, test.todo(,

@Skip, @Disabled, @Ignore. The detector uses POSIX extended regular expressions

(grep -E with [[:space:]]), so GNU grep on Linux and BSD grep on macOS give the same

result. Do not rewrite it with grep -P: BSD grep rejects -P, and inside an if that

error reads as "no match", so every skip would pass. If grep itself fails, the detector

blocks rather than allowing the write.

Gotchas

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.