Enforces test spacing rules in test files.
Install
mkdir -p .claude/skills/check-spacing && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/15855" && unzip -o skill.zip -d .claude/skills/check-spacing && rm skill.zipInstalls to .claude/skills/check-spacing
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Detect and report blank-line spacing violations between consecutiveKey capabilities
- →Detect blank-line spacing violations between `test()` calls
- →Report violations with line range and gap details
- →Identify single-line versus multi-line test calls
- →Enforce spacing conventions in `*.test.ts` files
- →Check spacing after editing or reorganizing test files
How it works
This skill analyzes `*.test.ts` files to detect and report blank-line spacing violations between consecutive `test()` calls. It applies specific rules for single-line and multi-line test definitions.
Inputs & outputs
When to use check-spacing
- →Check test file spacing
- →Lint test file structure
- →Fix spacing violations
About this skill
Check Spacing
Detect blank-line spacing violations between consecutive test() calls
in test files.
Usage
node .github/skills/check_spacing/check_spacing.mjs <path/to/file.test.ts>
Rules enforced
| Consecutive pair | Expected gap |
|---|---|
| single-line → single-line | 0 (no blank line) |
| any other combination | 1 (exactly one blank line) |
A test is single-line when the entire test(…) call ends with );
on the same line. Everything else is multi-line.
Output
- No violations:
No spacing violations found. - Violations found: one entry per violation showing the line range, the actual vs expected gap, and the test types involved.
VIOLATION L12→L15: gap=2 expected=1 (multi → single)
line 10: test('#01 => status is "available"', () => {
line 15: test('#02 => counter.count is 1', () => expect(counter.count).toBe(1));
1 violation(s) total.
When to use
Run this after editing or reorganising any *.test.ts file to ensure
blank-line spacing between tests conforms to the project conventions
(see .github/instructions/organize-tests.instructions.md § 3).
Fix every reported violation, then re-run until the output is
No spacing violations found.
When not to use it
- →The task is not related to `*.test.ts` files
- →The task is about general code formatting not specific to test spacing
Limitations
- →The skill focuses on `*.test.ts` files
- →The skill enforces specific rules for single-line versus multi-line test calls
- →The skill reports violations showing line range, actual vs expected gap, and test types involved
How it compares
This workflow provides a specialized linting tool for test file spacing, enforcing project-specific conventions that generic linters might not cover, ensuring consistent test file structure.
Compared to similar skills
check-spacing side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| check-spacing (this skill) | 0 | 4mo | Review | Beginner |
| dependency-upgrade | 26 | 5mo | Review | Intermediate |
| angular-best-practices | 21 | 3mo | No flags | Advanced |
| validate-typescript | 5 | 9mo | Review | Beginner |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
dependency-upgrade
wshobson
Manage major dependency version upgrades with compatibility analysis, staged rollout, and comprehensive testing. Use when upgrading framework versions, updating major dependencies, or managing breaking changes in libraries.
angular-best-practices
sickn33
Angular performance optimization and best practices guide. Use when writing, reviewing, or refactoring Angular code for optimal performance, bundle size, and rendering efficiency.
validate-typescript
BerryKuipers
Run TypeScript compiler type-checking (tsc --noEmit) to validate type safety and catch type errors. Works with any TypeScript project. Returns structured output with error counts, categories (type/syntax/import errors), and affected files. Used for quality gates and pre-commit validation.
ts-testing
johnlindquist
Design, implement, and maintain high‑value TypeScript test suites using popular JS/TS testing libraries. Use this skill whenever the user is adding tests, debugging failing tests, or refactoring code that should be covered by tests.
react-best-practices
redpanda-data
Client-side React performance optimization patterns.
feature-flags
Use when feature flag tests fail, flags need updating, understanding @gate pragmas, debugging channel-specific test failures, or adding new flags to React.