用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/fazi-gondal/Vidsaver --skill flet-extension-workflow命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | flet-extension-workflow |
| description | Guided workflow for creating a Flet extension package (Service or UI Control) (Flet 0.85.x+). |
You are guiding the user through creating a Flet extension package step by step. Follow these 6 phases in order.
Before starting, ask the user what Flutter package they want to wrap and whether it's a Service (no UI) or UI Control (visual widget).
ft.Service) — for SDKs, background services, platform APIsft.LayoutControl) — for widgets that render on screenSummarize the plan before proceeding.
Use flet-pkg CLI to generate the project skeleton:
# Auto-analyze the Flutter package (recommended)
flet-pkg create my-extension --analyze
# Or manually if flet-pkg is not available
If scaffolding manually, create:
flet-my-extension/
├── pyproject.toml
└── src/
├── flet_my_extension/
│ ├── __init__.py
│ ├── my_control.py
│ └── types.py
└── flutter/flet_my_extension/
├── pubspec.yaml
└── lib/
├── flet_my_extension.dart
└── src/
├── extension.dart
└── my_service.dart
Ensure pyproject.toml includes:
[tool.setuptools.package-data]
"flutter.flet_my_extension" = ["**/*"]
Check and fix the generated code:
camel_to_snake conversion from Dart_invoke_method("key") must match Dart switch casestriggerEvent("name") → on_name: EventHandlercontrol.type switch in Dart__init__.py with __all__ exportsErrorEvent and on_error handlerinit()_onInvokeMethod with all methodscontrol.triggerEvent()_handleError with FlutterError.reportErrordispose() cleanupexamples/:
import flet as ft
import flet_my_extension as fme
async def main(page: ft.Page):
service = fme.MyService(
on_event=lambda e: print(f"Event: {e.data}"),
on_error=lambda e: print(f"Error: {e.message}"),
)
page.services.append(service) # or page.add() for UI
# ... test methods
ft.run(main)
cd examples/flet_my_extension_example && flet runpyproject.toml (description, author, URLs)python -m buildtwine upload dist/*publish_to: none)@ft.control("Name") — PascalCase string must match Dart control.typemetadata={"skip": True} for all internal fieldsMap<String, dynamic>.from(args).toString() in Dart[tool.setuptools.package-data] is mandatory in pyproject.tomlpage.services.append() | UI → page.add()createService() for services, createWidget() for UI