skills/FORGE-react-spa-discipline/SKILL.md
React SPA discipline — component architecture, state management, and rendering patterns.
npx skillsauth add ariffazil/openclaw-workspace FORGE-react-spa-disciplineInstall 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.
DITEMPA BUKAN DIBERI — Forged, Not Given.
Enforce consistent React component architecture: state management strategy, hydration boundaries, client/server split, composition patterns.
nextjs-masterytailwind-tokens| Floor | Application |
|-------|-------------|
| F1 AMANAH | Refactor one component at a time; keep parallel implementations until verified |
| F2 TRUTH | Props and state types must match runtime shape; no any on organ data |
| F4 CLARITY | One state management pattern per feature; avoid prop drilling >3 levels |
| F7 HUMILITY | Default to controlled components with loading/empty/error states |
| F11 AUDIT | Component side effects (fetch, WebSocket) log to console in dev |
// Client/server split — "use client" only when necessary
// Default: server component → fetch data → pass as props
// State management guidelines:
// - Local UI state → useState
// - Form state → useReducer + zod validation
// - Cross-component → zustand (not context for performance)
// - Server cache → SWR or React Query (not zustand)
// Component interface pattern
interface Props {
data: OrganHealth;
onRefresh?: () => void;
className?: string;
}
// Hydration-safe pattern
const [mounted, setMounted] = useState(false);
useEffect(() => setMounted(true), []);
if (!mounted) return <Skeleton />;
any typed organ responses — always use generated typestesting
OpenClaw edge agent bridge — operational triage, doctor, restart, and A2A bridge routing for the federation edge (Telegram surface). USE WHEN: "openclaw unhealthy", "gateway down", "edge bot not responding", "a2a bridge disconnected", "watchdog tripped", "openclaw doctor", "openclaw restart". NOT for token/security audit — use FORGE-telegram-audit.
tools
Generate images, videos, TTS, voice clone, and music via MiniMax MCP server. Use when user asks to "draw", "generate image", "create picture", "make a photo", "text to image", "image generation".
testing
Single load-bearing constitutional-judgment skill. Routes all F1–F13, verdict, hold, seal, scope, authority and floor-check calls through the live arif_judge surface. Replaces 7 overlapping predecessors (arifos-constitutional-judge, arifos-constitutional-judge, arifos-constitutional-judge, arifos-constitutional-judge, arifos-constitutional-judge, arifos-constitutional-judge, arifos-constitutional-judge).
development
MANDATORY LSP grounding gate BEFORE any code mutation on .ts, .py, .js, .tsx, .jsx files. Forces the agent to read real-time compiler diagnostics and structural project context before editing — eliminating blind guesses and anchoring every mutation in F2 (TRUTH). Routes through arifOS kernel (:8088) for centralized gate logic.