Build React microfrontends with shared dependencies, dynamic forms, and state management.
The material appears to be a prompt/pattern document with no required secrets, no declared code execution, and no direct external endpoints, so overall risk is low. Its examples reference browser localStorage and loading frontend dependencies from esm.sh, which are normal implementation considerations rather than direct high-risk signals.
The material explicitly states that no keys or environment variables are required; the README also shows no token collection, credential injection, or credential exfiltration design.
The system flags no remote endpoints, and the skill itself is prompt-only. The README only mentions fetching React frontend modules from esm.sh in an example import map, which is an architectural example rather than a declared data-egress channel of the skill itself.
As a prompt/documentation-style skill, the material does not claim to start local processes, execute scripts, or invoke system capabilities; it mainly describes React/Vite patterns.
It does not declare reading or writing host files, databases, or other protected resources. The README's mention of localStorage sync is a frontend implementation example and does not indicate that the skill itself gains extra data-access permissions.
The source is an open-source GitHub repository, which improves auditability and lowers risk; however, it has 0 stars, no declared license, unknown maintenance status, and README examples depend on a third-party CDN/package source (esm.sh), so supply-chain maturity and long-term maintenance still warrant caution.
Copy the install command and let the AI configure it · recommended for beginners
Please install the "react-microfrontend-patterns" skill from askskill: 1. Download https://raw.githubusercontent.com/microsoft/amplifier-bundle-skills/main/skills/react-microfrontend-patterns/SKILL.md 2. Save it as ~/.claude/skills/react-microfrontend-patterns/SKILL.md 3. Reload skills and tell me it's ready
I am building a React microfrontend system that dynamically loads multiple independent bundles via import maps while sharing a single React instance. Give me a recommended architecture covering module loading, dependency sharing, versioning, and deployment considerations.
A clear React microfrontend architecture recommendation covering dynamic loading, shared dependencies, and deployment strategy.
Help me design a schema-driven dynamic form approach in React that supports field dependencies, validation rules, async option loading, and fits into a microfrontend app.
A practical dynamic form design with schema structure, rendering logic, and extension guidance.
I want to use Zustand with localStorage in a React microfrontend project to manage user preferences and cached state. Propose a state partitioning plan and explain how to avoid data conflicts across sub-apps.
A Zustand state management and local persistence plan focusing on namespacing, synchronization, and conflict avoidance.
Problem: You have multiple independently-built UI bundles that must share React at runtime, a form system driven by server-side schemas that change dynamically, and state that needs to persist in the browser and sync across tabs.
Approach: Import maps with Vite's rollupOptions.external for shared React, a useFrecency hook with exponential decay scoring, schema-to-React rendering with action-triggered schema refinement, and Zustand stores with localStorage sync.
Pattern proven in production across multiple React frontends and web services.
rollupOptions.external for shared ReactWhen multiple independently-built bundles run on the same page, each gets its own copy of React. This causes the "dual React instance" bug: hooks break because the React instance that rendered the component is different from the one providing useState.
The fix: externalize React in every bundle's Vite config and provide it via an import map in the HTML:
<!-- index.html -->
<script type="importmap">
{
"imports": {
"react": "https://esm.sh/[email protected]",
"react-dom": "https://esm.sh/[email protected]",
"react-dom/client": "https://esm.sh/[email protected]/client",
"react/jsx-runtime": "https://esm.sh/[email protected]/jsx-runtime"
}
}
</script>
// vite.config.ts
export default defineConfig({
build: {
rollupOptions: {
external: ['react', 'react-dom', 'react-dom/client', 'react/jsx-runtime'],
},
},
})
Vite's dev server ignores browser import maps — it pre-bundles CJS modules and serves them from /.vite/deps/. This means dynamically-loaded bundles that use bare import React from 'react' will resolve via the import map to a different React instance than the host app.
Solutions: Use @vitejs/plugin-react with careful configuration, or write a custom Vite plugin that serves shim modules redirecting bare specifiers to Vite's pre-bundled paths during dev. This is inherently complex — consult your Vite config documentation for the specifics of your setup.
Frecency (frequency + recency) ranks autocomplete results by how often AND how recently a user selected them:
// hooks/useFrecency.ts
const DECAY_HALF_LIFE_MS = 7 * 24 * 60 * 60 * 1000 // 1-week half-life
const STORAGE_KEY = 'frecency-data'
const _suggestionCache = new Map<string, string[]>() // module-level perf cache
interface FrecencyEntry {
score: number
lastUsed: number // timestamp ms
}
function computeScore(entry: FrecencyEntry, now: number): number {
const ageFraction = (now - entry.lastUsed) / DECAY_HALF_LIFE_MS
return entry.score * Math.pow(0.5, ageFraction)
}
function useFrecency(namespace: string) {
const [entries, setEntries] = useState<Record<string, FrecencyEntry>>(() => {
const stored = localStorage.getItem(`${STORAGE_KEY}:${namespace}`)
return stored ? JSON.parse(stored) : {}
})
const getSuggestions = useCallback((fieldKey: string, allValues: string[]) => {
const cacheKey = `${namespace}:${fieldKey}`
if (_suggestionCache.has(cacheKey)) return _suggestionCache.get(cacheKey)!
const now = Date.now()
const sorted = [...allValues].sort((a, b) => {
const sa = entries[a] ? computeScore(entries[a], now) : 0
const sb = entries[b] ? computeScore(entries[b], now) : 0
return sb - sa
})
_suggestionCache.set(cacheKey, sorted)
return sorted
}, [namespace, entries])
const recordValue = useCallback((fieldKey: string, value: string) => {
_suggestionCache.clear()
setEntries(prev => {
const now = Date.now()
const existing = prev[value] ?? { score: 0, lastUsed: now }
const updated = { ...prev, [value]: { score: existing.score + 1, lastUsed: now } }
…
Research, plan, and execute large code changes with parallel PR-producing agents.
Analyze images, extract text, and answer visual questions with LLM vision models.
Design robust config and state file handling with safe defaults and crash recovery.
Get skeptical, practical guidance on architecture, legacy refactors, and tooling decisions.
Design auth and TLS patterns for smooth local use and secure remote access.
Design CLI tools with simple installs, command routing, and layered config.
Learn frontend patterns for React, Next.js, state, performance, and UI best practices.
Build accessible React and Next.js interfaces with robust UI accessibility patterns.
Write and review React 18/19 components using modern best practices.
Optimize React and Next.js performance during coding, review, and refactoring.
Build polished React and Next.js animations with reusable production-ready patterns.
Build reusable UI animations and transitions for React and Next.js products.