[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6BXSYSAKZCQ2FTADV8A7VP8":3,"skill-same:01M6BXSYSAKZCQ2FTADV8A7VP8":67},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":44,"commitSha":45,"skillDirectory":46,"forksCount":47,"repositoryHtmlUrl":48,"repositoryHomepageUrl":49,"ownerHtmlUrl":50,"ownerBlogUrl":6,"ownerDescription":51,"updatedAt":52,"install":53,"resources":66},"01M6BXSYSAKZCQ2FTADV8A7VP8","flutter-edge-ai-mediapipe",null,"Use when running .task or .bin models (MediaPipe GenAI, ModelFileType.task or ModelFileType.binary) with flutter_edge_ai_mediapipe on Android, iOS or web. Also use when CocoaPods rejects the iOS platform version, images are ignored in a MediaPipe chat, maxOutputTokens has no effect, or an iOS app is terminated while loading a .task model on the GPU. MediaPipe has no macOS, Windows or Linux support — use a .litertlm model there (flutter-edge-ai-inference).","DenisovAV\u002Fflutter_edge_ai","DenisovAV","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F9622910?v=4","01M6BXRH02KTWK364FYEH4AECE","Sasha Denisov","01M6BXRH45KJKJ712H82EV47AS",662,"MIT","https:\u002F\u002Fgithub.com\u002FDenisovAV\u002Fflutter_edge_ai\u002Fblob\u002Fmain\u002Fpackages\u002Fflutter_edge_ai\u002Fskills\u002Fflutter-edge-ai-mediapipe\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"edge","edge ai","flutter","mediapipe","flutter edge ai mediapipe","running","when","version","use","platform","loading","effect","app","images","macos","support","genai","linux","model","windows","2026-11-10 10:12:30",false,"---\nname: flutter-edge-ai-mediapipe\ndescription: Use when running .task or .bin models (MediaPipe GenAI, ModelFileType.task or ModelFileType.binary) with flutter_edge_ai_mediapipe on Android, iOS or web. Also use when CocoaPods rejects the iOS platform version, images are ignored in a MediaPipe chat, maxOutputTokens has no effect, or an iOS app is terminated while loading a .task model on the GPU. MediaPipe has no macOS, Windows or Linux support — use a .litertlm model there (flutter-edge-ai-inference).\n---\n\n# The MediaPipe engine\n\n## Rules\n\n1. Depend on `flutter_edge_ai` and `flutter_edge_ai_mediapipe`, and import both. The engine package does not re-export core.\n2. Declare `fileType: ModelFileType.task` for `.task` files and `ModelFileType.binary` for `.bin` files.\n3. An app that includes this package needs iOS 16.0.\n4. There is no desktop support.\n5. `maxTokens` is the real context limit — small values are not raised as they are on `.litertlm`. `maxOutputTokens` is ignored; stop generation with `session.stopGeneration()`.\n6. On Android and iOS, `openChat` inherits the model's audio support but **not** its image support — pass `supportImage: true` to the chat as well, or the image is dropped.\n7. Upstream MediaPipe LLM Inference is maintenance-only; prefer a `.litertlm` model (flutter-edge-ai-inference) for new work.\n8. On iOS, do not load a `.task` model with `PreferredBackend.gpu`: Gemma 3 1B reaches the app's memory limit while loading and iOS kills the app with no crash report. Use `.litertlm`, or `PreferredBackend.cpu`.\n\n## Setup\n\n```sh\nflutter pub add flutter_edge_ai flutter_edge_ai_mediapipe\n```\n\n```dart\nimport 'package:flutter_edge_ai\u002Fflutter_edge_ai.dart';\nimport 'package:flutter_edge_ai_mediapipe\u002Fflutter_edge_ai_mediapipe.dart';\n\nawait FlutterEdgeAi.initialize(inferenceEngines: [MediaPipeEngine()]);\n\nawait FlutterEdgeAi.installModel(\n  modelType: ModelType.gemmaIt,\n  fileType: ModelFileType.task,\n).fromNetwork(url).install();\n\nfinal InferenceModel model = await FlutterEdgeAi.getActiveModel(maxTokens: 1024);\n```\n\nSessions, chats, streaming and the common traps work as in the flutter-edge-ai-inference skill — except that on web the `openSession` \u002F `openChat` sessions (its concurrent-conversation pattern) share the one loaded model (MediaPipe's JS LlmInference object): their turns run one at a time (a turn waits for the other sessions' turns as long as they run, unless they are stopped), each resends that session's whole conversation, and the sampling and LoRA are the ones the first session loaded the model with (a later session that asks for others gets a one-time printed warning).\n\nResponse formats are the exception: MediaPipe does not enforce them on mobile\nor Web. `model.structuredOutputSupport` is `none`, `refusalFor(format)` returns a\n`ResponseFormatUnsupportedException`, and\n`openSession` \u002F `openChat(responseFormat: format)` throw it before opening the\nMediaPipe session.\n\n## iOS\n\n`ios\u002FPodfile`, declared once:\n\n```ruby\nplatform :ios, '16.0'\nuse_frameworks! :linkage => :static\n```\n\nWith Swift Package Manager, also set **iOS Deployment Target** to 16.0 on the Runner target in Xcode. This package ships no Swift package manifest, so the app gets an `ios\u002FPodfile` either way.\n\nCore and the other engines build from iOS 15.0, except `flutter_edge_ai_llama`, which needs 16.4. If the app does not use `.task` models, leave this package out and stay on 15.\n\nLarge models also need **Extended Virtual Addressing**, **Increased Memory Limit** and **Increased Debugging Memory Limit**, added in Xcode under **Signing & Capabilities**, or the app is killed for memory.\n\nRun `.task` models on `PreferredBackend.cpu` on iOS: on the GPU even Gemma 3 1B is killed for memory while loading, with the entitlements present.\n\n## Images and audio\n\n```dart\nfinal model = await FlutterEdgeAi.getActiveModel(maxTokens: 4096, supportImage: true);\nfinal chat = await model.openChat(supportImage: true);\ntry {\n  await chat.addQueryChunk(\n    Message(text: 'Describe this image.', isUser: true, imageBytes: bytes),\n  );\n  final response = await chat.generateChatResponse();\n} finally {\n  await chat.close();\n}\n```\n\nOn Android and iOS, a chat without `supportImage: true` drops the image and the model answers the text alone. On web the chat follows the model: an image sent to a model loaded without `supportImage: true` throws `ArgumentError`.\n\nAudio input works on Android and iOS only with a `.task` that carries an audio encoder. The Gemma 3n `.task` files do not, so for audio use a `.litertlm` model (flutter-edge-ai-inference).\n\n## Bounding output\n\n```dart\nfinal session = await model.openSession();\nawait session.addQueryChunk(Message(text: prompt, isUser: true));\nfinal reply = StringBuffer();\nvar produced = 0;\nawait for (final token in session.getResponseAsync()) {\n  reply.write(token);\n  if (++produced >= 200) {\n    await session.stopGeneration();\n    break;\n  }\n}\nawait session.close();\n```\n\n## Web\n\nLoad a web build of the model — the `-web.task` file, e.g. `gemma3-1b-it-int4-web.task` rather than `gemma3-1b-it-int4.task`. Mobile `.task` files generally do not run on web, so install a separate URL there.\n\nAdd to `web\u002Findex.html` `\u003Chead>`, before Flutter boots:\n\n```html\n\u003Cscript type=\"module\">\nimport { FilesetResolver, LlmInference } from 'https:\u002F\u002Fcdn.jsdelivr.net\u002Fnpm\u002F@mediapipe\u002Ftasks-genai@0.10.30';\nwindow.FilesetResolver = FilesetResolver;\nwindow.LlmInference = LlmInference;\n\u003C\u002Fscript>\n\u003Cscript src=\"cache_api.js\">\u003C\u002Fscript>\n\u003Cscript src=\"opfs_helper.js\">\u003C\u002Fscript>\n```\n\nPin the version — an unpinned import takes whatever was published last. Copy `cache_api.js` and `opfs_helper.js` from the `flutter_edge_ai` package's `web\u002F` directory into the app's `web\u002F`; find it with `grep -A1 '\"name\": \"flutter_edge_ai\"' .dart_tool\u002Fpackage_config.json`.\n\nWeb is GPU-only. Models over about 2 GB need OPFS streaming storage:\n\n```dart\nawait FlutterEdgeAi.initialize(\n  webStorageMode: WebStorageMode.streaming,\n  inferenceEngines: [MediaPipeEngine()],\n);\n```\n\n## Android\n\nText inference runs on `arm64-v8a`, `x86_64` and `armeabi-v7a`. The release build needs `\u003Cuses-permission android:name=\"android.permission.INTERNET\"\u002F>` in `android\u002Fapp\u002Fsrc\u002Fmain\u002FAndroidManifest.xml` to download a model — Flutter's template declares it only for debug and profile builds.\n","# The MediaPipe engine\n\n## Rules\n\n1. Depend on `flutter_edge_ai` and `flutter_edge_ai_mediapipe`, and import both. The engine package does not re-export core.\n2. Declare `fileType: ModelFileType.task` for `.task` files and `ModelFileType.binary` for `.bin` files.\n3. An app that includes this package needs iOS 16.0.\n4. There is no desktop support.\n5. `maxTokens` is the real context limit — small values are not raised as they are on `.litertlm`. `maxOutputTokens` is ignored; stop generation with `session.stopGeneration()`.\n6. On Android and iOS, `openChat` inherits the model's audio support but **not** its image support — pass `supportImage: true` to the chat as well, or the image is dropped.\n7. Upstream MediaPipe LLM Inference is maintenance-only; prefer a `.litertlm` model (flutter-edge-ai-inference) for new work.\n8. On iOS, do not load a `.task` model with `PreferredBackend.gpu`: Gemma 3 1B reaches the app's memory limit while loading and iOS kills the app with no crash report. Use `.litertlm`, or `PreferredBackend.cpu`.\n\n## Setup\n\n```sh\nflutter pub add flutter_edge_ai flutter_edge_ai_mediapipe\n```\n\n```dart\nimport 'package:flutter_edge_ai\u002Fflutter_edge_ai.dart';\nimport 'package:flutter_edge_ai_mediapipe\u002Fflutter_edge_ai_mediapipe.dart';\n\nawait FlutterEdgeAi.initialize(inferenceEngines: [MediaPipeEngine()]);\n\nawait FlutterEdgeAi.installModel(\n  modelType: ModelType.gemmaIt,\n  fileType: ModelFileType.task,\n).fromNetwork(url).install();\n\nfinal InferenceModel model = await FlutterEdgeAi.getActiveModel(maxTokens: 1024);\n```\n\nSessions, chats, streaming and the common traps work as in the flutter-edge-ai-inference skill — except that on web the `openSession` \u002F `openChat` sessions (its concurrent-conversation pattern) share the one loaded model (MediaPipe's JS LlmInference object): their turns run one at a time (a turn waits for the other sessions' turns as long as they run, unless they are stopped), each resends that session's whole conversation, and the sampling and LoRA are the ones the first session loaded the model with (a later session that asks for others gets a one-time printed warning).\n\nResponse formats are the exception: MediaPipe does not enforce them on mobile\nor Web. `model.structuredOutputSupport` is `none`, `refusalFor(format)` returns a\n`ResponseFormatUnsupportedException`, and\n`openSession` \u002F `openChat(responseFormat: format)` throw it before opening the\nMediaPipe session.\n\n## iOS\n\n`ios\u002FPodfile`, declared once:\n\n```ruby\nplatform :ios, '16.0'\nuse_frameworks! :linkage => :static\n```\n\nWith Swift Package Manager, also set **iOS Deployment Target** to 16.0 on the Runner target in Xcode. This package ships no Swift package manifest, so the app gets an `ios\u002FPodfile` either way.\n\nCore and the other engines build from iOS 15.0, except `flutter_edge_ai_llama`, which needs 16.4. If the app does not use `.task` models, leave this package out and stay on 15.\n\nLarge models also need **Extended Virtual Addressing**, **Increased Memory Limit** and **Increased Debugging Memory Limit**, added in Xcode under **Signing & Capabilities**, or the app is killed for memory.\n\nRun `.task` models on `PreferredBackend.cpu` on iOS: on the GPU even Gemma 3 1B is killed for memory while loading, with the entitlements present.\n\n## Images and audio\n\n```dart\nfinal model = await FlutterEdgeAi.getActiveModel(maxTokens: 4096, supportImage: true);\nfinal chat = await model.openChat(supportImage: true);\ntry {\n  await chat.addQueryChunk(\n    Message(text: 'Describe this image.', isUser: true, imageBytes: bytes),\n  );\n  final response = await chat.generateChatResponse();\n} finally {\n  await chat.close();\n}\n```\n\nOn Android and iOS, a chat without `supportImage: true` drops the image and the model answers the text alone. On web the chat follows the model: an image sent to a model loaded without `supportImage: true` throws `ArgumentError`.\n\nAudio input works on Android and iOS only with a `.task` that carries an audio encoder. The Gemma 3n `.task` files do not, so for audio use a `.litertlm` model (flutter-edge-ai-inference).\n\n## Bounding output\n\n```dart\nfinal session = await model.openSession();\nawait session.addQueryChunk(Message(text: prompt, isUser: true));\nfinal reply = StringBuffer();\nvar produced = 0;\nawait for (final token in session.getResponseAsync()) {\n  reply.write(token);\n  if (++produced >= 200) {\n    await session.stopGeneration();\n    break;\n  }\n}\nawait session.close();\n```\n\n## Web\n\nLoad a web build of the model — the `-web.task` file, e.g. `gemma3-1b-it-int4-web.task` rather than `gemma3-1b-it-int4.task`. Mobile `.task` files generally do not run on web, so install a separate URL there.\n\nAdd to `web\u002Findex.html` `\u003Chead>`, before Flutter boots:\n\n```html\n\u003Cscript type=\"module\">\nimport { FilesetResolver, LlmInference } from 'https:\u002F\u002Fcdn.jsdelivr.net\u002Fnpm\u002F@mediapipe\u002Ftasks-genai@0.10.30';\nwindow.FilesetResolver = FilesetResolver;\nwindow.LlmInference = LlmInference;\n\u003C\u002Fscript>\n\u003Cscript src=\"cache_api.js\">\u003C\u002Fscript>\n\u003Cscript src=\"opfs_helper.js\">\u003C\u002Fscript>\n```\n\nPin the version — an unpinned import takes whatever was published last. Copy `cache_api.js` and `opfs_helper.js` from the `flutter_edge_ai` package's `web\u002F` directory into the app's `web\u002F`; find it with `grep -A1 '\"name\": \"flutter_edge_ai\"' .dart_tool\u002Fpackage_config.json`.\n\nWeb is GPU-only. Models over about 2 GB need OPFS streaming storage:\n\n```dart\nawait FlutterEdgeAi.initialize(\n  webStorageMode: WebStorageMode.streaming,\n  inferenceEngines: [MediaPipeEngine()],\n);\n```\n\n## Android\n\nText inference runs on `arm64-v8a`, `x86_64` and `armeabi-v7a`. The release build needs `\u003Cuses-permission android:name=\"android.permission.INTERNET\"\u002F>` in `android\u002Fapp\u002Fsrc\u002Fmain\u002FAndroidManifest.xml` to download a model — Flutter's template declares it only for debug and profile builds.\n",{"name":5,"description":7},"main","413ec57cb3e991481b0a91eb658129bf385387ee","packages\u002Fflutter_edge_ai\u002Fskills\u002Fflutter-edge-ai-mediapipe",180,"https:\u002F\u002Fgithub.com\u002FDenisovAV\u002Fflutter_edge_ai","https:\u002F\u002Fflutteredge.ai","https:\u002F\u002Fgithub.com\u002FDenisovAV","Sasha is Flutter, Dart, Firebase and AI GDE, Co-organizer of Flutter Berlin Community, Expert in On-Device AI","2026-11-14 22:02:12",{"source":8,"skillName":5,"commands":54,"prompt":64,"zipAvailable":65},[55,58,61],{"tool":56,"command":57},"npx","npx skills add DenisovAV\u002Fflutter_edge_ai --skill flutter-edge-ai-mediapipe",{"tool":59,"command":60},"bunx","bunx skills add DenisovAV\u002Fflutter_edge_ai --skill flutter-edge-ai-mediapipe",{"tool":62,"command":63},"pnpm","pnpm dlx skills add DenisovAV\u002Fflutter_edge_ai --skill flutter-edge-ai-mediapipe","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FDenisovAV\u002Fflutter_edge_ai\u002Fblob\u002Fmain\u002Fpackages\u002Fflutter_edge_ai\u002Fskills\u002Fflutter-edge-ai-mediapipe\u002FSKILL.md",true,[],[68,83,95,111,129,142],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":79,"publishedAt":39},"01M6BXTT3TADZ7NN5RY79ZZKDR","send-email","Send an email.","https:\u002F\u002Fgithub.com\u002FDenisovAV\u002Fflutter_edge_ai\u002Fblob\u002Fmain\u002Fpackages\u002Fflutter_edge_ai_agent\u002Fassets\u002Fskills\u002Fsend-email\u002FSKILL.md",[74],{"categoryNo":75,"categoryName":76,"taxonomyType":77,"taxonomyTypeDesc":78},"01JBSEEDCAT000000000000005","邮件与沟通","SCENARIO","使用场景",[80,81,82],"send","send email","email",{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":39},"01M6BXTQPW2BAVZ2SRVTMFF9FA","query-wikipedia","Query summary from Wikipedia for a given topic.","https:\u002F\u002Fgithub.com\u002FDenisovAV\u002Fflutter_edge_ai\u002Fblob\u002Fmain\u002Fpackages\u002Fflutter_edge_ai_agent\u002Fassets\u002Fskills\u002Fquery-wikipedia\u002FSKILL.md",[],[90,91,92,93,94],"wikipedia","query","query wikipedia","for","summary",{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":106,"publishedAt":39},"01M6BXTN6C4R4FZ5T9GRNY5MFG","qr-code","Generates a QR code for the given url.","https:\u002F\u002Fgithub.com\u002FDenisovAV\u002Fflutter_edge_ai\u002Fblob\u002Fmain\u002Fpackages\u002Fflutter_edge_ai_agent\u002Fassets\u002Fskills\u002Fqr-code\u002FSKILL.md",[101],{"categoryNo":102,"categoryName":103,"taxonomyType":104,"taxonomyTypeDesc":105},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[107,108,109,93,110],"qr","qr code","code","URL",{"skillNo":112,"name":113,"nameZh":6,"description":114,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":115,"categories":116,"keywords":117,"publishedAt":39},"01M6BXTJXNJNW59BV5JM3V9YZD","kitchen-adventure","Act as a dungeon master for a text-based adventure set in a world where everyone is a sentient kitchen appliance. Trigger when user says \"start kitchen adventure\".","https:\u002F\u002Fgithub.com\u002FDenisovAV\u002Fflutter_edge_ai\u002Fblob\u002Fmain\u002Fpackages\u002Fflutter_edge_ai_agent\u002Fassets\u002Fskills\u002Fkitchen-adventure\u002FSKILL.md",[],[118,25,119,93,120,121,122,123,124,125,126,127,128],"kitchen adventure","dungeon master","trigger","as","act","world","master","user","text","SET","start",{"skillNo":130,"name":131,"nameZh":6,"description":132,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":133,"categories":134,"keywords":135,"publishedAt":39},"01M6BXTGEPGG025VBEQKPJZB8S","interactive-map","Show an interactive map view for the given location.","https:\u002F\u002Fgithub.com\u002FDenisovAV\u002Fflutter_edge_ai\u002Fblob\u002Fmain\u002Fpackages\u002Fflutter_edge_ai_agent\u002Fassets\u002Fskills\u002Finteractive-map\u002FSKILL.md",[],[136,137,138,139,140,141,93],"interactive map","interactive","map","view","show","location",{"skillNo":143,"name":144,"nameZh":6,"description":145,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":146,"categories":147,"keywords":148,"publishedAt":39},"01M6BXTED45RFKX4EYF9BSWC7H","get-current-time","Get the user's current local date, time, and day of the week.","https:\u002F\u002Fgithub.com\u002FDenisovAV\u002Fflutter_edge_ai\u002Fblob\u002Fmain\u002Fpackages\u002Fflutter_edge_ai_agent\u002Fassets\u002Fskills\u002Fget-current-time\u002FSKILL.md",[],[149,150,151,152,125,153],"current time","get current time","time","get","local"]