Communitygithub.com

Geruyang/agent-skills-library

在 Vercel 上构建、配置和部署微前端的指南。当用户提到微前端、多区域、跨团队拆分应用、独立部署、跨应用路由、增量迁移、在单个域名下组合多个前端、microfrontends.json、@vercel/microfrontends、微前端本地代理或 Vercel 项目间基于路径的路由时,请使用本技能。同样适用于用户询问多个项目的共享布局、微前端间的导航、回退环境、资产前缀或功能开关控制的路由时。

agent-skills-library 是什么?

这是一个关于 Vercel 微前端的详细技能指南,帮助开发者将一个大型应用拆分为多个独立部署的单元,同时保持它们作为一个统一的应用呈现给用户。Vercel 通过其全球网络和 `microfrontends.json` 配置文件处理请求路由,核心概念包括默认应用(持有配置文件并处理未匹配请求)、子应用(定义路径匹配模式)、资产前缀(防止静态资源冲突)以及独立部署。该技能支持多种主流框架,如 Next.js(App Router 和 Pages Router)、SvelteKit、React Router 和 Vite,并通过 `@vercel/microfrontends` 工具包提供集成。技能还提供了强大的 CLI 命令(如 `vercel microfrontends`),用于创建和管理微前端组、本地开发代理以及检查项目配置。此外,技能中包含了详细的参考文档,涵盖配置、路径路由、本地开发、安全管理等主题,建议在回答具体问题时按需搜索特定参考文件,而非一次性加载所有内容,从而高效利用上下文空间。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/Geruyang/agent-skills-library/tree/HEAD/original-skills/x-openai-microfrontends-4b38860

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

Vercel 微前端

将大型应用拆分为独立部署的单元,使它们作为统一的整体应用展示给用户。Vercel 通过其全球网络使用 microfrontends.json 处理路由。

核心概念: 默认应用(持有 microfrontends.json,处理未匹配请求)· 子应用(定义 routing 路径模式)· 资产前缀(防止静态资源冲突)· 独立部署。

支持的框架: Next.js(App Router + Pages Router)、SvelteKit、React Router、Vite —— 均通过 @vercel/microfrontends 支持。

CLI(vercel microfrontends / vercel mf):

  • create-group —— 创建新组;默认交互式,或使用 --non-interactive 完全非交互式(选项:--name、--project(可重复)、--default-app、--default-route、--project-default-route(可重复,格式:<project>=<route>,非交互模式下每个非默认项目必需)、--yes 跳过确认提示);注意:如果添加项目会超出免费层限制,则 --non-interactive 会被阻止——用户必须交互式确认计费变更
  • add-to-group —— 将当前项目添加到现有组;需要交互式终端(选项:--group、--default-route)
  • remove-from-group —— 从组中移除当前项目;需要交互式终端(选项:--yes 仅跳过项目链接提示)
  • delete-group —— 删除一个组及其所有设置,不可逆;需要交互式终端(选项:--group 预选组)
  • inspect-group —— 获取组元数据(项目名称、框架、Git 仓库、根目录);有助于自动化设置(选项:--group、--format=json、--config-file-name)
  • pull —— 拉取远程 microfrontends.json 用于本地开发(选项:--dpl)
  • microfrontends proxy —— 本地开发代理 · microfrontends port —— 打印自动分配的端口

查找详细信息

本技能在 references/ 目录中包含了详细的参考文档。不要一次性读取所有参考文件。 当用户询问具体主题时,搜索或 grep 相关文件:

主题参考文件
入门指南、快速开始、框架设置、microfrontends.json 模式、字段、命名、示例references/configuration.md
路径表达式、资产前缀、功能开关控制的路由、中间件references/path-routing.md
本地代理设置、多仓库配置、Turborepo、端口、部署保护references/local-development.md
检查组(inspect-group)、添加/移除项目、回退环境、导航、可观测性references/managing-microfrontends.md
测试工具(validateMiddlewareConfig、validateRouting 等)、调试头、常见问题references/troubleshooting.md
部署保护、Vercel 防火墙、微前端 WAF 规则references/security.md

当用户询问特定主题时,使用 grep 或搜索相关参考文件来查找答案,避免将全部参考内容加载到上下文中。

Individual skills in this repo

This repo contains 12 individual skills — each has its own dedicated page.

Geruyang/agent-skills-library

Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.

Geruyang/agent-skills-library

Set up Tailwind CSS v4 in Expo with react-native-css and NativeWind v5 for universal styling

Geruyang/agent-skills-library

Use for new frontend applications, dashboards, games, creative websites, hero sections, and visually driven UI from scratch, or when the user explicitly asks for a redesign/restyle/modernization. Builds from clean, airy, high-taste, readable image-generated concept design with section-specific references, faithful implementation, and browser testing.

Geruyang/agent-skills-library

Use when testing, debugging, or making targeted improvements to rendered frontend apps through the Build Web Apps or web dev plugin: local dev servers, UI regressions, interaction bugs, console errors, responsive layout, and visual QA. Check whether the Browser plugin is available and use it first when it is; otherwise use regular Playwright with the recorded reason.

Geruyang/agent-skills-library

Design UI surfaces for browser games. Use when the user asks for HUDs, menus, overlays, responsive layouts, or visual direction that must protect the playfield.

Geruyang/agent-skills-library

GSAP animation reference for HyperFrames. Covers gsap.to(), from(), fromTo(), easing, stagger, defaults, timelines (gsap.timeline(), position parameter, labels, nesting, playback), and performance (transforms, will-change, quickTo). Use when writing GSAP animations in HyperFrames compositions.

Geruyang/agent-skills-library

Next.js App Router expert guidance. Use when building, debugging, or architecting Next.js applications — routing, Server Components, Server Actions, Cache Components, layouts, middleware/proxy, data fetching, rendering strategies, and deployment on Vercel.

Geruyang/agent-skills-library

Use when sizing Public Equity Investing positions, finding equity hedges, or building an integrated position-and-hedge risk plan from a listed-equity thesis. Do not use for thesis construction, standalone event underwriting, trade execution, personal investment advice, or credit-instrument risk.

Geruyang/agent-skills-library

Integrate data visualizations into React and Next.js applications. Use when the user needs chart components, UML-like or architecture diagram components, React integration patterns, Next.js client or server boundaries, hydration-safe rendering, lazy loading, framework-aware performance, scroll-driven visual stories, or export guidance.

Geruyang/agent-skills-library

shadcn/ui expert guidance — CLI, component installation, composition patterns, custom registries, theming, Tailwind CSS integration, and high-quality interface design. Use when initializing shadcn, adding components, composing product UI, building custom registries, configuring themes, or troubleshooting component issues.

Geruyang/agent-skills-library

v0 by Vercel expert guidance. Use when discussing AI code generation, generating UI components from prompts, v0 CLI usage, v0 SDK/API integration, or integrating v0 into development workflows with GitHub and Vercel deployment.

Geruyang/agent-skills-library

Manages shadcn components and projects — adding, searching, fixing, debugging, styling, and composing UI. Provides project context, component docs, and usage examples. Applies when working with shadcn/ui, component registries, presets, --preset codes, or any project with a components.json file. Also triggers for "shadcn init", "create an app with --preset", or "switch to --preset".

相关技能