Codegen React logo

Codegen React

Organization
initializ
codegen-react

Scaffold and iterate on Vite + React applications

Overview

Publisherinitializ
Repositoryforge
Skill namecodegen-react
Stars
242
Forks
14
Bundled files
4
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 4 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by initializ on GitHub. Read the source before you install it.

Installation

Install the Codegen React AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/initializ/forge/tree/main/forge-skills/local/embedded/codegen-react
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/initializ/forge.git /tmp/forge
mkdir -p .claude/skills
cp -r /tmp/forge/forge-skills/local/embedded/codegen-react .claude/skills/codegen-react
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Codegen React in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Codegen React on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Codegen React is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Codegen React Skill

Scaffold and iteratively build Vite + React applications. Creates a complete project structure with React 19, Vite 6, and a Forge-themed dark UI out of the box.

Quick Start

bash
# Scaffold a new project
./scripts/codegen-react-scaffold.sh '{"project_name": "my-app", "output_dir": "/tmp/my-app"}'

# Install deps and start dev server (opens browser)
./scripts/codegen-react-run.sh '{"project_dir": "/tmp/my-app"}'

# Read a file or list the project
./scripts/codegen-react-read.sh '{"project_dir": "/tmp/my-app", "file_path": "src/App.jsx"}'

# Write/update a file (Vite hot-reloads automatically)
./scripts/codegen-react-write.sh '{"project_dir": "/tmp/my-app", "file_path": "src/App.jsx", "content": "..."}'

CRITICAL: Scaffold Conventions (DO NOT VIOLATE)

These rules prevent build errors. Violating them will break the app:

  1. NEVER modify src/main.jsx — it is the entry point and must not be changed
  2. ALWAYS use named exports: export function ComponentName() {}, NEVER export default
  3. NEVER create or import index.css — it does not exist and will cause a build error
  4. Use Tailwind CSS utility classes for all styling (loaded via CDN in index.html)
  5. Only modify src/App.jsx and create new component files under src/
  6. src/App.css exists for custom styles but prefer Tailwind classes

Code Style Guide

  • Use functional components with hooks (useState, useEffect, useRef, etc.)
  • Use named exports for components: export function App() {}
  • Keep components in separate files under src/
  • Use Tailwind CSS utility classes — the CDN is pre-loaded in index.html
  • Forge dark theme colors: bg-zinc-950 (bg), bg-zinc-900 (cards), border-zinc-800 (borders), text-zinc-200 (text), text-zinc-400 (muted), bg-indigo-500 (accent)
  • Prefer const over let; never use var

Tailwind CSS Reference

Tailwind is loaded via CDN. Use utility classes directly in JSX className attributes:

  • Layout: flex, grid, gap-4, max-w-4xl, mx-auto, px-6, py-12
  • Colors: bg-zinc-950, bg-zinc-900, text-zinc-200, text-zinc-400, bg-indigo-500
  • Borders: border, border-zinc-800, rounded-lg, shadow-lg
  • Typography: text-3xl, font-bold, text-center, font-mono
  • Interactive: hover:bg-indigo-400, transition-colors, cursor-pointer

Do NOT write custom CSS classes when Tailwind utilities exist. Do NOT create new .css files.

Safety Constraints

  • Output directory must be under $HOME or /tmp
  • Non-empty directories require force: true to overwrite
  • Path traversal (.., absolute paths) is rejected in read/write operations
  • No network calls during scaffold (all files generated locally)

Iteration Workflow

  1. Scaffold the project with codegen_react_scaffold
  2. Run the dev server with codegen_react_run — installs deps and opens the browser
  3. Read files to understand current state with codegen_react_read
  4. Write updated files with codegen_react_write — Vite hot-reloads automatically
  5. Repeat steps 3-4 to iterate on the UI

When to Use

Use codegen-react when the user wants:

  • A full React application with build tooling (Vite)
  • Component-based architecture with JSX
  • Hot module replacement during development
  • npm package ecosystem access

For simpler needs (single HTML file, no build step), use codegen-html instead.

Tool: codegen_react_scaffold

Create a new Vite + React project with Forge-themed dark UI.

Input:

ParameterTypeRequiredDescription
project_namestringyesName for the project (used in package.json)
output_dirstringyesAbsolute path for the project directory
titlestringnoPage title. Default: project_name
forcebooleannoOverwrite non-empty directory. Default: false

Output: JSON object with status, output_dir, and list of files created.

Response Format

json
{
  "status": "created",
  "output_dir": "/tmp/my-app",
  "project_name": "my-app",
  "files": [
    "package.json",
    "vite.config.js",
    "index.html",
    "src/main.jsx",
    "src/App.jsx",
    "src/App.css",
    ".gitignore"
  ]
}

Tool: codegen_react_read

Read a file or list the project directory.

Input:

ParameterTypeRequiredDescription
project_dirstringyesAbsolute path to the project directory
file_pathstringyesRelative path to read, or "." for directory listing

Output: JSON object with path, content (or listing), size, and modified timestamp.

Response Format (file)

json
{
  "path": "src/App.jsx",
  "content": "export function App() { ... }",
  "size": 245,
  "modified": "2025-01-15T10:30:00Z"
}

Response Format (directory listing)

json
{
  "path": ".",
  "type": "directory",
  "files": [
    "package.json",
    "vite.config.js",
    "index.html",
    "src/main.jsx",
    "src/App.jsx",
    "src/App.css"
  ]
}

Tool: codegen_react_write

Write or update a file in the project.

Input:

ParameterTypeRequiredDescription
project_dirstringyesAbsolute path to the project directory
file_pathstringyesRelative path to write
contentstringyesComplete file content

Output: JSON object with path, action (created/updated), and size.

Response Format

json
{
  "path": "src/App.jsx",
  "action": "updated",
  "size": 312
}

Tool: codegen_react_run

Install dependencies and start the Vite dev server. Automatically opens the browser.

Call this tool after scaffolding to get the app running. It installs node_modules (if not already present) and starts npm run dev in the background. Vite hot-reloads on file changes, so subsequent codegen_react_write calls update the browser automatically.

Input:

ParameterTypeRequiredDescription
project_dirstringyesAbsolute path to the project directory (must contain package.json)

Output: JSON object with status, url, pid, and install status.

Response Format

json
{
  "status": "running",
  "url": "http://localhost:3000",
  "pid": 12345,
  "project_dir": "/tmp/my-app",
  "install": "installed"
}

Tips

  • Call this once after codegen_react_scaffold — the server stays running
  • After the server is running, just use codegen_react_write to update files — Vite hot-reloads automatically
  • The install field is "installed" on first run and "skipped" on subsequent runs
  • The pid can be used to stop the server later with kill <pid>

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Codegen React AI skill do?

Scaffold and iterate on Vite + React applications

Why use Codegen React on TypingMind?

Because you install it once and use it with any model. Codegen React is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Codegen React in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/initializ/forge/tree/main/forge-skills/local/embedded/codegen-react. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Codegen React?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Codegen React?

As many as you like. As long as a model supports skills, you can use Codegen React with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Codegen React AI skill free?

Yes. It is published on GitHub by initializ under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