zerx-lab
- 31 skills
- 0 followers
- 5 hours ago last updated
- ▌ Workflow Patterns · zerx-labArgument shapes for the 5 built-in workflow patterns — deep-research, adversarial-review, code-review, multi-perspective, codebase-audit — runnable via the `workflow` tool's `name` input, without slash-command syntax. Use for requests like "research X", "fact-check/adversarially review this", "review this diff/PR", "analyze from multiple perspectives", or "audit the codebase for Y". Not for authoring a new workflow script — see workflow-authoring.
- ▌ Workflow Authoring · zerx-lab bundleGuidance for writing, editing, reviewing, and debugging JavaScript workflow code for pi-dynamic-workflows. Use when authoring or changing workflow scripts; not for merely running an existing workflow.
- ▌ Siyuan Penbridge · zerx-lab bundleRead, create, and edit SiYuan (思源笔记) notebooks, documents, blocks, and paragraphs through the penbridge CLI — a scriptable bridge over the SiYuan kernel API. Use when the user wants to operate a local SiYuan workspace, such as create/read/update/move/delete notes and blocks, edit any paragraph or heading, append to a daily note, search or run SQL over their notes, manage notebooks, block attributes, assets, templates, or exports, or call any SiYuan kernel API endpoint directly.
- ▌ Daily Tech News · zerx-lab每日技术资讯搜集。多源搜索 AI、GitHub、前端、后端、开源等领域的最新技术动态,直接把中英双语正文写成仓库内的 Markdown 文件发布到 ZerxLab 博客(多源交叉验证 + 重要性评分)。关键词:资讯、新闻、daily news、tech news、AI news、GitHub trending、Markdown 发布。
- ▌ Release · zerx-lab发布 FluxDown 新版本或查看已有版本时使用。校验版本 tag(稳定版 vX.Y.Z / 预览版 vX.Y.Z-rc.N)在推送前合法可用,并按渠道/组件快速列出已有版本。关键词:发布, 发版, release, publish, 版本, version, tag, 打标签, 稳定版, 预览版, stable, frontier, rc, 预发布, prerelease, 查看版本, 已有版本, 最新版本, 更新渠道, changelog, git-cliff
- ▌ Main Worktree · zerx-lab在不切换当前 main 分支的情况下,通过 git worktree 编辑 stable 分支内容(hotfix), 然后合并回 main 保持 stable⊆main 不变式。用户说「hotfix」「改 stable」「stable worktree」 「在 stable 上修」「同步回 main」时使用。关键词:worktree, stable, hotfix, 热修复, 稳定分支, 合并回 main, 不切分支, git worktree
- ▌ Gpui · zerx-lab bundleGPUI framework knowledge covering actions/keybindings, async/background tasks, context management (App/Window/Context<T>/AsyncApp), custom elements (low-level Element trait), entity state management, event system, focus handling, global state, layout/styling (flexbox/CSS-like), and testing. Use when working with any GPUI framework concept, building GPUI applications, or needing guidance on GPUI-specific APIs and patterns.
- ▌ Gpui App · zerx-lab从零搭建 gpui / gpui-component 桌面应用的起步模板。涵盖 Cargo.toml git 依赖(gpui + gpui_platform + gpui-component)、main.rs 入口(application().run / open_window / Root)、资产与图标注册、WindowOptions、退出与激活。创建新 gpui 项目、初始化工程、写 main.rs 或配置依赖时使用。
- ▌ Gpui Component · zerx-lab bundleHow to use the gpui-component UI library in GPUI applications. Use when building UIs with gpui-component components (Button, Input, Select, Dialog, Tabs, Sidebar, List, Table, etc.), setting up the library, handling component state, theming, or finding the right component for a given UI need.
- ▌ Gpui Migration · zerx-labgpui 新旧 API 对照表(2025-01 大重构前 → 当前)。遇到 ViewContext/WindowContext/View/Model/new_view/FocusableView/旧 spawn 闭包等旧 API,或迁移旧 gpui 代码、修复相关编译错误时使用。同时收录 gpui-component 的更名(TextInput→Input、open_modal→open_dialog 等)。
- ▌ Gpui Init · zerx-labInitialize new GPUI application projects with proper structure and boilerplate. Use when creating a new GPUI app, setting up project structure, or scaffolding a cross-platform Rust desktop UI application.
- ▌ Gpui Styling · zerx-labStyling GPUI elements with Tailwind-like utility methods. Use when applying styles, layouts, colors, spacing, or creating responsive designs.
- ▌ Gpui Patterns · zerx-labCommon UI patterns and advanced techniques for GPUI applications. Use when implementing modals, lists, forms, state sharing, or complex component compositions.
- ▌ Gpui Code Quality · zerx-labBest practices and code quality guidelines for GPUI development. Use when refactoring, reviewing code, or ensuring adherence to GPUI idioms.
- ▌ Gpui Fundamentals · zerx-labCore GPUI concepts including contexts, windows, entities, elements, and rendering. Use when learning GPUI basics, understanding the framework architecture, or implementing core UI patterns.
- ▌ Gpui Troubleshooting · zerx-labCommon errors and solutions for GPUI development. Use when debugging build errors, runtime panics, borrow checker issues, or unexpected behavior.
- ▌ Rust Coding Guidelines · zerx-labRust and GPUI coding standards. MUST LOAD before writing any Rust code. Covers error handling, naming conventions, async patterns, file organization, and GPUI-specific rules. This skill is MANDATORY for all Rust work in this project.
- ▌ Zerx Authz · zerx-labgettopic 接口授权与访问控制。当新增/修改 connectRPC handler、注册 service、配置 public/selfServe、调整 Casbin 策略、角色权限、菜单/按钮可见性时使用。Keywords: 授权, 鉴权, 权限, Casbin, RequireRole, public, selfServe, admin 绕过, procedure, RBAC, 角色, role, 三层访问控制, enforcer, SetRolePermissions, RoleMenu, RoleButton, Can, 菜单权限, 按钮权限, authorization, access control
- ▌ Zerx Plugin · zerx-labgettopic 编译期插件机制:以低侵入方式新增后台管理模块(后端 RPC + 表 + 前端动态页 + 菜单 + 授权),不破坏单二进制 / CGO-free / Casbin 唯一授权 / proto 唯一契约。当用户要用插件方式扩展、用 task new-plugin 脚手架、新增/启用/禁用/卸载插件、或排查插件注册/校验/动态前端页问题时使用。Keywords: plugin, 插件, plugin system, 插件机制, task new-plugin, task plugin-pack, 脚手架, scaffold, 上传插件, 安装插件, 卸载插件, install plugin, uninstall plugin, upload, zip, InstallPlugin, UninstallPlugin, internal/plugin, installer, all.go, ValidateAll, RegisterHandlers, 动态路由, import.meta.glob, p.$, pub.$, plugin-components, 编译期插件, compile-time plugin, 插件注册, 插件禁用, 插件卸载, teardown, PLUGIN_UPLOAD_ENABLED
- ▌ Zerx Backend · zerx-labgettopic 后端开发规约(Go + connectRPC + GORM)。当新增/修改 RPC、实现 service handler、写数据访问、用 GORM 泛型 API、自定义 querier SQL、跑 codegen 时使用。Keywords: connectRPC, handler, service, GORM, gorm.G, 泛型, Count, FirstOrCreate, nilaway, getter, querier, 自定义 SQL, deleted_at, 软删, convert, proto, task gen, buf, 代码生成, JS 保留字, 后端, backend, Go
- ▌ Zerx Frontend · zerx-labgettopic 前端开发规约(React 19 + TanStack + connect-query + Zod4 + Tailwind v4)。当新增/修改路由页、CRUD 列表/表单、调用 connect-query hooks、做缓存失效、i18n、主题、按钮样式时使用。Keywords: React, TanStack Router, react-query, useQuery, useMutation, connect-query, createConnectQueryKey, invalidateQueries, react-form, Zod, Tailwind v4, bigint, uint64, table v8, i18n, 主题, theme, 语义 token, Can, permissions, gcTime, placeholderData, Button, outline, ghost, 按钮, 透明, 按钮背景, 前端, frontend, bun, pnpm
- ▌ Zerx Security · zerx-labgettopic 认证与安全机制(JWT/会话/刷新/验证码/防爆破/审计日志/文件上传/对象存储)。当处理登录注册、token 刷新、会话管理、登录限流、操作日志、上传、存储 driver 时使用。Keywords: JWT, access token, refresh token, 会话, session, jti, 单点登录, AUTH_SINGLE_SESSION, 验证码, captcha, 防爆破, ratelimit, 锁定, 审计, 操作日志, OperationLog, login_logs, 上传, upload, 对象存储, storage, local, s3, minio, password policy, password reset, SMTP, mailer, TOTP, 2FA, MFA, export, import, xlsx, OpenAPI, docs, cron, job, scheduler, readyz, 安全, security, 认证, auth
- ▌ Zerx Add Module · zerx-lab在 gettopic 端到端新增一个管理模块的完整清单(proto→model→migrate→service→server→前端页→i18n→seed→routeTree→授权)。当用户要新增一个后台管理模块/资源/CRUD 页面(如商品、订单、配置项)时使用。Keywords: 新增模块, 管理模块, 后台模块, CRUD, 资源, 端到端, 完整流程, scaffold, 新建页面, add module, new module, 菜单, seed, 迁移, 全栈新增
- ▌ Zerx Skill Authoring · zerx-lab为 gettopic 编写/维护/更新 .agents/skills 下 AI skill 的元规约:token 高效、陈述事实而非教学、进步式披露、frontmatter 与描述关键词写法、何时该新增 skill、代码变更后如何定位并同步对应 skill。当用户要新增/修改/审查/更新本仓库的 skill 或 AI 指令文件、或某子系统代码变更需同步 skill 时使用。Keywords: skill, SKILL.md, .agents/skills, 编写规约, 元技能, frontmatter, description, 关键词, 进步式披露, progressive disclosure, token 高效, 上下文, AGENTS.md, prompt, 提示词, 编写技巧, 更新 skill, 维护 skill, 同步, 变更, 调研源码, 代码变更, 漂移, sync, update, maintain
- ▌ Harmony API · zerx-lab在 harmony/ 子项目调用系统能力、配置权限、或新增原生(NAPI)API 前调用。覆盖 Stage 模型与 UIAbility 生命周期、module.json5 权限配置、本项目所用 12 个 Kit(剪贴板/加密/文件/网络/HUKS/生物认证/扫码等)的真实用法、NAPI 原生桥(libcryptocore.so)链路,以及 BusinessError/hilog 运行时约定。
- ▌ Verify · zerx-labRun the project's acceptance gate (`task verify`) and fix any typecheck, test, or lint failures it reports. Use before committing, before declaring a task done, or whenever the user asks to "verify", "run checks", or "make sure it passes".
- ▌ Harmony Arkui UI · zerx-lab在 harmony/ 子项目编写或修改 ArkTS(.ets) 界面代码前调用。覆盖 ArkUI 声明式 UI、容器与组件、V2 状态(@ComponentV2/@Local/@Param/@Event/@Monitor/@Computed)、@Builder、router/promptAction 导航弹层,以及 ZPass 设计 token 与 UI 铁律(禁emoji/禁紫/圆角5·7·10·14)。
- ▌ Add Ws Frames · zerx-labAdd or modify a WebSocket frame type when WS is genuinely required (bidirectional, binary, or true full-duplex). This is the ONLY place where hand-written TS types are allowed in this project. Keeps the Go struct and TS interface in lock-step so the wire format never drifts.
- ▌ Add API Endpoint · zerx-labAdd a new HTTP endpoint end-to-end across the Go (Huma) backend and the Electron TS renderer. Use when the user asks to add a route, expose a new API, or wire a new request/response type from Go to TS. Covers the mandatory `Go struct → huma.Register → openapi → codegen → typed client` chain.
- ▌ Add Sse Endpoint · zerx-labAdd a Server-Sent Events (SSE) endpoint that stays inside the OpenAPI-driven contract. Use when the user wants streaming/long-lived push from Go to the renderer and WebSocket is not required. Covers registering `text/event-stream` in Huma, declaring a discriminated-union event schema, and writing the thin TS parser since `openapi-typescript` only types the stream body as `string`.
- ▌ Diagnose Dev Reload · zerx-labDiagnose why `task dev` hot-restart isn't picking up Go changes (no sidecar respawn, stale endpoints, renderer hitting old port/token). Use when the user reports "I changed Go code but nothing happened", "the backend didn't reload", or "the watcher seems stuck".