Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

setup-leafygreen

Skill by mongodb

Sets up MongoDB's LeafyGreen UI design system in a Vite + React + TypeScript project. It is for developers who want to install, configure and smoke test LeafyGreen components.

  • Score 79
  • 275 stars
  • Apache-2.0
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install setup-leafygreen

Built from the published package, never by AI.

git clone --depth 1 https://github.com/mongodb/leafygreen-ui /tmp/leafygreen-ui && mkdir -p ~/.claude/skills && cp -r /tmp/leafygreen-ui/.agents/skills/setup-leafygreen ~/.claude/skills/setup-leafygreen

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install setup-leafygreen in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

This skill guides an AI assistant through setting up MongoDB's LeafyGreen UI design system in a Vite + React + TypeScript project. It installs the LeafyGreen packages and vite-plugin-node-polyfills, then updates vite.config.ts with React deduplication and a Node polyfill plugin. It wraps the app in LeafyGreenProvider in src/main.tsx and replaces the default index.css.

The skill then replaces App.tsx with a smoke test that renders H1 and Button, creates a src/components folder, and checks the setup with npm run dev and npm run build. A gotchas reference covers known issues such as blank pages and multiple React copies. It is intended for developers setting up LeafyGreen in a Vite + React + TypeScript project.

Written from the project's SKILL.md and checked against it.

What it can do

  • Install LeafyGreen packagesInstalls the provider, typography, button, tokens, icon, icon-button and logo packages.
  • Configure ViteReplaces vite.config.ts with React deduplication, aliases and Node polyfills.
  • Wrap the app with the providerAdds LeafyGreenProvider with dark mode to src/main.tsx.
  • Apply base stylesReplaces src/index.css with MongoDB fonts and a dark body background.
  • Smoke test componentsRenders an H1 and a Button in App.tsx to confirm components load.
  • Verify the buildRuns npm run dev and npm run build to check the setup.

What you need

  • npm, used for all install and run commands
  • A Vite + React + TypeScript project, or permission to scaffold one with npm create vite
  • A browser to check the dev page

Try asking

  • Set up LeafyGreen UI in this Vite + React + TypeScript project
  • Install LeafyGreen packages and configure vite.config.ts
  • Add a LeafyGreen smoke test to App.tsx and verify the build

Good to know

  • Only for Vite + React + TypeScript projects; it checks for this before starting.
  • Replaces the full contents of vite.config.ts, src/index.css and src/App.tsx, and empties src/App.css.
  • Fonts load from MongoDB's CloudFront URLs.
  • Set to manual invocation only (disable-model-invocation: true).

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: .agents/skills/setup-leafygreen/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md6 KB
  • references/gotchas.md6 KB

Alternatives to setup-leafygreen

All alternatives →
openclaw-github-repo-commandersickn33
94

Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.

AAA Skill 50k
gradiogradio-app
94

Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.

AAA Skill 44k
hig-components-menussickn33
94

Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.

AAA Skill 50k
fastapi-templateswshobson
94

Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.

AAA Skill 43k
appfunctionsandroid
94

Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.

AAA Skill 11k
agent-qa-authoringsickn33
94

Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.

AAA Skill 50k

Compare with openclaw-github-repo-commander, gradio or hig-components-menus

setup-leafygreen: common questions

Why does LeafyGreen need a React alias in Vite?

LeafyGreen packages bundle their own React copy, which can cause an Invalid hook call crash in the browser. The config dedupes react and react-dom to the single project instance.

Why might my page render blank after setup?

The source says a missing vite-plugin-node-polyfills package can leave the app blank with no visible error. Troubleshooting steps are in references/gotchas.md.

Where should LeafyGreenProvider be placed?

LeafyGreenProvider is a default export and should wrap the app in src/main.tsx only, not in App.tsx.

How do I install setup-leafygreen?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is setup-leafygreen free?

The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.

Is setup-leafygreen safe to use?

It scores 79 of 100. Grades: maintenance A, licence A, quality B. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to setup-leafygreen?

Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.

setup-leafygreen Install

Add to stack

Loading.