Token导航 LogoToken导航

Agent Skill · 前端设计

gea-framework(GEA framework 命令行)

gea-framework 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

gea-framework 是前端设计类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描已通过,按安装量在前端设计类的 10,216 个 Skill 里排第 3,620。

总安装 1,223周安装 49GitHub Stars 980下载 396核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:gea-framework(GEA framework 命令行)
来源仓库:https://github.com/dashersw/gea
仓库路径:skills/gea-framework
安装命令:
npx skills add https://github.com/dashersw/gea --skill gea-framework
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/dashersw/gea --skill gea-framework

这个 Skill 是做什么的

前端设计类 Skill 关注页面结构、视觉规范和组件写法,输出通常是可运行的界面代码。

GEA framework 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。适合在 Codex、Claude、Cursor、Gemini CLI 中围绕仓库状态、代码变更或协作事项进行整理。通过命令行调用,可结合来源仓库和原始 README 核验具体用法。

安装前需确认权限范围、维护状态及是否触发联网、命令执行或文件读写。gea-framework 属于前端设计类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/gea-framework

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/dashersw/gea --skill gea-framework;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

gea-framework 怎么安装?

在终端执行 npx skills add https://github.com/dashersw/gea --skill gea-framework。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

gea-framework 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

gea-framework 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

gea-framework 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

gea-framework 用的人多吗?

公开数据是累计安装 1,223 次,近一周安装 49 次,下载 396 次,GitHub 980 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

gea-framework 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理前端设计类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

前端设计类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
frontend-design

前端设计 · Codex、Claude

8,823,360126,072只读MIT通过
vercel-composition-patterns

Vercel 组合模式 · Codex、Claude

3,858,81625,893需要联网MIT通过
vercel-react-native-skills

Vercel React native skills 前端 · Codex、Claude

2,468,66425,878只读MIT通过
adapt

adapt 搜索 · Codex、Claude

2,027,04023,125操作浏览器未明确通过
bolder

bolder 分析 · Codex、Claude

2,004,28823,130只读未明确通过
gea-framework

GEA framework 命令行 · 本页

1,223980需要联网未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Gea Framework

Gea is a lightweight, reactive JavaScript UI framework built on the principle that JS code should be simple and understandable. It compiles JSX into efficient DOM operations at build time via a Vite plugin, uses proxy-based stores for state management, and employs event delegation for all user interactions. There is no virtual DOM — the Vite plugin analyzes your JSX templates and generates surgical DOM patches that update only the elements that depend on changed state.

Gea introduces no new programming concepts. There are no signals, no hooks, no dependency arrays, and no framework-specific primitives. Stores are classes with state and methods. Components are classes with a template() method or plain functions. Computed values are getters. The compile-time Vite plugin is the only "magic" — it analyzes ordinary JavaScript and wires up reactivity invisibly, so you write regular OOP/functional code that is fully reactive under the hood.

Read reference.md in this skill directory for the full API surface and detailed examples.

Core Concepts

Stores

A Store holds shared application state. Extend the Store class, declare reactive properties as class fields, and add methods that mutate them. The store instance is wrapped in a deep Proxy that tracks every property change and batches notifications via queueMicrotask.

import { Store } from '@geajs/core'

class CounterStore extends Store {
  count = 0

  increment() {
    this.count++
  }
  decrement() {
    this.count--
  }
}

export default new CounterStore()

Key rules:

  • Always export a singleton instance (export default new MyStore()), not the class.
  • Mutate properties directly — this.count++ triggers reactivity automatically.
  • Use getters for derived/computed values — they re-evaluate on each access.
  • Array mutations (push, pop, splice, sort, reverse, shift, unshift) are intercepted and produce fine-grained change events.
  • Replacing an array with a superset (same prefix + new items) is detected as an efficient append operation.

Components

Gea has two component styles. Both compile to the same internal representation.

Class Components

Extend Component and implement a template(props) method that returns JSX. Class components can hold their own reactive properties — use them when you need local, transient UI state.

import { Component } from '@geajs/core'

export default class Counter extends Component {
  count = 0

  increment() { this.count++ }
  decrement() { this.count-- }

  template() {
    return (
      <div class="counter">
        <span>{this.count}</span>
        <button click={this.increment}>+</button>
        <button click={this.decrement}>-</button>
      </div>
    )
  }
}

Event handlers accept both method references (click={this.increment}) and arrow functions (click={() => this.increment()}). Use method references for simple forwarding; use arrow functions when passing arguments or composing logic.

