platform-separation-validator

Validates client-server import paths and enforces platform separation in React Native and NestJS codebases.

2|Updated Feb 14, 2026
One-click install
npx skills add https://github.com/Gamaroff/agent-skills --skill platform-separation-validator-gamaroff
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: platform-separation-validator
Source: https://github.com/Gamaroff/agent-skills/tree/main/skills/platform-separation-validator
Command: npx skills add https://github.com/Gamaroff/agent-skills --skill platform-separation-validator-gamaroff

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Mixing Node.js server code into React Native client bundles causes build failures, runtime crashes, and security vulnerabilities like client-side password hashing or JWT validation. This Skill detects platform separation violations and guides developers toward compliant import patterns. ## Core Features & Use Cases - Import Path Validation: Checks that React Native files use /client library imports and never pull in Node.js modules like crypto, fs, or bcrypt. - Security Boundary Enforcement: Ensures cryptography, password hashing, and JWT signing remain server-side while clients only parse tokens for UX. - Violation Detection & Fixes: Identifies common anti-patterns (client-side bcrypt, JWT verification, file system access) and provides corrected code examples. - Use Case: When reviewing a pull request that adds authentication to a React Native app, use this Skill to verify all auth-lib imports use /client paths and that password handling goes through API endpoints instead of client-side hashing. ## Quick Start Review the changed files in this pull request for platform separation violations and report any Node.js imports or client-side crypto operations.

Frequently Asked Questions about platform-separation-validator

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix 'Cannot find module' errors for crypto or bcrypt in React Native?▼

These errors occur when React Native code imports Node.js modules like crypto or bcrypt, which don't exist in the mobile runtime. Replace server library imports with `/client` entry points and move cryptographic operations to API endpoints on the NestJS server.

How to validate client-server import separation in a monorepo?▼

Check that all React Native files import shared libraries via `/client` paths (e.g., '@your-org/auth-lib/client') rather than default exports. Grep for Node.js built-ins like fs, crypto, and bcrypt in client code, and verify the Metro bundler completes without dependency warnings.

Can React Native apps validate JWT tokens client-side?▼

No, JWT signature verification must happen server-side where the secret lives. React Native clients should only parse tokens with decodeToken for UX purposes like expiration display, while the NestJS server performs actual verification with jwt.verify.

Why does the Metro bundler fail after adding an authentication library?▼

Metro fails when the auth library's default export bundles Node.js dependencies like bcrypt or jsonwebtoken. Switch to the library's `/client` entry point, which excludes server-only crypto code and reduces bundle size.

What operations must stay server-side in a client-server architecture?▼

Password hashing with bcrypt or argon2, JWT signing and verification, AES encryption, private key operations, file system access, and environment variable reads must remain server-side. Clients send plaintext credentials over HTTPS and call API endpoints for these operations.