Enforces SHIELD 2.0 testing and CI/CD requirements to maintain quality standards before merging.
Install
mkdir -p .claude/skills/shield-testing && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/19344" && unzip -o skill.zip -d .claude/skills/shield-testing && rm skill.zipInstalls to .claude/skills/shield-testing
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.
Testing and CI/CD requirements for SHIELD 2.0. Use this when writing tests, preparing PRs, or ensuring code quality before merge.Key capabilities
- →Format code using Prettier
- →Lint source code
- →Execute unit tests
- →Build the project
- →Mock Electron APIs
How it works
It enforces a pre-merge checklist and testing structure that requires formatting, linting, and unit testing for all new features.
Inputs & outputs
When to use shield-testing
- →Verify code quality before merge
- →Run unit tests for new features
- →Check build and lint status
- →Update documentation for tests
About this skill
SHIELD 2.0 Testing Guidelines
Pre-Merge Checklist
ALL checks must pass before merging to main:
npm run format- Run Prettiernpm run lint- Zero errors/warningsnpm test -- --run- All tests passnpm run build- Successful build- Manual testing completed
- Documentation updated
Test Requirements
Unit Tests
- Required for all new features
- Aim for >80% coverage on business logic
- Located next to source files (
*.test.ts)
Test Structure
import { describe, it, expect, vi } from "vitest";
describe("ComponentName", () => {
describe("methodName", () => {
it("should do expected behavior", () => {
// Arrange
// Act
// Assert
});
});
});
Mocking
// Mock Electron APIs
vi.mock("electron", () => ({
ipcRenderer: {
invoke: vi.fn(),
on: vi.fn(),
},
}));
// Mock window.electronAPI
Object.defineProperty(window, "electronAPI", {
value: {
llm: { loadModel: vi.fn() },
},
});
CI/CD Pipeline
GitHub Actions runs on every PR:
- Format Check:
npx prettier --check "**/*.{ts,tsx,js,json,md,yml}" - Lint:
npm run lint - Type Check:
npx tsc --noEmit - Tests:
npm test -- --run - Build:
npm run build
Test Files Location
src/
├── App.test.ts
├── components/
│ └── chat/
│ └── chat.test.ts
electron/
└── services/
├── MCPService.test.ts
└── AuditLogTypes.test.ts
Running Tests
# Run all tests
npm test -- --run
# Watch mode
npm test
# Specific file
npm test -- src/App.test.ts
# With coverage
npm test -- --coverage
What to Test
- Business logic functions
- State store actions
- IPC handlers
- Utility functions
- Component rendering (basic)
What NOT to Test
- Third-party library internals
- Electron main process directly
- LLM inference (mock it)
When not to use it
- →Testing third-party library internals
- →Testing Electron main process directly
- →Testing LLM inference
Prerequisites
Limitations
- →Zero linting errors allowed
- →Aim for >80% coverage on business logic
How it compares
It mandates specific CI/CD pipeline steps and mocking patterns for SHIELD 2.0 rather than allowing arbitrary testing configurations.
Compared to similar skills
shield-testing side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| shield-testing (this skill) | 0 | 5mo | Review | Intermediate |
| feature-flags | 6 | 6mo | Review | Intermediate |
| testing-workflow | 16 | 9mo | Review | Intermediate |
| playwright-pro | 8 | 2mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
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.
testing-workflow
amo-tech-ai
Comprehensive testing workflow for E2E, integration, and unit tests. Use when testing applications layer-by-layer, validating user journeys, or running test suites.
playwright-pro
alirezarezvani
Production-grade Playwright testing toolkit. Use when the user mentions Playwright tests, end-to-end testing, browser automation, fixing flaky tests, test migration, CI/CD testing, or test suites. Generate tests, fix flaky failures, migrate from Cypress/Selenium, sync with TestRail, run on BrowserStack. 55 templates, 3 agents, smart reporting.
fixing-streamlit-ci
streamlit
Analyze and fix failed GitHub Actions CI jobs for the current branch/PR. Use when CI checks fail, PR checks show failures, or you need to diagnose lint/type/test errors and verify fixes locally.
e2e-test-developer
eclipse-che
Comprehensive E2E test development guidance for Eclipse Che / Red Hat OpenShift Dev Spaces. Use this skill when writing, modifying, or reviewing TypeScript Mocha Selenium tests, page objects, utilities, or test infrastructure. Provides code style rules, patterns, dependency injection setup, and best practices.
s2-lint
antvis
After modifying S2 project code, you must run lint to ensure there are no errors, avoiding issues when pushing to git.