Use class components when you need local component state or lifecycle hooks.

Function Components

Export a default function that receives props and returns JSX. The Vite plugin converts it to a class component internally.

export default function Greeting({ name }) {
  return <h1>Hello, {name}!</h1>
}

Use function components for stateless, presentational UI.

Props and Data Flow

Props follow JavaScript's native value semantics:

  • Objects and arrays passed as props are the parent's reactive proxy. The child can mutate them directly, and both parent and child DOM update — two-way binding with zero ceremony.
  • Primitives are copies. Reassigning a primitive prop in the child updates only the child's DOM — the parent is unaffected.

No emit, no v-model, no callback props needed for object/array mutations. Deep nesting works the same way — as long as the same reference is passed down, reactivity propagates across the entire tree.

Component State vs. Stores

ConcernWhere it livesWhen to use
Shared app data (todos, user, cart)StoreData accessed by multiple components or persisted across navigation
Derived / computed valuesStore gettersValues calculated from store state
Local, transient UI state (editing mode, hover)Component propertiesEphemeral state that no other component needs

A class component can have both local state and read from external stores:

export default class TodoItem extends Component {
  editing = false
  editText = ''

  template({ todo, onToggle, onRemove }) {
    const { editing, editText } = this
    return (
      <li class={`todo-item ${editing ? 'editing' : ''}`}>
        <span dblclick={this.startEditing}>{todo.text}</span>
        {/* ... */}
      </li>
    )
  }
}

Multiple Stores

Split state into domain-specific stores. Each store is an independent singleton.

flight-store.ts    → step, boardingPass
options-store.ts   → luggage, seat, meal
payment-store.ts   → passengerName, cardNumber, paymentComplete

Stores can import and call each other:

class FlightStore extends Store {
  startOver(): void {
    this.step = 1
    optionsStore.reset()
    paymentStore.reset()
  }
}

A root component reads from all relevant stores and passes data down as props:

export default class App extends Component {
  template() {
    const { step } = flightStore
    const { luggage } = optionsStore
    return <div>{step === 1 && <OptionStep selectedId={luggage} onSelect={id => optionsStore.setLuggage(id)} />}</div>
  }
}

Router

Gea includes a built-in client-side router. The router is a Store that reactively tracks path, params, query, and hash. Define routes with setRoutes or createRouter.

Setup

Create a bare Router in router.ts. Keep this file free of view imports to avoid circular dependencies (views import router, so router.ts must not import views).

// src/router.ts
import { Router } from '@geajs/core'
export const router = new Router()

Set routes in App.tsx where both the router and view components are available:

// src/App.tsx
import { Component, Outlet } from '@geajs/core'
import { router } from './router'
import AppShell from './views/AppShell'
import Home from './views/Home'
import About from './views/About'
import UserProfile from './views/UserProfile'
import NotFound from './views/NotFound'

router.setRoutes({
  '/': {
    layout: AppShell,
    children: {
      '/': Home,
      '/about': About,
      '/users/:id': UserProfile,
    },
  },
  '*': NotFound,
})

export default class App extends Component {
  template() {
    return <Outlet />
  }
}

Layouts receive the resolved child as a page prop:

export default class AppShell extends Component {
  template({ page }: any) {
    return (
      <div class="app">
        <nav>
          <Link to="/" label="Home" />
          <Link to="/about" label="About" />
        </nav>
        <main>{page}</main>
      </div>
    )
  }
}

For simple apps without layouts/guards (no circular dependency risk), you can use createRouter directly in router.ts and render with <RouterView router={router} />:

import { createRouter } from '@geajs/core'
import Home from './views/Home'
import About from './views/About'

export const router = createRouter({
  '/': Home,
  '/about': About,
} as const)
import { Component, RouterView } from '@geajs/core'
import { router } from './router'

export default class App extends Component {
  template() {
    return <RouterView router={router} />
  }
}

Guards

Guards are synchronous functions on route groups that control access. A guard returns:

  • true — proceed to the route
  • string — redirect to that path
  • Component — render it instead of the route
import authStore from './stores/auth-store'

const AuthGuard = () => {
  if (authStore.isAuthenticated) return true
  return '/login'
}

router.setRoutes({
  '/login': Login,
  '/': {
    layout: AppShell,
    guard: AuthGuard,
    children: {
      '/dashboard': Dashboard,
      '/settings': Settings,
    },
  },
})

