Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计通过

omi-flutter-patternsOMI Flutter 模式

Agent Skill

omi-flutter-patterns 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

309

周安装

13

GitHub Stars

7,898

下载量

108
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/basedhardware/omi --skill omi-flutter-patterns

简介

omi-flutter-patterns 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中快速定位候选结果。

  • 适用于需要根据关键词或任务场景从来源线索中获取信息的场景。
  • 通过 npx skills add 命令安装,需结合原始 README 核验具体用法。
  • 安装前建议确认权限范围、维护状态及是否触发联网或文件读写操作。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Omi Flutter Patterns Skill

This skill provides guidance for working with the Omi Flutter app, including BLE device communication, state management, backend integration, and localization.

When to Use

Use this skill when:

  • Working on Flutter/Dart code in app/
  • Implementing BLE device communication
  • Working with state management (Provider)
  • Integrating with backend APIs
  • Adding new UI screens or widgets

Key Patterns

State Management

The app uses Provider pattern for state management:

// Define provider
class ConversationProvider extends ChangeNotifier {
  List<Conversation> _conversations = [];

  List<Conversation> get conversations => _conversations;

  Future<void> loadConversations() async {
    _conversations = await api.getConversations();
    notifyListeners();
  }
}

// Use in widget
final provider = Provider.of<ConversationProvider>(context);

Localization

CRITICAL: All user-facing strings must use localization:

// ✅ GOOD
Text(context.l10n.helloWorld)

// ❌ BAD
Text('Hello World')

Adding keys: Use jq to add keys to ARB files, then run cd app && flutter gen-l10n

Backend Integration

REST API

// lib/backend/http/api/conversations.dart
class ConversationsAPI {
  Future<List<Conversation>> getConversations() async {
    final response = await httpClient.get('/v1/conversations');
    return (response.data['items'] as List)
        .map((json) => Conversation.fromJson(json))
        .toList();
  }
}

WebSocket

// lib/backend/http/webhooks.dart
class WebSocketClient {
  Future<void> connect(String uid) async {
    _socket = await WebSocket.connect('$baseUrl/v4/listen?uid=$uid');
    _socket!.listen((data) {
      // Handle transcript
    });
  }
}

BLE Device Communication

Device Connection

// Scan for devices
final devices = await scanForOmiDevices();  // Name: "Omi"

// Connect
await device.connect();

// Discover services
final services = await device.discoverServices();

// Audio service UUID: 19B10000-E8F2-537E-4F6C-D104768A1214
// Audio data UUID: 19B10001-E8F2-537E-4F6C-D104768A1214
// Codec type UUID: 19B10002-E8F2-537E-4F6C-D104768A1214

Audio Packet Format

  • Header: 3 bytes (packet number + index)
  • Payload: 160 audio samples
  • Codec: Opus (preferred), PCM, Mu-law
  • Byte order: Little-endian

Platform Support

The app supports:

  • iOS: CocoaPods, Firebase config in ios/Config/
  • Android: Gradle, Firebase config in android/app/src/
  • macOS: CocoaPods, Firebase config in macos/Config/
  • Windows: CMake, native Windows audio

Use PlatformManager for platform detection.

Common Tasks

Adding a New Screen

  1. Create page in lib/pages/
  2. Add route in navigation
  3. Use Provider for state
  4. Use localization for all strings
  5. Test on all platforms

Adding a New API Endpoint

  1. Add method to appropriate API class in lib/backend/http/api/
  2. Use HttpClient for requests
  3. Handle errors gracefully
  4. Update data models if needed

Adding BLE Functionality

  1. Use flutter_blue_plus package
  2. Follow BLE protocol (see Protocol docs)
  3. Handle packet fragmentation
  4. Support all codec types

Related Documentation

The docs/ folder is the single source of truth for all user-facing documentation, deployed at docs.omi.me.

  • App Setup: docs/doc/developer/AppSetup.mdx - View online
  • BLE Protocol: docs/doc/developer/Protocol.mdx - View online
  • Flutter Architecture: .cursor/rules/flutter-architecture.mdc

Related Cursor Resources

Rules

  • .cursor/rules/flutter-architecture.mdc - App structure and state management
  • .cursor/rules/flutter-backend-integration.mdc - Backend API integration
  • .cursor/rules/flutter-ble-protocol.mdc - BLE device communication
  • .cursor/rules/flutter-localization.mdc - Localization requirements
  • .cursor/rules/flutter-platform-specific.mdc - Platform-specific code

Subagents

  • .cursor/agents/flutter-developer/ - Uses this skill for Flutter development

Commands

  • /flutter-setup - Uses this skill for setup guidance
  • /flutter-test - Uses this skill for testing patterns
  • /flutter-build - Uses this skill for build patterns

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

32.52%
按下载量换算35

Claude

29.96%
按下载量换算32

Cursor

18.13%
按下载量换算20

Gemini CLI

9.78%
按下载量换算11

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

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

安装前确认

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

来源信息

继续浏览同类 Skills