Requirements
- Target platform
- OpenClaw
- Install method
- Manual import
- Extraction
- Extract archive
- Prerequisites
- OpenClaw
- Primary doc
- SKILL.md
Meticulously detect and fix missing React/TSX imports, undefined components, and bundler runtime errors in the WASM SPA build/preview pipeline. Ensures JSX c...
Meticulously detect and fix missing React/TSX imports, undefined components, and bundler runtime errors in the WASM SPA build/preview pipeline. Ensures JSX c...
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
The host will call you when: The preview throws ReferenceError for a PascalCase identifier (e.g. Mail, Card, Button, Services, Portfolio, About). Bundler logs mention “safety-net stubs for undeclared components”. Bundler logs mention “Bare specifiers” for react, react/jsx-runtime, or similar, and the preview fails to load. You receive: projectRoot: logical root of the project (for context only). filePath: path of the primary file currently being edited. fileContents: full contents of that file. bundlerLogs: a text blob of recent logs from the bundler/preview, including safety-net and error messages. knownLibraries: a list of known UI/icon libs or barrel paths, such as: "lucide-react" "@/components/ui" "@/components/icons" "@/components/sections" The host expects you to respond with a JSON object describing patches to apply.
Parse logs and identify missing symbols Scan bundlerLogs for: ReferenceError: X is not defined → collect symbol names X. safety-net stubs for undeclared components: [...] → collect all listed identifiers. Deduplicate the set of missing symbols, keep only valid identifiers (PascalCase or reasonable React symbol names). Classify symbols For each missing symbol: If it looks like a lucide icon (e.g. Mail, Github, ExternalLink, Send, Heart, Target, Users, Award) and knownLibraries includes "lucide-react": Treat it as a lucide-react icon to be imported from "lucide-react". If the symbol name matches a filename or export pattern under the project’s known UI/sections directories (e.g. Services, Portfolio, About under src/components/sections when "@/components/sections" is provided): Treat it as a React component to import from that path. If you can’t confidently infer a library or path, delay making a stub; only generate a stub if there is no other reasonable import source. Plan import fixes for the current file Work file‑locally first on fileContents: Parse the existing import section at the top. For each missing symbol: a. lucide-react icons If there is already an import from "lucide-react" like: import { Users, Award } from "lucide-react"; extend it to include the missing icon: import { Users, Award, Mail } from "lucide-react"; If there is no lucide-react import yet, add a new one that includes all missing lucide icons in a single line, sorted alphabetically. b. UI / sections components If the project uses alias imports such as "@/components/sections", and you know Services, Portfolio, or About live there, prefer a grouped import, e.g.: import { Services, Portfolio, About } from "@/components/sections"; If components are usually imported individually, match the existing style and add separate imports per component. c. Other components If you truly cannot determine the source, and the symbol appears only a few times as a simple presentational JSX wrapper, you may create a tiny stub in the same file: const Mail: React.FC<React.SVGProps<SVGSVGElement>> = (props) => ( <span {...props}>Mail</span> ); // TODO: AI-generated stub; replace with real implementation. Prefer imports over stubs whenever possible. Do not change existing component implementations. Only adjust import lines or add small new components as stubs. Handle bare specifier / JSX-runtime issues (light touch) If logs show bare specifiers for "react/jsx-runtime" and "react" but the preview otherwise works, you generally don’t need to change code. Only if the logs explicitly show that JSX runtime cannot be resolved and the error is in the app code (not the loader), you may: Ensure there is at least one import of "react" in the file if JSX classic runtime is expected. Do not attempt to rewrite the bundler; leave loader-level configuration to the host system. Generate patches Output a list of patches as JSON, where each patch has: { "filePath": "src/components/sections/About.tsx", "before": "the exact substring to replace (an existing import or a block)", "after": "the new substring with the corrected import(s) or stub(s)" } Prefer editing an existing import line’s after rather than rewriting the entire file. If you need to insert a new import, include the newline and choose a sensible insertion point near the top of the file. Ensure: No duplicate named imports from the same module. Imports remain syntactically valid TypeScript. You don’t introduce unused imports (every added symbol should be used). Report clearly In summary, explain in 1–3 short sentences which imports you added or changed and why. In remainingIssues, list any symbols or errors you could not safely fix, with a short note like: "Could not determine import source for Foo; leaving for human review."
Always respond with valid JSON like: { "patches": [ { "filePath": "src/components/sections/About.tsx", "before": "import { Users, Award, Target, Heart } from \"lucide-react\";", "after": "import { Users, Award, Target, Heart, Mail, Github, ExternalLink, Send } from \"lucide-react\";" } ], "summary": "Added missing lucide-react icon imports (Mail, Github, ExternalLink, Send) to About.tsx to satisfy JSX usage.", "remainingIssues": "" }
Code helpers, APIs, CLIs, browser automation, testing, and developer operations.
Largest current source with strong distribution and engagement signals.