frontend-technical-spec-e6ae1f — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited frontend-technical-spec-e6ae1f (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
TypeScript-based React application implementation. Architecture patterns should be selected according to project requirements and scale.
process.env does not work in browser environments// Build tool environment variables (public values only; client-exposed vars need the VITE_ prefix)
const config = {
apiUrl: import.meta.env.VITE_API_URL || 'http://localhost:3000',
appName: import.meta.env.VITE_APP_NAME || 'My App'
}
// Does not work in frontend
const apiUrl = process.env.API_URL.env files in Git (same as backend)Correct Approach for Secrets:
// Security risk: API key exposed in browser
const apiKey = import.meta.env.VITE_API_KEY
const response = await fetch(`https://api.example.com/data?key=${apiKey}`)
// Correct: Backend manages secrets, frontend accesses via proxy
const response = await fetch('/api/data') // Backend handles API key authenticationReact Component Architecture:
State Management Patterns:
useState for component-specific stateMaintain consistent data flow throughout the React application:
API Response -> State -> Props -> Render -> UI
User Input -> Event Handler -> State Update -> Re-render // Immutable state update
setUsers(prev => [...prev, newUser])
// Mutable state update (avoid)
users.push(newUser)
setUsers(users)unknown) -> Type Guard -> State (Type Guaranteed)// Type-safe data flow
async function fetchUser(id: string): Promise<User> {
const response = await fetch(`/api/users/${id}`)
const data: unknown = await response.json()
if (!isUser(data)) {
throw new Error('Invalid user data')
}
return data // Type guaranteed as User
}Use the appropriate run command based on the packageManager field in package.json.
test - Run teststest:coverage - Run tests with coveragetest:coverage:fresh - Run tests with coverage (fresh cache)test:safe - Safe test execution (with auto cleanup)cleanup:processes - Cleanup Vitest processesQuality checks are mandatory upon implementation completion:
Phase 1-3: Basic Checks
check - Biome (lint + format)build - TypeScript buildPhase 4-5: Tests and Final Confirmation
test - Test executiontest:coverage:fresh - Coverage measurementcheck:all - Overall integrated check~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.