flutter-duit-bdui

Integrate, fix, review, migrate, test, or debug Duit / flutter_duit backend-driven UI usage in Flutter apps. Use this for tasks mentioning DUIT, flutter_duit, backend-driven UI, BDUI, server-driven UI, XDriver, DuitViewHost, DuitRegistry, HTTP or WebSocket transport, custom Duit components, capability delegates, compile-time DUIT flags, or rendering JSON layouts from a backend.

Last repository push
GitHub Stars
114
Forks
19
Issues / PRs
0

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "flutter-duit-bdui" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-24e61772889317d06eae22172887749e6b67ac100eaba0ee7e9f2ac6806590c1. Verify the upstream source and version against https://github.com/MADTeacher/mad-agents-skills before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

github.com

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Integrate, fix, review, migrate, test, or debug Duit / flutter_duit backend-driven UI usage in Flutter apps. Use this for tasks mentioning DUIT, flutter_duit, backend-driven UI, BDUI, server-driven UI, XDriver, DuitViewHost, DuitRegistry, HTTP or WebSocket transport, custom Duit components, capability delegates, compile-time DUIT flags, or rendering JSON layouts from a backend.

0 Downloads

Introduction source: third_party · MADTeacher · 0.0.1 Reference

SkillPi interpretation

Tasks
Not specified in the source documentation.
Audience
Not specified in the source documentation.
Inputs and outputs
Not specified in the source documentation.
Software, accounts and paid services
Not specified in the source documentation.
Limits and differences
Do not invent server JSON schema, action payloads, event formats, or widget attributes. Inspect existing backend contracts, fixtures, docs, or tests. Do not add `duit_kernel` directly unless the task requires kernel models, custom extensions, or APIs not exported by `flutter_duit`. Do not register custom widgets after the app has already tried to render layouts that use them. Do not keep a driver as an unowned global unless the existing architecture has a clear lifecycle owner and cleanup path. Do not silently downgrade unknown widget behavior in development. Prefer surfacing schema issues early unless the user explicitly wants permissive fallback behavior. Do not promise WebSocket, native m
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: flutter-duit-bdui
description: >-
  Integrate, fix, review, migrate, test, or debug Duit / flutter_duit
  backend-driven UI in Flutter applications. Use when a task mentions DUIT,
  flutter_duit, backend-driven UI, BDUI, server-driven UI, XDriver,
  DuitViewHost, DuitRegistry, HTTP or WebSocket transports, custom Duit
  widgets, components, capability delegates, compile-time DUIT flags, or
  rendering JSON layouts from a backend.

Flutter Duit Backend-Driven UI

You are a Flutter BDUI integration engineer for Duit and flutter_duit.

Principle 0

flutter_duit has changed its public API across major versions. Do not write driver, transport, registry, or widget-host code from memory. First identify the installed or target package version, then use examples and API shapes that match that version. If the version cannot be determined, use current official docs as the default and state the assumption.

Workflow

  1. Identify the task type: install, render a remote/static layout, add a custom widget, register components, configure transport, customize capabilities, tune compile-time flags, or debug rendering/lifecycle issues.
  2. Inspect the target Flutter project before editing: pubspec.yaml, pubspec.lock when present, existing Duit setup, app entrypoint, state management, routing, and test conventions.
  3. Determine the flutter_duit version:
    • Prefer pubspec.lock or the existing dependency constraint.
    • If adding the package, check current official package docs or run flutter pub add flutter_duit when dependency installation is part of the user request.
    • If the package major version is not 4.x, verify API names before using any examples from this skill.
  4. Choose the smallest integration path that fits the product need:
    • Use XDriver.remote for backend-driven screens loaded from a server.
    • Use XDriver.static for local JSON, tests, previews, or offline fixtures.
    • Use custom widgets/components only when server JSON must render UI that the built-in collection cannot represent.
    • Use capability delegates only for framework behavior changes such as custom transport, logging, focus, scripting, native modules, or action execution.
  5. Read only the routed resources needed for the scenario.
  6. Implement with normal Flutter ownership rules: keep driver lifecycle in a StatefulWidget or equivalent owner, register custom widgets before rendering layouts, and dispose drivers/managers that own resources.
  7. Validate in the target project. If validation cannot run, report the blocker and the residual risk instead of implying the integration is proven.

Current 4.x API Guardrail

For flutter_duit 4.x, prefer the public shapes shown by current package examples:

final driver = XDriver.remote(
  transportManager: HttpTransportManager(
    url: "/layout",
    baseUrl: "http://localhost:3000",
    defaultHeaders: {
      "Content-Type": "application/json",
    },
  ),
);
DuitViewHost.withDriver(
  driver: driver,
  placeholder: const CircularProgressIndicator(),
);
final driver = XDriver.static(
  {
    "type": "Text",
    "id": "1",
    "attributes": {
      "data": "Hello, World!",
    },
  },
  transportManager: StubTransportManager(),
);

Do not use older or unverified constructor shapes such as XDriver(...), HttpTransportManager(options: ...), headers, or WSTransportManager unless the installed package version and API reference confirm them.

Resource Routing

Task Read Why
Driver lifecycle, remote/static/native mode, event streams, or public methods references/public_api.md Version-aware API contracts and 4.x examples
Custom capabilities, custom transport, logging, focus, scripting, native modules, or action execution references/capabilities.md Delegate responsibilities and implementation guardrails
Compile-time DUIT behavior flags or --dart-define usage references/environment_vars.md Supported flags, defaults, and command examples
Rendering failures, initialization errors, theme issues, or memory leaks references/troubleshooting.md Symptom-to-action debugging checklist

External sources to verify when API details matter:

  • https://pub.dev/packages/flutter_duit
  • https://pub.dev/documentation/flutter_duit/latest/
  • https://github.com/Duit-Foundation/flutter_duit
  • https://www.duit.pro/docs/

Constraints

  • Do not invent server JSON schema, action payloads, event formats, or widget attributes. Inspect existing backend contracts, fixtures, docs, or tests.
  • Do not add duit_kernel directly unless the task requires kernel models, custom extensions, or APIs not exported by flutter_duit.
  • Do not register custom widgets after the app has already tried to render layouts that use them.
  • Do not keep a driver as an unowned global unless the existing architecture has a clear lifecycle owner and cleanup path.
  • Do not silently downgrade unknown widget behavior in development. Prefer surfacing schema issues early unless the user explicitly wants permissive fallback behavior.
  • Do not promise WebSocket, native module, scripting, or component support from this skill alone; verify the exact API for the installed package version.

Validation

Run the strongest available validation for the target project:

  1. flutter pub get after dependency changes.
  2. dart format on edited Dart files.
  3. flutter analyze for Flutter projects.
  4. Existing focused tests, or flutter test when the change touches shared UI, actions, parsing, or lifecycle behavior.
  5. For static layout work, add or run a smoke test/widget preview that renders a minimal DuitViewHost.withDriver.
  6. For remote transport work, verify base URL, route, headers, auth handling, loading state, error state, and driver disposal.

If any validation command is unavailable, blocked by dependency download, platform setup, or missing project context, say which check did not run and why.

Fallback

If the target version/API cannot be verified, stop before writing speculative Duit code that may not compile. Ask for the intended flutter_duit version or permission to inspect/install dependencies. If the user asks for a best-effort draft anyway, mark the code as version-assumed and list the validation still needed.

Current listing version

0.0.1

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value88/100

Highlights

  • Provides comprehensive, actionable guidance for a specific and valuable Flutter development niche (backend-driven UI with flutter_duit).
  • Covers end-to-end scenarios from integration and debugging to migration and testing, offering clear workflows and best practices.
Trigger Precision95/100

Highlights

  • Trigger keywords are highly specific and well-defined, covering the core technology (flutter_duit, DUIT) and common tasks (integrate, fix, debug).
  • Clear boundary conditions reduce the risk of misactivation or overlap with other Skills.
Structure and Standards92/100

Areas to improve

  • 缺少 When to Use 章节 Reported severity: Minor

    While the description and workflow are clear, a dedicated 'When to Use' section is a common user expectation for Skill documentation.

    Recommendation: Consider adding a concise 'When to Use' section to explicitly list typical scenarios or user requests that should activate this Skill.

Highlights

  • Well-structured with a logical flow: principle, workflow, API guardrails, resource routing, constraints, validation, and fallback.
  • Includes concrete, version-specific code examples and a resource routing table for easy navigation.
Execution Reliability90/100

Areas to improve

  • 文档长度 Reported severity: Minor

    The document is quite long, which might impact readability for some users seeking quick answers.

    Recommendation: Consider breaking down very long sections into more sub-sections or providing a quick-start summary for common tasks.

Highlights

  • Emphasizes version-awareness and checking project context (pubspec.yaml/lock) before making changes, reducing integration errors.
  • Includes a robust validation checklist (flutter pub get, analyze, test) and a clear fallback strategy for uncertain scenarios.
Evidence Verifiability (mean of the first four)91/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These common operations were not identified in the main document. This does not mean no permissions or risks exist.

Domains or addresses referenced in the document

These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.

  • github.com
  • localhost
  • pub.dev
  • www.duit.pro

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Not specified in the source documentation.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.