Guards on nested groups stack parent → child. Guards are intentionally synchronous — they check store state, not async APIs. For async checks, use created() in the component.

Route Patterns

  • Static: /about
  • Named params: /users/:id — extracted as {id: '42'}
  • Wildcard: * — matches any unmatched path
  • Redirects: '/old': '/new' — string values trigger a redirect
  • Lazy routes: '/admin': () => import('./views/Admin') — code-split route components

Link

Renders an <a> tag that navigates with history.pushState. Modifier keys (Cmd/Ctrl+click) open in a new tab. Active links receive data-active and an active class; pass exact to require an exact path match.

<Link to="/about" label="About" class="nav-link" />

Programmatic Navigation

import { router } from './router'

router.push('/about')         // pushState
router.navigate('/about')     // alias for push
router.replace('/login')      // replaceState
router.back()
router.forward()
router.go(-2)

Route Parameters

Function components receive matched params as props:

export default function UserProfile({ id }) {
  return <h1>User {id}</h1>
}

Class components receive them via created(props) and template(props). Route params are also available on router.params.

Active State

router.isActive('/dashboard')  // true if path starts with /dashboard
router.isExact('/dashboard')   // true only for exact match

matchRoute Utility

Use matchRoute for manual route matching:

import { matchRoute } from '@geajs/core'

const result = matchRoute('/users/:id', '/users/42')
// { path: '/users/42', pattern: '/users/:id', params: { id: '42' } }

RouterView

RouterView renders the current route. Use it with a router prop for createRouter setups, or with an inline routes array for quick prototypes:

// With createRouter (recommended)
<RouterView router={router} />

// With inline routes (uses the singleton router)
<RouterView routes={[
  { path: '/', component: Home },
  { path: '/about', component: About },
  { path: '/users/:id', component: UserProfile },
]} />

JSX Rules

Gea JSX differs from React JSX in several ways:

FeatureGeaReact
CSS classesclass="foo"className="foo"
Event handlersclick={fn} or onClick={fn}onClick={fn}, onInput={fn}, onChange={fn}
Checked inputschecked={bool} + change={fn}checked={bool} + onChange={fn}
Conditional render{cond && <Child />}Same
Lists with keys{arr.map(item => <Item key={item.id} />)}Same
Dynamic classes` class={btn ${active? 'on': ''}} `Same (with className)

Both native-style (click, change) and React-style (onClick, onChange) event attribute names are supported. Native-style is preferred by convention.

Supported event attributes include mouse, keyboard, form, drag, touch, pointer, wheel, scroll, animation, and transition events: click, dblclick, input, change, submit, keydown, keyup, blur, focus, pointerdown, pointerup, pointermove, touchstart, touchmove, touchend, wheel, scroll, dragstart, dragend, dragover, dragleave, drop, animationstart, animationend, transitionstart, transitionend, and related variants.

With @geajs/mobile: tap, longTap, swipeRight, swipeUp, swipeLeft, swipeDown.

Style Objects

Gea supports React-style inline style objects. The compiler converts static style objects to CSS strings at build time and generates runtime conversion for dynamic values:

// Static — compiled to a CSS string at build time (zero runtime cost)
<div style={{ backgroundColor: 'red', fontSize: '14px', fontWeight: 'bold' }}>
  Styled content
</div>

// Dynamic — converted to cssText at runtime
<div style={{ color: this.textColor, opacity: this.isVisible ? 1 : 0 }}>
  Dynamic styling
</div>

// String styles still work (passed through as-is)
<div style={`width:${this.width}px`}>Sized content</div>

CSS property names use camelCase (like React). The compiler converts them to kebab-case: backgroundColor → background-color, fontSize → font-size.

ref Attribute

Use ref to get a direct reference to a DOM element after render:

export default class Canvas extends Component {
  canvasEl = null

  template() {
    return (
      <div class="canvas-wrapper">
        <canvas ref={this.canvasEl} width="800" height="600"></canvas>
      </div>
    )
  }

  onAfterRender() {
    const ctx = this.canvasEl.getContext('2d')
    ctx.fillRect(0, 0, 100, 100)
  }
}

The compiler emits a direct assignment that sets the component property to the DOM element after the template is cloned. Multiple refs on different elements are supported.

Compiler Errors (Unsupported Patterns)

The Gea compiler throws clear errors for JSX patterns it cannot compile. These are caught at build time, not at runtime:

