Agent skill
quetrex-architect
Use when implementing new features in Quetrex. Ensures TDD, TypeScript strict mode, Next.js App Router patterns, ShadCN UI components, and security best practices are followed. Updated for November 2025 standards.
Install this agent skill to your Project
npx add-skill https://github.com/aiskillstore/marketplace/tree/main/skills/barnhardt-enterprises-inc/quetrex-architect
SKILL.md
Quetrex Architecture Enforcer
When to Use
- Creating new features
- Refactoring existing code
- Reviewing PRs
- Ensuring pattern compliance
Process
- Read CLAUDE.md for project context
- Read .quetrex/memory/patterns.md for architectural patterns (if exists)
- Check if feature uses correct patterns:
- TypeScript strict (no any, no @ts-ignore)
- Zod validation for API routes
- Server Components vs Client Components
- SSE pattern for streaming
- If violations found, explain correct pattern
- Guide implementation following TDD
Patterns to Enforce
TypeScript Strict Mode
// ✅ DO: Explicit types
function calculateTotal(items: CartItem[]): number {
return items.reduce((sum, item) => sum + item.price, 0)
}
// ❌ DON'T: Using 'any'
function processData(data: any) { }
// ✅ DO: Use type guards
function isCartItem(obj: unknown): obj is CartItem {
return typeof obj === 'object' && obj !== null && 'price' in obj
}
Next.js App Router Patterns
// ✅ DO: Server Component (default)
export default async function DashboardPage() {
const projects = await prisma.project.findMany()
return <ProjectList projects={projects} />
}
// ✅ DO: Client Component (when needed)
'use client'
export function InteractiveButton() {
const [count, setCount] = useState(0)
return <button onClick={() => setCount(count + 1)}>{count}</button>
}
// ❌ DON'T: Async Client Component
'use client'
export default async function BadComponent() { } // ERROR
Zod Validation
// ✅ DO: Validate all API input
import { z } from 'zod'
const createProjectSchema = z.object({
name: z.string().min(1).max(100),
description: z.string().optional(),
})
export async function POST(request: Request) {
const body = await request.json()
const validated = createProjectSchema.parse(body) // Throws if invalid
// ... use validated data
}
// ❌ DON'T: Unvalidated input
export async function POST(request: Request) {
const { name, description } = await request.json() // No validation
}
ShadCN UI Patterns (November 2025 Standard)
// ✅ DO: Use ShadCN UI components
import { Button } from "@/components/ui/button"
import { Dialog, DialogContent, DialogHeader, DialogTitle } from "@/components/ui/dialog"
import { Form, FormField, FormItem, FormLabel, FormControl } from "@/components/ui/form"
// ✅ DO: Use DialogTrigger with asChild
<DialogTrigger asChild>
<Button>Open</Button>
</DialogTrigger>
// ❌ DON'T: Create custom buttons without ShadCN
<button className="px-4 py-2 bg-blue-500">Bad</button>
// ✅ DO: Use Form component with React Hook Form + Zod
const form = useForm<z.infer<typeof schema>>({
resolver: zodResolver(schema),
})
<Form {...form}>
<FormField ... />
</Form>
// ❌ DON'T: Use uncontrolled forms
<form>
<input name="email" /> {/* No validation */}
</form>
→ See: shadcn-ui-patterns skill for complete component library
Security Patterns
// ❌ DON'T: Hardcoded secrets
const apiKey = 'sk_live_abc123'
// ✅ DO: Environment variables
const apiKey = process.env.OPENAI_API_KEY
if (!apiKey) throw new Error('OPENAI_API_KEY not configured')
// ❌ DON'T: SQL injection
const query = `SELECT * FROM users WHERE email = '${email}'`
// ✅ DO: Parameterized queries (Drizzle)
const user = await db.query.users.findFirst({ where: eq(users.email, email) })
TDD Requirements
- Write tests FIRST
- Verify tests FAIL
- Write implementation
- Verify tests PASS
- Refactor as needed
Coverage Thresholds
- Overall: 75%+
- Business Logic (src/services/): 90%+
- Utilities (src/utils/): 90%+
- UI Components: 60%+
Common Mistakes to Catch
- Using 'any' type (suggest explicit types or unknown)
- Using @ts-ignore (suggest fixing underlying issue)
- Async Client Components (suggest Server Component or remove async)
- Missing Zod validation on API routes
- Hardcoded secrets (suggest environment variables)
- console.log in production code (suggest proper logger)
Output Format
When violations found:
- List each violation with file and line number
- Explain why it's a violation
- Show correct pattern
- Provide code example to fix it
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
perigon-backend
Perigon ASP.NET Core + EF Core + Aspire conventions
perigon-agent
Pointers for Copilot/agents to apply Perigon conventions
perigon-angular
Angular 21+ standalone/Material/signal conventions for Perigon WebApp
fastapi-mastery
Comprehensive FastAPI development skill covering REST API creation, routing, request/response handling, validation, authentication, database integration, middleware, and deployment. Use when working with FastAPI projects, building APIs, implementing CRUD operations, setting up authentication/authorization, integrating databases (SQL/NoSQL), adding middleware, handling WebSockets, or deploying FastAPI applications. Triggered by requests involving .py files with FastAPI code, API endpoint creation, Pydantic models, or FastAPI-specific features.
context7-efficient
Token-efficient library documentation fetcher using Context7 MCP with 86.8% token savings through intelligent shell pipeline filtering. Fetches code examples, API references, and best practices for JavaScript, Python, Go, Rust, and other libraries. Use when users ask about library documentation, need code examples, want API usage patterns, are learning a new framework, need syntax reference, or troubleshooting with library-specific information. Triggers include questions like "Show me React hooks", "How do I use Prisma", "What's the Next.js routing syntax", or any request for library/framework documentation.
browser-use
Browser automation using Playwright MCP. Navigate websites, fill forms, click elements, take screenshots, and extract data. Use when tasks require web browsing, form submission, web scraping, UI testing, or any browser interaction.
Didn't find tool you were looking for?