
lobehub/lobe-chat
15 skills12.4k installs1M starsGitHub
Install
npx skills add https://github.com/lobehub/lobe-chatSkills in this repo
1DrizzleDrizzle is a phase-specific agent skill that encodes how LobeHub uses Drizzle ORM on PostgreSQL in strict mode. Solo builders and contributors invoke it when adding tables, columns, indexes, junction tables, or typed queries so changes match existing schema helpers, migration layout, and join conventions. Triggers include mentions of `pgTable`, `eq`, `inArray`, `uniqueIndex`, `references({ onDelete })`, and requests to add foreign keys or new entities. The skill deliberately defers migration file mechanics to the companion db-migrations skill, keeping schema authoring and query style in one place. Use it during backend build work on chat or agent products that fork or extend LobeChat patterns, reducing review churn from inconsistent timestamps, ID formats, or N+1-style relational loads.925installs2TypescriptThe LobeHub typescript skill is a TypeScript code style and type-safety guide agents should read before changing any `.ts`, `.tsx`, or `.mts` file in the Lobe Chat ecosystem. Solo builders maintaining forks or plugins get a consistent contract for interfaces, strict unknown handling, separation of type imports, and error-suppression discipline that matches ESLint expectations in that repo. It triggers on everyday edits, type fixes, and review questions such as whether a shape should be an interface or a type alias. The skill is procedural lint philosophy rather than a formatter: it tells the agent how to reason about extensible types like pipeline metadata and when to use `declare module` augmentation. Use it during Build when implementing features, during Ship review when auditing PR type quality, and during Operate iterate passes when hardening error paths. It does not replace running `tsc` or project ESLint—it reduces rework by encoding team norms up front.895installs3ReactReact (Lobe Flexbox) is an agent skill that teaches how to build layouts with @lobehub/ui Flexbox and Center components—patterns familiar from the Lobe Chat codebase even though the slug says react. Solo builders skinning chat or dashboard products get opinionated spacing, horizontal versus vertical stacks, and a three-region shell: fixed-width sidebar, flex-growing main column, and footer band with theme-aware borders. Props such as gap, align, justify, paddingInline, and paddingBlock are spelled out so agents stop inventing one-off div soups. The guide is reference-weight, not a full design system audit; pair it with your theme tokens and accessibility checks before ship. Use it in Build frontend work when implementing Lobe UI surfaces; it does not cover routing, data fetching, or backend agent tooling.891installs4ZustandThis skill encodes LobeHub LobeChat’s Zustand architecture: public actions are the UI-facing verbs, internal_* actions own validation, service calls, and optimistic updates, and internal_dispatch* methods apply reducer-shaped state changes. Solo builders and small teams extending LobeChat—or mirroring its patterns in a fork—use it whenever they touch src/store, add createXxxSlice modules, or debug stale reads from selectors. It explains when to use reducers for entity maps versus lightweight set patches, how flattenActions composes slices, and how to migrate object-based StateCreator slices to class-based action implementations without splitting responsibilities across layers. The skill is not a generic Zustand tutorial; it is procedural knowledge tied to LobeChat naming, StoreSetter usage, and the rule that UI must not call internal_* handlers directly. Invoke it when adding an action, designing optimistic message flows, or refactoring chat and topic state.878installs5Project OverviewProject Overview is a LobeHub monorepo orientation skill that gives agents and solo builders a curated directory map and technology stack summary before they touch code. It explains that listings are intentionally incomplete snapshots and that you should verify current folders with ls on packages, store, and route groups. The guide covers the AI Agent Workspace product scope, supported surfaces (web, Electron desktop in this repo, mobile elsewhere), and the primary frameworks and libraries teams use day to day. Install or enable it when you need to locate business stubs, understand apps versus packages versus src layout, or onboard to github.com/lobehub/lobehub without wandering the tree blindly. It does not replace reading module-level READMEs or running the dev server, but it shortens the first hour of contribution by anchoring naming, stack choices, and where desktop versus web code lives.859installs6I18nThe i18n skill is a LobeHub-specific procedural guide for internationalizing the chat client with react-i18next. Solo and indie builders shipping LobeChat forks use it whenever they add or change user-visible text in TypeScript or TSX, create keys under `src/locales/default/{namespace}.ts`, or preview zh-CN and en-US strings. It encodes the project’s non-negotiable workflow: English en-US as default, flat keys only, parameters in double-brace form, and namespace registration in the default index. Because generated locale JSON is produced by `pnpm i18n`, the skill steers agents away from editing output files directly, which prevents drift and broken CI. It matters when agents would otherwise inline Chinese or English strings or nest objects against team convention—keeping one consistent catalog of keys speeds review and downstream translation.856installs7DesktopDesktop is an agent skill for solo and indie builders extending the Lobe Chat Electron app. It walks through a repeatable architecture: main-process Controller modules grouped by feature name, IPC methods that call system APIs, and a renderer-side service layer that drives store actions for UI state. The included notification controller example shows typed request/response shapes, capability checks like Notification.isSupported(), and clean error handling—patterns you reuse for other desktop capabilities. Use it when you are adding or debugging a desktop-only feature in this monorepo rather than improvising file placement or IPC contracts. It matters because Electron apps fail silently when IPC groups, module inheritance, or client types drift from the established @lobechat/electron-client-ipc pattern. The skill keeps new features aligned with ControllerModule conventions so your agent changes land in the right apps/desktop paths and stay testable alongside existing controllers.832installs8Microcopymicrocopy encodes LobeHub’s UI copy standards for solo builders and small teams shipping an agent collaboration product. It is a quick-reference skill that points to language-specific deep guides (references/zh.md and references/en.md) with anti-patterns, tone matrices, and scenario walk-throughs. A fixed Chinese–English terminology table keeps Workspace, Agent, Group, Context, Memory, Integration, Skill, and related product nouns consistent across the app. Brand principles stress creating agents from one sentence, multi-agent collaboration with shared context, and controlled evolution—not vague “AI generation” language. Invoke it when writing buttons, error messages, empty states, onboarding, i18n strings, or improving existing UI text. It supports both Chinese and English workflows and aligns copy with “Where Agents Collaborate” positioning.831installs9Add Setting Envadd-setting-env is a Lobe Chat–specific agent skill for solo builders and small teams who need governed defaults for user-facing settings without baking values into the client. It walks through defining coerced, bounded server env vars in per-domain env files, aligning those fields with existing user settings types on GlobalServerConfig, and merging them into the async server global config so runtime precedence stays predictable. The workflow favors schema validation at the boundary and partial-deep config maps so new settings domains stay consistent with the monorepo’s types package. Invoke when you are adding or changing a setting that should ship with a deployment-specific default while still allowing per-user overrides. It is not a generic secrets or feature-flag framework—it is the house pattern for server-driven setting defaults inside this codebase.826installs10Add Provider Docadd-provider-doc is a Lobe Chat–specific agent skill that walks a solo maintainer through documenting a new AI model provider end to end. It is for builders extending Lobe’s provider matrix who need consistent bilingual usage pages, self-hosting environment-variable reference, Docker alignment, and `.env.example` snippets without leaking secrets. Use it when you have integrated or are about to ship a provider backend and the docs site must match what operators configure in production. The workflow mirrors existing providers like Fal: MDX in English and Chinese, screenshot-driven onboarding, pricing notes, then synchronized updates to model-provider env docs and container-related config. Because documentation drift breaks self-hosters faster than code bugs, treating this as a checklist skill keeps marketing URLs, variable names, and deployment examples in one pass—ideal for indie teams who cannot afford a separate technical writer for every vendor addition.818installs11Modalmodal is an agent skill from the LobeChat repository that encodes LobeHub’s imperative modal conventions for agents editing that codebase. Solo builders and small teams extending LobeChat—or forks using @lobehub/ui—invoke it when creating dialogs, confirm flows, popups, or migrating legacy antd Modal usage to the base-ui headless stack. The skill stresses mounting ModalHost from @lobehub/ui/base-ui once near the application root; without that host, imperative createModal invocations silently fail to render. New work should call createModal and confirmModal, consume useModalContext inside modal content, and organize features under predictable folders exporting factory functions. It is narrowly scoped to LobeHub UI patterns, not generic React modal tutorials. Use during Build frontend tasks when wireframes demand confirms, settings sheets, or multi-step flows that should not clutter parent component state. Skipping it when you are not on LobeHub UI avoids mismatched guidance.816installs12TestingTesting is an agent skill from the LobeChat ecosystem for solo builders and small teams shipping conversational agents who need faithful end-to-end coverage without re-mocking half the stack. It codifies a minimal-mock doctrine: swap the database for in-memory PGLite and Redis-backed state/stream managers, while keeping model configuration, tool engines, context engineering, and runtime services real so failures reflect production wiring. The guide pushes vi.spyOn over blanket vi.mock so each case can simulate distinct OpenAI-style streams, tool calls, and edge responses. Defaulting tests to gpt-5 reduces flake when model catalogs change. Install it when you are extending LobeChat agent runtime behavior and want Vitest-style E2E recipes that agents can follow consistently. It is not a generic unit-testing primer—it assumes the monorepo packages and test-utils imports documented in the readme.814installs13LinearLinear is an agent skill bundled with Lobe Chat workflows for teams that track work in Linear and ship through GitHub. It applies when conversations mention Linear issue IDs (for example LOBE-4540), creating PRs that reference those issues, or explicitly asking to link Linear. The skill insists on two deliverables for every fix: machine-readable `Fixes ISSUE-ID` text in the PR body so Linear auto-links and closes on merge, and a completion comment on the issue summarizing what changed for PMs and designers who live in Linear—not in GitHub diffs. Before coding, agents should fetch issue details and extract embedded images because mockups and error screenshots often carry requirements text alone omits. Search for `linear` MCP tools first; if none exist, treat Linear as unavailable rather than hallucinating updates. Solo builders on small teams get disproportionate value because one person plays engineer and communicator; skipping the comment leaves stakeholders blind. Use alongside your normal PR and code-review skills after implementation is ready.812installs14Hotkeyhotkey is an internal LobeHub agent skill that walks contributors through adding or editing keyboard shortcuts in the chat product. It targets solo builders and small teams extending LobeHub who need a repeatable path from a new action (for example clear chat) through `HotkeyEnum`, default registration in `HOTKEYS_REGISTRATION`, i18n strings, and scoped React hooks with `useHotkeyById`. The guide also covers optional tooltip hotkey hints and how to respect shortcut scopes so new bindings do not collide with existing ones. Use it during frontend build tasks whenever you touch hotkey constants, registration tables, or chat-scope hook registration—not as a generic cross-app hotkey library.809installs15Debugdebug is an agent skill for contributors working on the Lobe Chat monorepo who need consistent, toggleable logging with the popular `debug` package instead of ad-hoc `console.log` sprawl. It documents how to instantiate loggers with `lobe-server`, `lobe-client`, `lobe-desktop`, and router-specific prefixes, which format specifiers to use for objects and numbers, and how operators turn verbosity on in the browser (`localStorage.debug`), Node dev servers (`DEBUG=lobe-*`), or Electron (`process.env.DEBUG`). The skill is marked user-invocable false but remains valuable when an agent is asked to instrument a route—such as the edge market router—or to debug market and agent flows during development. It does not replace structured production observability; it speeds local diagnosis for solo maintainers shipping chat features. Intermediate familiarity with TypeScript modules in Lobe Chat is assumed.554installs