PatternErrorFix
<div {...props} />Spread attributes not supportedDestructure and pass props individually
<{DynamicTag} />Dynamic component tags not supportedUse conditional rendering ({isA? <A />: <B />})
{() => <div />}Function-as-child not supportedUse render props with named attributes instead
export function Foo() {return <div />}Named JSX component exports not supportedUse export default function
<>{items.map(...)}</>Fragments as .map() item roots not supportedWrap each item in a single root element

Rendering

import MyApp from './my-app.jsx'

const app = new MyApp()
app.render(document.getElementById('app'))

Components are instantiated with new, then .render(parentEl) inserts them into the DOM.

Gea Mobile

The @geajs/mobile package extends Gea with mobile-oriented UI primitives:

  • View — a full-screen Component that renders to document.body by default.
  • ViewManager — manages a navigation stack with iOS-style transitions, back gestures, and sidebar support.
  • Sidebar, TabView, NavBar — pre-built layout components.
  • PullToRefresh, InfiniteScroll — scroll-driven UI patterns.
  • GestureHandler — registers tap, longTap, swipeRight, swipeLeft, swipeUp, swipeDown events.
import { View, ViewManager } from '@geajs/mobile'

class HomeView extends View {
  template() {
    return (
      <view>
        <h1>Home</h1>
      </view>
    )
  }
  onActivation() {
    /* called when view enters viewport */
  }
}

const vm = new ViewManager()
const home = new HomeView()
vm.setCurrentView(home)

Project Setup

Scaffolding a New Project

npm create gea@latest my-app
cd my-app
npm install
npm run dev

The create-gea package scaffolds a Vite project with TypeScript, a sample store, class and function components, and the Vite plugin pre-configured.

Manual Setup

// vite.config.js
import { defineConfig } from 'vite'
import { geaPlugin } from '@geajs/vite-plugin'

export default defineConfig({
  plugins: [geaPlugin()]
})

The @geajs/vite-plugin Vite plugin handles JSX transformation, reactivity wiring, event delegation generation, and HMR.

SSR

@geajs/ssr provides server rendering and hydration for Gea apps. Use handleRequest(App, options) for Fetch-style request handlers, hydrate(App, element, {storeRegistry}) on the client, and geaSSR() in Vite for development middleware. SSR can serialize registered stores, resolve route configs on the server, stream HTML, and inject head tags.

// server.ts
import { handleRequest } from '@geajs/ssr'
import App from './src/App'
import store from './src/store'

export default handleRequest(App, {
  storeRegistry: { AppStore: store },
})
// src/main.ts
import { hydrate } from '@geajs/ssr/client'
import App from './App'
import store from './store'

hydrate(App, document.getElementById('app'), {
  storeRegistry: { AppStore: store },
})

@geajs/ui Component Library

@geajs/ui is a Tailwind-styled, Zag.js-powered component library for Gea. It provides ~35 ready-to-use components: simple styled primitives (Button, Card, Input) and behavior-rich interactive widgets (Select, Dialog, Tabs, Toast). For full usage instructions, component API, and examples, see the gea-ui-components skill in skills/gea-ui-components/.

npm Packages

PackagenpmDescription
@geajs/corenpmCore framework — stores, components, reactivity, DOM patching
@geajs/uinpmTailwind + Zag.js component library — Button, Select, Dialog, Tabs, Toast, etc.
@geajs/mobilenpmMobile UI primitives — views, navigation, gestures, layout
@geajs/vite-pluginnpmVite plugin — JSX transform, reactivity wiring, HMR
@geajs/ssrnpmServer-side rendering, hydration, streaming, store serialization, Vite SSR middleware
create-geanpmProject scaffolder (npm create gea@latest)
gea-tools—VS Code / Cursor extension for Gea JSX code intelligence

VS Code / Cursor Extension

The gea-tools extension (in packages/gea-tools) provides:

  • Component completion inside JSX tags
  • Prop completion based on component signatures
  • Event attribute completion (click, input, change, etc.)
  • Hover details for components and props
  • Unknown component warnings

Documentation

Full documentation is in the docs/ directory of the repository, structured for GitBook:

  • Getting started, core concepts, Gea Mobile, tooling, and API reference
  • Comparison pages: React vs Gea, Vue vs Gea

平台分布

Codex

36.75%
按下载量换算146

Claude

28.34%
按下载量换算112

Cursor

18.46%
按下载量换算73

Gemini CLI

10.3%
按下载量换算41

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills