contract-based-porting

Port native Android and iOS features to Flutter by contract.

6|Updated Apr 23, 2026
One-click install
npx skills add https://github.com/ImL1s/flutter-claude-skills --skill contract-based-porting
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: contract-based-porting
Source: https://github.com/ImL1s/flutter-claude-skills/tree/main/skills/contract-based-porting
Command: npx skills add https://github.com/ImL1s/flutter-claude-skills --skill contract-based-porting

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Cross-language porting often results in missing features or divergent behavior. This approach guarantees parity by porting contracts rather than lines, extracting the entire public API surface from a reference project first.

Core Features & Use Cases

  • SSOT extraction: identify the reference's command/endpoint registry and capabilities to port the exact surface.
  • Contract-driven tests: validate that the target implementation advertises and enforces all referenced contracts.
  • Incremental porting: port contracts to Dart, wire up handlers, and iterate until parity is achieved across languages.
  • Use cases: port Kotlin/Swift/Java features to Dart, migrate between frameworks, and maintain reliable feature parity.

Quick Start

Follow the three-step contract-based porting workflow: extract the SSOT from the reference project, write contract tests, and port implementations to meet the contract.

Frequently Asked Questions about contract-based-porting

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I port native Android and iOS features to Flutter without missing API endpoints?

To port native Android and iOS features to Flutter without missing API endpoints, extract the reference project's entire public API surface as a single source of truth, write contract tests enumerating all endpoints, and implement target Dart code satisfying those contracts.

What is contract-based porting for cross-language feature parity?

Contract-based porting for cross-language feature parity is a method that ports API contracts rather than individual lines of code, ensuring the target Dart implementation advertises and enforces all referenced behaviors from the original Kotlin, Swift, or Java reference.

How do I migrate Kotlin or Swift code to Dart while preserving behavior and interoperability?

To migrate Kotlin or Swift code to Dart while preserving behavior, first extract the command and endpoint registry from the reference, create contract tests validating the target implementation, and iterate incrementally porting handlers until cross-language parity is achieved.

What's the best way to guarantee cross-language feature completeness during framework migration?

The best way to guarantee cross-language feature completeness during framework migration is to drive the process with contract tests that validate the target implementation enforces all referenced public endpoints, preventing divergent behavior between the reference and target code.

Why does cross-language porting often result in missing features and divergent behavior?

Cross-language porting often results in missing features and divergent behavior because line-by-line translation fails to capture the full public API surface, making it necessary to extract the complete SSOT and validate it with contract-driven tests instead.

Can I use contract testing for incremental porting tasks across different programming languages?

Yes, you can use contract testing for incremental porting tasks across different programming languages by extracting the reference surface, porting contracts to Dart one by one, wiring up handlers, and iterating until the target implementation meets all advertised contracts.