fusion-developer-app
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseFusion App Development
Fusion应用开发
When to use
适用场景
Use this skill when developing features, components, hooks, services, or types for a Fusion Framework React application.
Typical triggers:
- "Add a component for ..."
- "Create a hook that ..."
- "Wire up the API"
- "Build a page for ..."
- "Add a service to fetch ..."
- "Configure a Fusion module"
- "Which Fusion Framework hook should this app use?"
- "What is the right package or module for this app integration?"
- "Find the correct Fusion Framework example before implementing this app change"
- "Persist this preference as an app setting"
- "Add bookmark support for this view"
- "Read runtime config or environment variables"
- "Instrument this page with analytics"
- "Add a feature flag to this app"
- "How do I use the useFeature hook in a Fusion app?"
- "Implement a feature for ..."
Implicit triggers:
- The user asks to build something in
src/ - The user references Fusion Framework modules, EDS components, Fusion React components (), or styled-components patterns
@equinor/fusion-react-* - The user references app settings, bookmarks, analytics, or
app.config.ts - The user wants to add a new route, page, or data-fetching layer
在为Fusion Framework React应用开发功能、组件、hooks、服务或类型时,使用本技能。
典型触发场景:
- "为……添加一个组件"
- "创建一个用于……的hook"
- "连接API"
- "为……构建一个页面"
- "添加一个用于获取……的服务"
- "配置Fusion模块"
- "这个应用应该使用哪个Fusion Framework hook?"
- "这个应用集成应该使用哪个合适的包或模块?"
- "在实现这个应用变更前,找到正确的Fusion Framework示例"
- "将此偏好设置为应用配置"
- "为该视图添加书签支持"
- "读取运行时配置或环境变量"
- "为该页面添加分析埋点"
- "为这个应用添加功能开关"
- "如何在Fusion应用中使用useFeature hook?"
- "为……实现一个功能"
隐含触发场景:
- 用户要求在目录下构建内容
src/ - 用户提及Fusion Framework模块、EDS组件、Fusion React组件()或styled-components模式
@equinor/fusion-react-* - 用户提及应用配置、书签、分析或
app.config.ts - 用户想要添加新路由、页面或数据获取层
When not to use
不适用场景
Do not use this skill for:
- Issue authoring or triage (use )
fusion-issue-authoring - Skill authoring (use )
fusion-skill-authoring - Backend/service changes (separate repository)
- CI/CD pipeline or deployment configuration
- Architecture documentation (use ADR template)
When the request is primarily about Fusion Framework package ownership, hook behavior, or example discovery rather than app implementation, use the companion skill first and then return here for code changes.
fusion-research本技能不适用于:
- 问题编写或分类(使用)
fusion-issue-authoring - 技能编写(使用)
fusion-skill-authoring - 后端/服务变更(单独仓库)
- CI/CD流水线或部署配置
- 架构文档(使用ADR模板)
当请求主要涉及Fusion Framework包归属、hook行为或示例查找而非应用实现时,先使用配套技能,再返回此处进行代码变更。
fusion-researchRequired inputs
必要输入
Mandatory
必填项
- What to build: a clear description of the feature, component, hook, or service
- Where it fits: which layer (component, hook, service, type) and any parent/sibling context
If the user's request is ambiguous or missing critical details, consult for domain-specific clarifying questions before implementing.
assets/follow-up-questions.md- 构建内容:对功能、组件、hook或服务的清晰描述
- 位置信息:所属层级(组件、hook、服务、类型)及任何父/同级上下文
如果用户的请求模糊或缺少关键细节,在实现前参考中的领域特定澄清问题。
assets/follow-up-questions.mdConditional
条件项
- API endpoint details when the feature involves data fetching
- Design/layout specifics when building visual components
- Fusion module name when extending module configuration
- Whether state should persist per-user, be shareable via bookmark, or stay runtime-only
- 当功能涉及数据获取时,提供API端点详情
- 构建可视化组件时,提供设计/布局细节
- 扩展模块配置时,提供Fusion模块名称
- 状态是否应按用户持久化、可通过书签共享或仅在运行时保留
Instructions
操作步骤
Step 1 — Discover project conventions
步骤1 — 了解项目约定
Before writing any code, inspect the target repository to learn its specific setup:
- Read to identify the package manager (bun/pnpm/npm), available scripts, and installed dependencies.
package.json - Read to confirm TypeScript settings and path aliases.
tsconfig.json - Scan to understand the current directory layout and layer structure.
src/ - Check for ADRs () or a
docs/adr/directory for project-specific code standards.contribute/ - Check for formatter/linter config (biome.json, .eslintrc, prettier config).
- Read and
app.config.tsto understand existing endpoint and environment setup.app.manifest.ts - If the implementation depends on uncertain Fusion Framework behavior, exact package ownership, or cookbook examples, delegate that research to before writing code.
fusion-research
Adapt all subsequent steps to the conventions discovered here. The patterns in are defaults — defer to project-specific rules when they differ.
references/在编写任何代码前,检查目标仓库以了解其特定设置:
- 阅读以确定包管理器(bun/pnpm/npm)、可用脚本和已安装依赖。
package.json - 阅读以确认TypeScript设置和路径别名。
tsconfig.json - 扫描目录以理解当前目录结构和层级架构。
src/ - 检查ADR()或
docs/adr/目录以获取项目特定代码标准。contribute/ - 检查格式化/检查器配置(biome.json, .eslintrc, prettier配置)。
- 阅读和
app.config.ts以了解现有端点和环境设置。app.manifest.ts - 如果实现依赖于不确定的Fusion Framework行为、确切的包归属或示例代码,在编写代码前将调研工作委托给。
fusion-research
使后续所有步骤适配此处发现的约定。中的模式为默认值——当项目特定规则与之不同时,优先遵循项目规则。
references/Step 2 — Plan the implementation
步骤2 — 规划实现方案
If scaffolding a new app from scratch, use as a progress tracker.
assets/new-app-checklist.md- Break the work into discrete files/changes.
- Map each piece to the correct directory. A typical Fusion app uses:
- — React components (presentation layer)
src/components/ - — Custom React hooks (state and side-effect logic)
src/hooks/ - — API clients, data transforms, business logic
src/api/ - — TypeScript interfaces, type aliases, enums
src/types/ - — Route definitions (when using Fusion Router)
src/routes.ts - — Fusion module configuration
src/config.ts - — Root component, layout shell
src/App.tsx
- Identify shared types early — define them before referencing.
- If the project uses routing, follow for the DSL and page patterns.
references/using-router.md - If the project uses a different structure, follow it.
如果从头搭建新应用,使用作为进度跟踪工具。
assets/new-app-checklist.md- 将工作拆分为独立的文件/变更。
- 将每个部分映射到正确的目录。典型的Fusion应用使用:
- — React组件(展示层)
src/components/ - — 自定义React hooks(状态和副作用逻辑)
src/hooks/ - — API客户端、数据转换、业务逻辑
src/api/ - — TypeScript接口、类型别名、枚举
src/types/ - — 路由定义(使用Fusion Router时)
src/routes.ts - — Fusion模块配置
src/config.ts - — 根组件、布局外壳
src/App.tsx
- 尽早识别共享类型——先定义再引用。
- 如果项目使用路由,遵循中的DSL和页面模式。
references/using-router.md - 如果项目使用不同结构,遵循该结构。
Step 3 — Implement following code conventions
步骤3 — 遵循代码约定实现
Follow the project's code standards (discovered in Step 1). For all convention rules — naming, TSDoc, inline comments, type patterns, code style, and error handling — defer to the skill.
fusion-code-conventionsWhen convention questions arise during implementation, invoke directly. It routes to the correct language agent and returns the authoritative rule with an example.
fusion-code-conventions遵循项目的代码标准(步骤1中发现的)。对于所有约定规则——命名、TSDoc、内联注释、类型模式、代码风格和错误处理——优先遵循技能。
fusion-code-conventions当实现过程中出现约定问题时,直接调用。它会路由到正确的语言代理,并返回带示例的权威规则。
fusion-code-conventionsStep 4 — Style with styled-components, EDS, and Fusion React components
步骤4 — 使用styled-components、EDS和Fusion React组件进行样式设计
Follow , , and :
references/styled-components.mdreferences/styling-with-eds.mdreferences/using-fusion-react-components.md- Use for custom styling — this is the Fusion ecosystem convention.
styled-components - Do not introduce CSS Modules, global CSS files, Tailwind, or alternative CSS-in-JS unless the project explicitly uses them.
- Use the object pattern for co-located styled components.
Styled - Prefer EDS components from as the base for standard UI elements.
@equinor/eds-core-react - Use EDS design tokens (CSS custom properties or ) for colors, spacing, and typography.
@equinor/eds-tokens - Extend EDS components with when customization is needed.
styled() - Use Fusion React components () for domain-specific needs not covered by EDS — person display/selection, Fusion side sheets, and progress indicators.
@equinor/fusion-react-* - Inline props are acceptable for one-off tweaks only.
style
遵循、和:
references/styled-components.mdreferences/styling-with-eds.mdreferences/using-fusion-react-components.md- 使用进行自定义样式——这是Fusion生态系统的约定。
styled-components - 除非项目明确使用,否则不要引入CSS Modules、全局CSS文件、Tailwind或其他CSS-in-JS方案。
- 使用对象模式实现同位置的styled组件。
Styled - 优先使用中的EDS组件作为标准UI元素的基础。
@equinor/eds-core-react - 使用EDS设计令牌(CSS自定义属性或)设置颜色、间距和排版。
@equinor/eds-tokens - 需要自定义时,使用扩展EDS组件。
styled() - 使用Fusion React组件()处理EDS未覆盖的领域特定需求——人员展示/选择、Fusion侧边栏和进度指示器。
@equinor/fusion-react-* - 内联属性仅适用于一次性调整。
style
Step 5 — Wire up data fetching (when applicable)
步骤5 — 连接数据获取(适用时)
Follow , , and for data-fetching and local dev mocking patterns:
references/configure-services.mdreferences/using-react-query.mdreferences/configure-mocking.md- Register HTTP clients via in
configureHttpClientor viaconfig.tsendpoints.app.config.ts - Access clients in components with from
useHttpClient(name).@equinor/fusion-framework-react-app/http - Always prefer hooks (
@equinor/fusion-framework-react-app/*,useHttpClient, etc.) over direct module access. ReserveuseCurrentContextfor non-React contexts like route loaders.framework.modules.* - When the project uses React Query (), create thin custom hook wrappers around
@tanstack/react-query.useQuery - Use query keys derived from API path + parameters.
- Keep client UI state in React state/context, not in server-state libraries.
遵循、和中的数据获取和本地开发模拟模式:
references/configure-services.mdreferences/using-react-query.mdreferences/configure-mocking.md- 在中通过
config.ts或configureHttpClient端点注册HTTP客户端。app.config.ts - 在组件中使用中的
@equinor/fusion-framework-react-app/http访问客户端。useHttpClient(name) - 始终优先使用hooks(
@equinor/fusion-framework-react-app/*、useHttpClient等)而非直接模块访问。仅在非React上下文(如路由加载器)中使用useCurrentContext。framework.modules.* - 当项目使用React Query()时,在
@tanstack/react-query周围创建轻量自定义hook包装器。useQuery - 使用从API路径+参数派生的查询键。
- 将客户端UI状态保存在React状态/上下文中,而非服务器状态库中。
Step 6 — Configure Fusion modules (when applicable)
步骤6 — 配置Fusion模块(适用时)
Identify which module the user needs, then read only the matching reference:
| Need | Reference |
|---|---|
| HTTP clients / API integration | |
| Context module | |
| Router and pages | |
| AG Grid | |
| EDS + Fusion React components | |
| Settings | |
| Bookmarks | |
| Analytics | |
| Runtime config / environment | |
| Feature flags | |
| General framework modules | |
- Add module setup in using the
config.tscallback.AppModuleInitiator - Access modules in components via hooks: ,
useAppModule,useHttpClient.useCurrentContext - Register HTTP client endpoints in when adding new API integrations.
app.config.ts - Enable navigation with in
enableNavigationwhen the app uses routing.config.ts - Define routes using the Fusion Router DSL (,
layout,index,route) for automatic code splitting.prefix - When the right framework API is unclear, use to gather a source-backed answer before choosing an implementation pattern.
fusion-research
确定用户需要的模块,然后仅阅读匹配的参考文档:
| 需求 | 参考文档 |
|---|---|
| HTTP客户端/API集成 | |
| 上下文模块 | |
| 路由器和页面 | |
| AG Grid | |
| EDS + Fusion React组件 | |
| 配置 | |
| 书签 | |
| 分析 | |
| 运行时配置/环境 | |
| 功能开关 | |
| 通用框架模块 | |
- 在中使用
config.ts回调添加模块设置。AppModuleInitiator - 通过hooks在组件中访问模块:、
useAppModule、useHttpClient。useCurrentContext - 添加新API集成时,在中注册HTTP客户端端点。
app.config.ts - 当应用使用路由时,在中启用
config.ts。enableNavigation - 使用Fusion Router DSL(、
layout、index、route)定义路由以实现自动代码分割。prefix - 当不确定正确的框架API时,在选择实现模式前使用获取有来源支持的答案。
fusion-research
Step 7 — Validate
步骤7 — 验证
Use as a comprehensive post-generation checklist.
assets/review-checklist.md- Run the project's typecheck command (e.g. or
bun run typecheck) — zero errors required.pnpm typecheck - Run the project's lint/format check — zero violations.
- Verify every new exported symbol has TSDoc.
- Confirm styling follows the project's conventions.
- Confirm no new dependencies unless justified or explicitly approved.
使用作为全面的生成后检查清单。
assets/review-checklist.md- 运行项目的类型检查命令(如或
bun run typecheck)——要求零错误。pnpm typecheck - 运行项目的检查/格式化命令——要求零违规。
- 验证每个新导出符号都有TSDoc。
- 确认样式遵循项目约定。
- 确认没有新增依赖,除非有正当理由或明确批准。
Expected output
预期输出
- New or modified source files in following the project's layer structure.
src/ - All files pass typecheck and lint.
- Every exported function, component, hook, and type has TSDoc.
- Styling follows project conventions (typically styled-components + EDS + Fusion React components where applicable).
- A brief summary of what was created or changed and why.
- 目录下遵循项目层级结构的新文件或修改后的源文件。
src/ - 所有文件通过类型检查和代码检查。
- 每个导出的函数、组件、hook和类型都有TSDoc。
- 样式遵循项目约定(通常是styled-components + EDS + 适用时的Fusion React组件)。
- 关于创建或变更内容及原因的简要说明。
Helper agents
辅助代理
This skill includes three optional helper agents in . Use them for focused review after implementing changes, or consult them during implementation for specific guidance. If the runtime does not support skill-local agents, apply the same review criteria inline.
agents/This skill also has a companion skill, , for source-backed Fusion ecosystem research. Use it when implementation work is blocked by uncertainty about framework behavior, EDS component APIs, or skill catalog questions.
fusion-research- — reviews Fusion Framework integration: module configuration, HTTP clients, bootstrap lifecycle, runtime config, settings, bookmarks, analytics, and hook usage. Prefers
agents/framework.mdfor API lookups; falls back tomcp_fusion_search_frameworkfor general platform guidance. Consult when wiring upmcp_fusion_search_docs,config.ts, or any component that accesses framework modules.app.config.ts - — reviews EDS component selection, styled-components patterns, design token usage, and accessibility. Prefers
agents/styling.mdfor component docs, props, and examples. Consult when building or modifying visual components.mcp_fusion_search_eds - — delegates convention checks (naming, TSDoc, TypeScript strictness, intent comments) to
agents/code-quality.md, then aggregates findings in Fusion app context. Run on every new or modified file before finalizing.fusion-code-conventions
本技能在中包含三个可选辅助代理。在实现变更后使用它们进行重点审查,或在实现期间咨询特定指导。如果运行时不支持技能本地代理,直接应用相同的审查标准。
agents/本技能还有一个配套技能,用于基于来源的Fusion生态系统调研。当实现工作因框架行为、EDS组件API或技能目录问题的不确定性而受阻时使用它。
fusion-research- — 审查Fusion Framework集成:模块配置、HTTP客户端、启动生命周期、运行时配置、设置、书签、分析和hook使用。**优先使用
agents/framework.md**进行API查找;回退到mcp_fusion_search_framework获取通用平台指导。在连接mcp_fusion_search_docs、config.ts或任何访问框架模块的组件时咨询。app.config.ts - — 审查EDS组件选择、styled-components模式、设计令牌使用和可访问性。**优先使用
agents/styling.md**获取组件文档、属性和示例。在构建或修改可视化组件时咨询。mcp_fusion_search_eds - — 将约定检查(命名、TSDoc、TypeScript严格性、意图注释)委托给
agents/code-quality.md,然后在Fusion应用上下文中汇总结果。在最终确定前对每个新文件或修改后的文件运行。fusion-code-conventions
Safety & constraints
安全与约束
- No new dependencies without explicit user approval.
- No direct DOM manipulation — use React patterns.
- No types — TypeScript strict mode is standard for Fusion apps.
any - No secrets or credentials in source files.
- Conventional commits for all changes (,
feat:,fix:, etc.).refactor: - Do not modify infrastructure files (docker-compose, CI config) unless explicitly asked.
- 无新依赖,除非获得用户明确批准。
- 无直接DOM操作 — 使用React模式。
- 无类型 — TypeScript严格模式是Fusion应用的标准。
any - 源文件中无密钥或凭证。
- 所有变更使用约定式提交(、
feat:、fix:等)。refactor: - 除非明确要求,否则不要修改基础设施文件(docker-compose、CI配置)。