skills/barnhardt-enterprises-inc/quality-gates/SKILL.md
Checkpoint framework and validation rules for all agents. Ensures quality gates are passed at every stage of development.
npx skillsauth add aiskillstore/marketplace quality-gatesInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Quality gates are checkpoints that prevent bugs from being committed. Every agent must pass these gates before proceeding.
Must pass BEFORE writing any code:
How to pass:
Must pass DURING code writing:
any, no @ts-ignore)How to pass:
npx tsc --noEmitany types: grep -r ": any" src/@ts-ignore: grep -r "@ts-ignore" src/Validators:
Must pass AFTER implementation:
How to pass:
npm test -- --runnpm test -- --coverage.skip() or .only() in testsValidators:
Must pass BEFORE finishing:
npm run buildHow to pass:
quality-gates/validate.pynpm run buildValidators:
// ❌ BLOCKS: Using 'any' type
function process(data: any) { }
// ✅ PASSES: Explicit types
function process(data: UserData): ProcessedData { }
// ❌ BLOCKS: @ts-ignore
// @ts-ignore
const value = getData()
// ✅ PASSES: Type guard
if (isValidData(value)) {
const data = getData()
}
// ❌ BLOCKS: Non-null assertion
const user = users.find(u => u.id === id)!
// ✅ PASSES: Null handling
const user = users.find(u => u.id === id)
if (!user) throw new Error('User not found')
// ❌ BLOCKS: No validation
export async function POST(request: Request) {
const body = await request.json()
const user = await createUser(body) // Unsafe!
}
// ✅ PASSES: Zod validation
import { z } from 'zod'
const createUserSchema = z.object({
email: z.string().email(),
password: z.string().min(8),
})
export async function POST(request: Request) {
const body = await request.json()
const validated = createUserSchema.parse(body)
const user = await createUser(validated)
}
// ❌ BLOCKS: No error handling
async function fetchUser(id: string): Promise<User> {
const response = await fetch(`/api/users/${id}`)
return response.json() // What if it fails?
}
// ✅ PASSES: Proper error handling
async function fetchUser(id: string): Promise<User> {
try {
const response = await fetch(`/api/users/${id}`)
if (!response.ok) {
throw new Error(`Failed to fetch user: ${response.status}`)
}
return await response.json()
} catch (error) {
logger.error('fetchUser failed', { id, error })
throw new Error(`Failed to fetch user ${id}`)
}
}
// ❌ BLOCKS: Hardcoded secrets
const apiKey = 'sk_live_abc123'
// ✅ PASSES: Environment variables
const apiKey = process.env.STRIPE_API_KEY
if (!apiKey) throw new Error('STRIPE_API_KEY not set')
// ❌ BLOCKS: SQL injection risk
const query = `SELECT * FROM users WHERE email = '${email}'`
// ✅ PASSES: Parameterized queries (Prisma)
const user = await prisma.user.findUnique({ where: { email } })
// ❌ BLOCKS: No AAA pattern
it('should work', () => {
const result = doThing()
expect(result).toBe(true)
const other = doOther()
expect(other).toBe(false)
})
// ✅ PASSES: AAA pattern
it('should return true for valid input', () => {
// ARRANGE: Setup test data
const input = { valid: true }
// ACT: Execute behavior
const result = doThing(input)
// ASSERT: Verify outcome
expect(result).toBe(true)
})
// ❌ BLOCKS: Only mock assertions for UI
it('should change color', () => {
fireEvent.click(button)
expect(mockSetColor).toHaveBeenCalled()
})
// ✅ PASSES: DOM state assertions
it('should change color', () => {
const button = getByTestId('button')
expect(button).toHaveClass('bg-blue-500')
fireEvent.click(button)
expect(button).toHaveClass('bg-red-500')
})
Agents load metadata first (this file), then supporting files as needed:
// Agent workflow example:
1. Load quality-gates skill metadata
2. Check pre-implementation gate
3. Plan implementation
4. Check implementation gate during coding
5. Write tests
6. Check testing gate
7. Request code review
8. Check review gate
9. Finish only when all gates pass
Quality gates aggregate validation from:
development
Apple Human Interface Guidelines for content display components. Use this skill when the user asks about charts component, collection view, image view, web view, color well, image well, activity view, lockup, data visualization, content display, displaying images, rendering web content, color pickers, or presenting collections of items in Apple apps. Also use when the user says how should I display charts, what's the best way to show images, should I use a web view, how do I build a grid of items, what component shows media, or how do I present a share sheet. Cross-references: hig-foundations for color/typography/accessibility, hig-patterns for data visualization patterns, hig-components-layout for structural containers, hig-platforms for platform-specific component behavior.
tools
Automate HelpDesk tasks via Rube MCP (Composio): list tickets, manage views, use canned responses, and configure custom fields. Always search tools first for current schemas.
testing
Expert Haskell engineer specializing in advanced type systems, pure functional design, and high-reliability software. Use PROACTIVELY for type-level programming, concurrency, and architecture guidance.
tools
GraphQL gives clients exactly the data they need - no more, no less. One endpoint, typed schema, introspection. But the flexibility that makes it powerful also makes it dangerous. Without proper controls, clients can craft queries that bring down your server. This skill covers schema design, resolvers, DataLoader for N+1 prevention, federation for microservices, and client integration with Apollo/urql. Key insight: GraphQL is a contract. The schema is the API documentation. Design it carefully.