dart-flutter-patterns
预览截图
安装方式
先用 Prompt 核对来源与依赖。
用 AI 助手安装
复制提示词,让助手先核对固定版本和依赖。
查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "dart-flutter-patterns":https://skillpi.com/zh/skills/deepskill-0fe90a22abc1c033f8d5e89e1d96637b72db6637534e52a85dd669f8c182064b。安装前核对上游来源和版本:https://github.com/affaan-m/ECC。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。
当前版本的下载许可尚未确认或受限。
来源与配置
github.com
配置方式待核实
请查看原始来源中的适用工具、依赖和权限要求。
安装实测待补充
面向生产环境的 Dart 与 Flutter 设计模式,涵盖空安全(null safety)、不可变状态(immutable state)、异步组合(async composition)、组件架构(widget architecture)、流行状态管理框架(BLoC、Riverpod、Provider)以及 GoRouter navig。
介绍来源: third_party · affaan-m · 0.0.1 参考来源
SkillPi 解读
- 能完成的任务
- 生产准备的达特和蝶形图案包括:无安全性、不可改变状态、合成组成、部件结构、流行状态管理框架(BLOC、Riverpod、提供商)、GoRouter导航、Dio网络、冻结代码生成和清洁建筑。 在写入或审查 Dart 和 Flutter 代码时使用——状态、部件、导航、联网或架构。
- 适合谁
- 当: 启动新的 Flust 特性, 需要用于状态管理、 导航或数据访问的平面模式 。 审查或写入 Dart 代码, 需要关于无效安全性、 密封类型或合成的指南 。 设置一个新的 Flust 工程, 在 BLOC 、 Riverpod 或 提供者 执行安全的 HTTP 客户端、 WebView 集成, 或 Flust 部件、 Cubits 或 Riverpod 供应商的本地存储写入测试 。
- 输入和输出
- 来源文档未说明。
- 软件、账号及付费要求
- 来源文档未说明。
- 限制与区别
- 来源文档未说明。
- 实测状态
- 未测试
文件浏览
本站暂无可核验的版本文件清单。
在原站浏览文件 ↗Frontmatter
name: dart-flutter-patterns
description: Production-ready Dart and Flutter patterns covering null safety, immutable state, async composition, widget architecture, popular state management frameworks (BLoC, Riverpod, Provider), GoRouter navigation, Dio networking, Freezed code generation, and clean architecture. Use when writing or reviewing Dart and Flutter code — state, widgets, navigation, networking, or architecture.
metadata:
origin: ECCDart/Flutter Patterns
When to Use
Use this skill when:
- Starting a new Flutter feature and need idiomatic patterns for state management, navigation, or data access
- Reviewing or writing Dart code and need guidance on null safety, sealed types, or async composition
- Setting up a new Flutter project and choosing between BLoC, Riverpod, or Provider
- Implementing secure HTTP clients, WebView integration, or local storage
- Writing tests for Flutter widgets, Cubits, or Riverpod providers
- Wiring up GoRouter with authentication guards
How It Works
This skill provides copy-paste-ready Dart/Flutter code patterns organized by concern:
- Null safety — avoid
!, prefer?./??/pattern matching - Immutable state — sealed classes,
freezed,copyWith - Async composition — concurrent
Future.wait, safeBuildContextafterawait - Widget architecture — extract to classes (not methods),
constpropagation, scoped rebuilds - State management — BLoC/Cubit events, Riverpod notifiers and derived providers
- Navigation — GoRouter with reactive auth guards via
refreshListenable - Networking — Dio with interceptors, token refresh with one-time retry guard
- Error handling — global capture,
ErrorWidget.builder, crashlytics wiring - Testing — unit (BLoC test), widget (ProviderScope overrides), fakes over mocks
Examples
// Sealed state — prevents impossible states
sealed class AsyncState<T> {}
final class Loading<T> extends AsyncState<T> {}
final class Success<T> extends AsyncState<T> { final T data; const Success(this.data); }
final class Failure<T> extends AsyncState<T> { final Object error; const Failure(this.error); }
// GoRouter with reactive auth redirect
final router = GoRouter(
refreshListenable: GoRouterRefreshStream(authCubit.stream),
redirect: (context, state) {
final authed = context.read<AuthCubit>().state is AuthAuthenticated;
if (!authed && !state.matchedLocation.startsWith('/login')) return '/login';
return null;
},
routes: [...],
);
// Riverpod derived provider with safe firstWhereOrNull
@riverpod
double cartTotal(Ref ref) {
final cart = ref.watch(cartNotifierProvider);
final products = ref.watch(productsProvider).valueOrNull ?? [];
return cart.fold(0.0, (total, item) {
final product = products.firstWhereOrNull((p) => p.id == item.productId);
return total + (product?.price ?? 0) * item.quantity;
});
}
Practical, production-ready patterns for Dart and Flutter applications. Library-agnostic where possible, with explicit coverage of the most common ecosystem packages.
1. Null Safety Fundamentals
Prefer Patterns Over Bang Operator
// BAD — crashes at runtime if null
final name = user!.name;
// GOOD — provide fallback
final name = user?.name ?? 'Unknown';
// GOOD — Dart 3 pattern matching (preferred for complex cases)
final display = switch (user) {
User(:final name, :final email) => '$name <$email>',
null => 'Guest',
};
// GOOD — guard early return
String getUserName(User? user) {
if (user == null) return 'Unknown';
return user.name; // promoted to non-null after check
}
Avoid late Overuse
// BAD — defers null error to runtime
late String userId;
// GOOD — nullable with explicit initialization
String? userId;
// OK — use late only when initialization is guaranteed before first access
// (e.g., in initState() before any widget interaction)
late final AnimationController _controller;
@override
void initState() {
super.initState();
_controller = AnimationController(vsync: this, duration: const Duration(milliseconds: 300));
}
2. Immutable State
Sealed Classes for State Hierarchies
sealed class UserState {}
final class UserInitial extends UserState {}
final class UserLoading extends UserState {}
final class UserLoaded extends UserState {
const UserLoaded(this.user);
final User user;
}
final class UserError extends UserState {
const UserError(this.message);
final String message;
}
// Exhaustive switch — compiler enforces all branches
Widget buildFrom(UserState state) => switch (state) {
UserInitial() => const SizedBox.shrink(),
UserLoading() => const CircularProgressIndicator(),
UserLoaded(:final user) => UserCard(user: user),
UserError(:final message) => ErrorText(message),
};
Freezed for Boilerplate-Free Immutability
import 'package:freezed_annotation/freezed_annotation.dart';
part 'user.freezed.dart';
part 'user.g.dart';
@freezed
class User with _$User {
const factory User({
required String id,
required String name,
required String email,
@Default(false) bool isAdmin,
}) = _User;
factory User.fromJson(Map<String, dynamic> json) => _$UserFromJson(json);
}
// Usage
final user = User(id: '1', name: 'Alice', email: 'alice@example.com');
final updated = user.copyWith(name: 'Alice Smith'); // immutable update
final json = user.toJson();
final fromJson = User.fromJson(json);
3. Async Composition
Structured Concurrency with Future.wait
Future<DashboardData> loadDashboard(UserRepository users, OrderRepository orders) async {
// Run concurrently — don't await sequentially
final (userList, orderList) = await (
users.getAll(),
orders.getRecent(),
).wait; // Dart 3 record destructuring + Future.wait extension
return DashboardData(users: userList, orders: orderList);
}
Stream Patterns
// Repository exposes reactive streams for live data
Stream<List<Item>> watchCartItems() => _db
.watchTable('cart_items')
.map((rows) => rows.map(Item.fromRow).toList());
// In widget layer — declarative, no manual subscription
StreamBuilder<List<Item>>(
stream: cartRepository.watchCartItems(),
builder: (context, snapshot) => switch (snapshot) {
AsyncSnapshot(connectionState: ConnectionState.waiting) =>
const CircularProgressIndicator(),
AsyncSnapshot(:final error?) => ErrorWidget(error.toString()),
AsyncSnapshot(:final data?) => CartList(items: data),
_ => const SizedBox.shrink(),
},
)
BuildContext After Await
// CRITICAL — always check mounted after any await in StatefulWidget
Future<void> _handleSubmit() async {
setState(() => _isLoading = true);
try {
await authService.login(_email, _password);
if (!mounted) return; // ← guard before using context
context.go('/home');
} on AuthException catch (e) {
if (!mounted) return;
ScaffoldMessenger.of(context).showSnackBar(SnackBar(content: Text(e.message)));
} finally {
if (mounted) setState(() => _isLoading = false);
}
}
4. Widget Architecture
Extract to Classes, Not Methods
// BAD — private method returning widget, prevents optimization
Widget _buildHeader() {
return Container(
padding: const EdgeInsets.all(16),
child: Text(title, style: Theme.of(context).textTheme.headlineMedium),
);
}
// GOOD — separate widget class, enables const, element reuse
class _PageHeader extends StatelessWidget {
const _PageHeader(this.title);
final String title;
@override
Widget build(BuildContext context) {
return Container(
padding: const EdgeInsets.all(16),
child: Text(title, style: Theme.of(context).textTheme.headlineMedium),
);
}
}
const Propagation
// BAD — new instances every rebuild
child: Padding(
padding: EdgeInsets.all(16.0), // not const
child: Icon(Icons.home, size: 24.0), // not const
)
// GOOD — const stops rebuild propagation
child: const Padding(
padding: EdgeInsets.all(16.0),
child: Icon(Icons.home, size: 24.0),
)
Scoped Rebuilds
// BAD — entire page rebuilds on every counter change
class CounterPage extends ConsumerWidget {
@override
Widget build(BuildContext context, WidgetRef ref) {
final count = ref.watch(counterProvider); // rebuilds everything
return Scaffold(
body: Column(children: [
const ExpensiveHeader(), // unnecessarily rebuilt
Text('$count'),
const ExpensiveFooter(), // unnecessarily rebuilt
]),
);
}
}
// GOOD — isolate the rebuilding part
class CounterPage extends StatelessWidget {
const CounterPage({super.key});
@override
Widget build(BuildContext context) {
return const Scaffold(
body: Column(children: [
ExpensiveHeader(), // never rebuilt (const)
_CounterDisplay(), // only this rebuilds
ExpensiveFooter(), // never rebuilt (const)
]),
);
}
}
class _CounterDisplay extends ConsumerWidget {
const _CounterDisplay();
@override
Widget build(BuildContext context, WidgetRef ref) {
final count = ref.watch(counterProvider);
return Text('$count');
}
}
5. State Management: BLoC/Cubit
// Cubit — synchronous or simple async state
class AuthCubit extends Cubit<AuthState> {
AuthCubit(this._authService) : super(const AuthState.initial());
final AuthService _authService;
Future<void> login(String email, String password) async {
emit(const AuthState.loading());
try {
final user = await _authService.login(email, password);
emit(AuthState.authenticated(user));
} on AuthException catch (e) {
emit(AuthState.error(e.message));
}
}
void logout() {
_authService.logout();
emit(const AuthState.initial());
}
}
// In widget
BlocBuilder<AuthCubit, AuthState>(
builder: (context, state) => switch (state) {
AuthInitial() => const LoginForm(),
AuthLoading() => const CircularProgressIndicator(),
AuthAuthenticated(:final user) => HomePage(user: user),
AuthError(:final message) => ErrorView(message: message),
},
)
6. State Management: Riverpod
// Auto-dispose async provider
@riverpod
Future<List<Product>> products(Ref ref) async {
final repo = ref.watch(productRepositoryProvider);
return repo.getAll();
}
// Notifier with complex mutations
@riverpod
class CartNotifier extends _$CartNotifier {
@override
List<CartItem> build() => [];
void add(Product product) {
final existing = state.where((i) => i.productId == product.id).firstOrNull;
if (existing != null) {
state = [
for (final item in state)
if (item.productId == product.id) item.copyWith(quantity: item.quantity + 1)
else item,
];
} else {
state = [...state, CartItem(productId: product.id, quantity: 1)];
}
}
void remove(String productId) =>
state = state.where((i) => i.productId != productId).toList();
void clear() => state = [];
}
// Derived provider (selector pattern)
@riverpod
int cartCount(Ref ref) => ref.watch(cartNotifierProvider).length;
@riverpod
double cartTotal(Ref ref) {
final cart = ref.watch(cartNotifierProvider);
final products = ref.watch(productsProvider).valueOrNull ?? [];
return cart.fold(0.0, (total, item) {
// firstWhereOrNull (from collection package) avoids StateError when product is missing
final product = products.firstWhereOrNull((p) => p.id == item.productId);
return total + (product?.price ?? 0) * item.quantity;
});
}
7. Navigation with GoRouter
final router = GoRouter(
initialLocation: '/',
// refreshListenable re-evaluates redirect whenever auth state changes
refreshListenable: GoRouterRefreshStream(authCubit.stream),
redirect: (context, state) {
final isLoggedIn = context.read<AuthCubit>().state is AuthAuthenticated;
final isGoingToLogin = state.matchedLocation == '/login';
if (!isLoggedIn && !isGoingToLogin) return '/login';
if (isLoggedIn && isGoingToLogin) return '/';
return null;
},
routes: [
GoRoute(path: '/login', builder: (_, __) => const LoginPage()),
ShellRoute(
builder: (context, state, child) => AppShell(child: child),
routes: [
GoRoute(path: '/', builder: (_, __) => const HomePage()),
GoRoute(
path: '/products/:id',
builder: (context, state) =>
ProductDetailPage(id: state.pathParameters['id']!),
),
],
),
],
);
8. HTTP with Dio
final dio = Dio(BaseOptions(
baseUrl: const String.fromEnvironment('API_URL'),
connectTimeout: const Duration(seconds: 10),
receiveTimeout: const Duration(seconds: 30),
headers: {'Content-Type': 'application/json'},
));
// Add auth interceptor
dio.interceptors.add(InterceptorsWrapper(
onRequest: (options, handler) async {
final token = await secureStorage.read(key: 'auth_token');
if (token != null) options.headers['Authorization'] = 'Bearer $token';
handler.next(options);
},
onError: (error, handler) async {
// Guard against infinite retry loops: only attempt refresh once per request
final isRetry = error.requestOptions.extra['_isRetry'] == true;
if (!isRetry && error.response?.statusCode == 401) {
final refreshed = await attemptTokenRefresh();
if (refreshed) {
error.requestOptions.extra['_isRetry'] = true;
return handler.resolve(await dio.fetch(error.requestOptions));
}
}
handler.next(error);
},
));
// Repository using Dio
class UserApiDataSource {
const UserApiDataSource(this._dio);
final Dio _dio;
Future<User> getById(String id) async {
final response = await _dio.get<Map<String, dynamic>>('/users/$id');
return User.fromJson(response.data!);
}
}
9. Error Handling Architecture
// Global error capture — set up in main()
void main() {
FlutterError.onError = (details) {
FlutterError.presentError(details);
crashlytics.recordFlutterFatalError(details);
};
PlatformDispatcher.instance.onError = (error, stack) {
crashlytics.recordError(error, stack, fatal: true);
return true;
};
runApp(const App());
}
// Custom ErrorWidget for production
class App extends StatelessWidget {
@override
Widget build(BuildContext context) {
ErrorWidget.builder = (details) => ProductionErrorWidget(details);
return MaterialApp.router(routerConfig: router);
}
}
10. Testing Quick Reference
// Unit test — use case
test('GetUserUseCase returns null for missing user', () async {
final repo = FakeUserRepository();
final useCase = GetUserUseCase(repo);
expect(await useCase('missing-id'), isNull);
});
// BLoC test
blocTest<AuthCubit, AuthState>(
'emits loading then error on failed login',
build: () => AuthCubit(FakeAuthService(throwsOn: 'login')),
act: (cubit) => cubit.login('user@test.com', 'wrong'),
expect: () => [const AuthState.loading(), isA<AuthError>()],
);
// Widget test
testWidgets('CartBadge shows item count', (tester) async {
await tester.pumpWidget(
ProviderScope(
overrides: [cartNotifierProvider.overrideWith(() => FakeCartNotifier(count: 3))],
child: const MaterialApp(home: CartBadge()),
),
);
expect(find.text('3'), findsOneWidget);
});
References
- Effective Dart: Design
- Flutter Performance Best Practices
- Riverpod Documentation
- BLoC Library
- GoRouter
- Freezed
- Skill:
flutter-dart-code-review— comprehensive review checklist - Rules:
rules/dart/— coding style, patterns, security, testing, hooks
版本历史
-
v2.2.3
GitHub ↗
原版更新说明
# ECC 2.2.3 ECC 2.2.3 is a naming and release-reliability update. The project is called ECC everywhere it ships, starting with the `pi/core` profile, and the release workflow now waits long enough for npm to serve a freshly published version. ## Naming - `pi/core` no longer expands the project name: its README and the bundled `blueprint` skill refer to ECC only. The profile contents are otherwise unchanged: 123 curated skills and 24 prompt commands, 35,006 characters of skill description text. - Downstream packagers need no changes. The package is still `ecc-pi-core`, the directory is still `pi/core/`, and existing install paths keep working. ## Release workflow - After `npm publish`, the release workflow polls the registry for up to five minutes before verifying the published artifact. In 2.2.2 it gave up after about 30 seconds while npm was still processing the upload, so the run failed before promoting `latest` and creating the GitHub Release, and had to be re-run. Downstream consumption is unchanged: poll `/releases`, download `archive/refs/tags/vX.Y.Z.tar.gz`, pin its sha256, copy `pi/core/`, and load it offline.
-
v2.2.2
GitHub ↗
原版更新说明
# ECC 2.2.2 ECC 2.2.2 adds `pi/core`, a curated Pi-native skills+prompts-only profile built for downstream packagers that mirror GitHub Releases, plus a set of packaging, memory, hooks, and Windows compatibility fixes. ## Pi core profile `pi/core/` is a self-contained package (`ecc-pi-core`) that downstream mirrors of the release tarball can copy directly: no build step, no extensions, no hooks, no runtime downloads, and no network or SaaS dependencies. - 123 curated skills (language and framework patterns, testing/TDD, code review, non-offensive security review, planning, refactoring, docs, and git/PR workflows) and 24 prompt commands that are pure prompt workflows. - Generated deterministically from the explicit include/exclude lists in `manifests/pi-core.json` by `scripts/build-pi-core.js` and committed, so the release tarball contains it verbatim. `pi/core/CURATION.md` lists every excluded skill and command with its reason; the `council` skill ships as `ecc-council` inside pi/core to avoid catalog name clashes. - The build fails on safety violations: non-allowlisted URL hosts, pipe-to-shell or fetch-and-run download forms, secrets or tokens, absolute per-user home paths, symlinks, invalid SKILL.md frontmatter, and duplicate skill names. - CI rebuilds pi/core on every PR and verifies it is up to date, then installs the Pi coding agent CLI and proves the profile loads fully offline (`PI_OFFLINE=1`), asserting that every curated command actually registers. - The release workflow additionally verifies that `VERSION` matches the tag and that pi/core is current before publishing. Downstream consumption: poll `/releases`, download `archive/refs/tags/vX.Y.Z.tar.gz`, pin its sha256, copy `pi/core/`, and load it offline with `pi --offline --skill pi/core/skills --prompt-template pi/core/commands`. ## Packaging - The compiled OpenCode payload is explicitly included in the npm package, and packing is verified from a clean state with lifecycle scripts enabled. ## Memory and MCP - Incomplete memory reads are distinguished from missing records, and directory traversal failures are classified. - The reserved `_meta` parameter is accepted on memory MCP ping requests. ## Hooks and Windows compatibility - `hooks.json` stays within Claude Code's schema; stable hook metadata moved into a validated sidecar. - The no-verify guard handles stuck optional values and long-option prefixes. - Windows linter paths and ESLint 9 are supported, and settings updates tolerate missing Windows device IDs while retaining full-precision inode checks. ## Workflow guidance, catalog, and dependency security - Epic sync filters issues by label; dependency bumps no longer document auto-merge; naming and Boolean guidance is language-neutral; the `prp-pr` command alias is distinguished; Rails skill discovery, invoice tax calculation order, and framework documentation were corrected; Serply and Squish catalog entries were removed. - `lru` updated to 0.18.2 (RUSTSEC-2026-0253) and `js-yaml` to 4.3.2 (GHSA-2883-xcg3-v3hh).
-
v2.2.1
GitHub ↗
原版更新说明
# ECC 2.2.1 ECC 2.2.1 is a bug and security patch for ECC 2.2. It keeps the published `v2.2.0` history immutable. These notes describe the prepared patch; publication and signing evidence are tracked separately in the release checklist. ## Security and data protection - GateGuard and governance capture recognize destructive PowerShell commands, including the native PowerShell tool path. Dynamic command handling prevents later variable assignments from concealing earlier unresolved invocations ([#2961](https://github.com/affaan-m/ECC/pull/2961)). - Relative GateGuard exemption globs stay within the project root. Explicit absolute exemptions remain supported ([#2921](https://github.com/affaan-m/ECC/issues/2921)). - Installer writes reject collisions with untracked user-owned files. Failed installs refresh ownership hashes only for files they actually wrote, preserving the previous ownership hashes of untouched managed files ([#2964](https://github.com/affaan-m/ECC/issues/2964)). - Guided setup revalidates its preview before ownership filtering, so files appearing between preview and apply cause a clear retry instead of a false success. Existing identical user files stay outside ECC ownership. - Uninstall respects `ECC_DRY_RUN=1`, including legacy Codex paths, and rejects invalid dry-run values instead of silently allowing deletion ([#2952](https://github.com/affaan-m/ECC/issues/2952)). - Observer analysis retains observations on unsuccessful or unconfirmed processing. Exit code zero alone no longer permits archival ([#2971](https://github.com/affaan-m/ECC/pull/2971)). - The Yarn lockfile updates `toml` to 4.3.0, matching the npm lockfile and removing the affected older resolution. ## Hooks and installation - Manual Claude installs register ECC-owned hook entries in Claude settings. Repair, consent changes, and uninstall reconcile those entries while preserving unrelated settings. Atomic settings updates check directory identity and retry detected concurrent edits ([#2992](https://github.com/affaan-m/ECC/pull/2992)). - Direct hook entrypoints handle larger JSON payloads with bounded, UTF-8-safe reads instead of silently truncating valid inputs. Existing production wrapper limits remain unchanged ([#2924](https://github.com/affaan-m/ECC/issues/2924)). - The Pi adapter selects an actual Node runtime instead of recursively executing a compiled OMP host as Node ([#2909](https://github.com/affaan-m/ECC/issues/2909)). - Installer listing and control-pane help avoid eager third-party dependency loading. Features that require absent runtime packages report the missing dependency explicitly ([#2994](https://github.com/affaan-m/ECC/pull/2994)). - Autonomous harness setup documentation replaces nonexistent package names and unsupported CLI flags with documented interfaces, and distinguishes session scheduling from a durable external scheduler ([#2957](https://github.com/affaan-m/ECC/issues/2957)). ## Installer and release-surface hardening - Public and packaged install docs now consistently point at the published `ecc-universal` commands instead of stale or unrelated package names. - The AdaL adapter docs use the correct `npx ecc-universal doctor --target adal` command. - Claude setup preflights `git` before provider-specific work starts, so missing prerequisites fail fast with the right action. - Guided setup dry runs use isolated HOME, config, XDG, temp, and Windows app data roots to avoid ambient host state affecting review or tests. - The exact packed artifact now has stronger lifecycle coverage for Claude and Kimi setup, update, doctor, repeat install, uninstall, and dry-run flows. - Identifier regression coverage blocks stale `ecc`, `ecc-install`, and other mismatched release-path commands from creeping back into user-facing docs. ## Current-main documentation included in this patch - The canonical Itô workflow now documents `ecc ito accept <ticket-id>` and the `ito_accept` MCP tool. - Acceptance is explicitly bounded to buyer-authority routing. It routes the active desk quote to human review and does not claim to place a trade. ## Provenance boundary - `v2.2.1` is intended to be a signed annotated tag on exact green `main`. - `v2.2.0` remains the immutable historical unsigned exception. Do not move, recreate, or reuse that tag. ## Scope and limitations - Plugin dependency handling does not bundle or automatically install missing modules. Database and schema-validation features require their declared runtime dependencies. - Ownership protection covers untracked collisions and failed-install checkpoints. Successful upgrades retain the existing contract for replacing previously managed files. Back up intentional edits before upgrading. - This patch does not introduce new harness platforms or claim that every open community issue is resolved. ## Upgrade After the release workflow publishes 2.2.1 and verifies registry integrity, install or update the package, then run the same ECC command path you already use. Until publication completes, the exact-version command below returns E404. ```bash npm install -g [email protected] ecc doctor ``` For first-time or guided terminal setup: ```bash npx ecc-universal setup ``` The native Claude marketplace path remains supported: ```text /plugin marketplace add https://github.com/affaan-m/ECC /plugin install ecc@ecc ```
-
v2.2.0
GitHub ↗
原版更新说明
ECC 2.2 is here, led by one guided installer for Claude Code, Codex, and Kimi. It also adds native Antigravity 2.0 support and an experimental, opt-in Nasiko CLI lifecycle bridge. The release pipeline is stricter too: the exact npm archive must pass lifecycle tests on Linux, macOS, and Windows before `latest` moves. ## One guided path into ECC  Start the guided installer with: ```bash npx --yes [email protected] install --guided ``` The installer checks every selected harness before writing files, then applies the setup as one operation. Provider-owned model and authentication settings stay under the provider's control. The terminal welcome appears only after a successful interactive install. ## Nasiko: experimental, opt-in, and explicit  ECC 2.2 can inspect, install, and remove one pinned Nasiko `v0.1.0` CLI build: ```bash npm install -g [email protected] ecc nasiko status --json ecc nasiko install --version v0.1.0 --dry-run --json ecc nasiko install --version v0.1.0 --yes --json ``` Downloads are content-addressed and SHA-256 verified, status is read-only, and uninstall protects modified or unqualified binaries. The dashboard above is Nasiko's own product. ECC does not connect agents, start a server, enable telemetry, share data, or operate that control plane. The bridge remains experimental and opt-in. Learn more in the [Nasiko repository](https://github.com/Nasiko-Labs/nasiko). ## More reliable across every harness - **Native Antigravity 2.0:** ECC installs to `.agents/{rules,workflows,skills,agents}` and safely migrates legacy ownership. - **Reliable uninstall:** repeated selective installs keep a complete ownership ledger, so unchanged ECC-managed files can be removed cleanly. - **Safer migrations:** OpenCode uses `~/.config/opencode`, while OpenCode and Codex preserve edited or untracked files during cleanup. - **More workflows:** Pi, Itô, agent evaluation, multi-model council, dev-team, living docs, secure terminal, TasteForge, and `skill-comply` all expand the shipped distribution. ECC 2.2 ships **68 agents, 286 skills, and 94 command shims**, plus the rules, hooks, memory, continuous-learning, and installation surfaces around them. ## Release assurance The tagged commit must match `origin/main`. One npm archive is packed, hashed, and tested on all three operating systems, then published under a staging tag. Registry integrity must match before `latest` moves. The prior 2.1.0 package remains the immediate rollback target. ## Install or upgrade For the native Claude Code plugin: ```text /plugin marketplace add https://github.com/affaan-m/ECC /plugin install ecc@ecc ``` Existing Claude installs can run `/plugin update ecc`. ## Thank you A special thank you to returning contributors [@gaurav0107](https://github.com/gaurav0107), [@Seekers2001](https://github.com/Seekers2001), and [@t0kubetsu](https://github.com/t0kubetsu) for substantial work on learning workflows, collaborative skills, and shared testing. Among our first-time contributors, [@renan-tiberio](https://github.com/affaan-m/ECC/pull/2759) brought Pi support, [@romanclaudersoai1](https://github.com/affaan-m/ECC/pull/2664) repaired `/evolve`, and [@djpjronline-netizen](https://github.com/affaan-m/ECC/pull/2405) hardened hook parsing. Eighteen people made their first ECC contribution in 2.2. Thank you to everyone who tested the installer, reported issues, and helped harden the release across harnesses and operating systems. ### New contributors - @AlbertChiu777 in [#2483](https://github.com/affaan-m/ECC/pull/2483) - @djpjronline-netizen in [#2405](https://github.com/affaan-m/ECC/pull/2405) - @shanujans in [#2538](https://github.com/affaan-m/ECC/pull/2538) - @HouMinXi in [#2609](https://github.com/affaan-m/ECC/pull/2609) - @agent-jeong in [#2670](https://github.com/affaan-m/ECC/pull/2670) - @karimfarahat in [#2462](https://github.com/affaan-m/ECC/pull/2462) - @romanclaudersoai1 in [#2664](https://github.com/affaan-m/ECC/pull/2664) - @Peopleoftech in [#2668](https://github.com/affaan-m/ECC/pull/2668) - @alejandorosumah-mansa in [#2700](https://github.com/affaan-m/ECC/pull/2700) - @imkp1 in [#2637](https://github.com/affaan-m/ECC/pull/2637) - @shivaG5 in [#2446](https://github.com/affaan-m/ECC/pull/2446) - @vitalii-novikov in [#2520](https://github.com/affaan-m/ECC/pull/2520) - @etisamhaq in [#2364](https://github.com/affaan-m/ECC/pull/2364) - @phumchai1515-prog in [#2723](https://github.com/affaan-m/ECC/pull/2723) - @cagrisolakoglu in [#2618](https://github.com/affaan-m/ECC/pull/2618) - @brianjkelly in [#2703](https://github.com/affaan-m/ECC/pull/2703) - @renan-tiberio in [#2759](https://github.com/affaan-m/ECC/pull/2759) - @ronimuliawan in [#2793](https://github.com/affaan-m/ECC/pull/2793) Join us in the [ECC Discord](https://discord.gg/36yGMHGFbR). Full changelog: <https://github.com/affaan-m/ECC/compare/v2.1.0...v2.2.0>
-
v2.1.0
GitHub ↗
原版更新说明
# ECC 2.1.0: Plan Canvas, Kimi Harness, and Self-Hosted Compute ECC 2.1 turns plan review into a visual loop and opens the harness to self-hosted models. Plan Canvas lets you review agent plans in the browser. Point at the part you mean instead of retyping it in chat. A new Kimi Code install target and a verified Itô GPU path make ECC + open-source models a first-class setup, backed by our public sponsors: Moonshot AI (Kimi), Itô, and Atlas Cloud. ## Plan Canvas: review plans by pointing, not retyping  [Download the MP4 demo](https://raw.githubusercontent.com/affaan-m/ECC/main/docs/releases/2.1.0/assets/ecc-plan-canvas-demo.mp4) `/plan` ends with a confirm gate, and until now that review was a wall of markdown in the terminal. Now the agent opens the plan in a loopback-only browser canvas: - Click elements or select text to attach numbered annotations - Chat with the agent from a side rail while it works in the terminal - **Approve plan** / **Request changes** buttons map directly onto `/plan`'s CONFIRM gate - Mermaid diagrams, tables, and task lists render natively; file edits live-reload the page - Model- and harness-agnostic: a plain CLI + JSON protocol (`ecc-plan-canvas`), no Claude-only dependency ## Kimi harness: Moonshot AI partnership ECC now installs directly into [Kimi Code](https://moonshotai.github.io/kimi-cli/) (`--target kimi`). Kimi Code discovers the installed `.kimi/AGENTS.md` instructions and `.kimi/skills/` workflows natively: ```bash bash ./install.sh --target kimi --profile minimal npx ecc doctor --target kimi kimi ``` ## Self-host on Itô GPUs Run ECC against any self-hosted open-source model. If you need GPU capacity, [Itô](https://compute.itomarkets.com) is ECC's preferred compute sponsor. The integration shipped guarded end to end: - `ecc ito find`: opt-in bridge to the canonical Itô CLI that submits a live, authenticated RFQ (it does not reserve capacity) - Guarded live node qualification and read-only compute handoff - Credential-bearing CLI shims are rejected outright The sponsorship link itself is passive: it does not invoke an RFQ, reserve capacity, provision compute, or configure serving. Managed inference through Itô is not live yet. Any GPU provider works, and ECC stays provider-agnostic. ## Partners [Moonshot AI (Kimi)](https://www.moonshot.ai), [Itô](https://compute.itomarkets.com), and [Atlas Cloud](https://www.atlascloud.ai) are now public sponsors of ECC. The README documents a recommended self-host path: Itô for GPU capacity, a Kimi checkpoint served behind a compatible endpoint, then Kimi Code + ECC on top. Each choice remains separate and swappable. ## Also in 2.1 - **Hermes and OpenClaw install targets**: two more harnesses join Claude Code, Codex, OpenCode, Cursor, Gemini, Zed, Copilot, and Kimi - **Codex ECC navigation guide**: find the right skill/command surface from inside Codex - **GateGuard path exemptions** (`GATEGUARD_EXEMPT_GLOBS`) and configurable instinct injection (count + confidence threshold) - **PostToolUse hooks consolidated** into sync/async dispatchers, with fewer processes per tool call - **Supply-chain hardening**: the installer runtime passes strict vetting, and the pre-commit secret scan now catches Anthropic API keys (`sk-ant-...`) - A long tail of community fixes across OpenCode, Windows, bun lockfiles, the dashboard, and project detection The catalog now stands at **67 agents, 281 skills, and 94 command shims** (2.0.0 shipped 64/261/84), plus hooks, rules, memory, continuous learning, and AgentShield. ## Install or upgrade ```text /plugin marketplace add https://github.com/affaan-m/ECC /plugin install ecc@ecc ``` Existing installs: `/plugin update ecc` ## Community Join the ECC community for release announcements, questions, and Show and Tell: <https://discord.gg/36yGMHGFbR> Full changelog: <https://github.com/affaan-m/ECC/compare/v2.0.0...v2.1.0> ## New Contributors * @legeZZZ made their first contribution in https://github.com/affaan-m/ECC/pull/2200 * @tongshu2023 made their first contribution in https://github.com/affaan-m/ECC/pull/2216 * @mohameddsh3ban made their first contribution in https://github.com/affaan-m/ECC/pull/2195 * @fiedler-itlabs made their first contribution in https://github.com/affaan-m/ECC/pull/2240 * @daiki75 made their first contribution in https://github.com/affaan-m/ECC/pull/2245 * @wellkilo made their first contribution in https://github.com/affaan-m/ECC/pull/2194 * @rameshvr made their first contribution in https://github.com/affaan-m/ECC/pull/2144 * @aaronjmars made their first contribution in https://github.com/affaan-m/ECC/pull/2185 * @orbisai0security made their first contribution in https://github.com/affaan-m/ECC/pull/2149 * @xwang4-svg made their first contribution in https://github.com/affaan-m/ECC/pull/2186 * @kriptoburak made their first contribution in https://github.com/affaan-m/ECC/pull/2199 * @lamenting-hawthorn made their first contribution in https://github.com/affaan-m/ECC/pull/2235 * @mdayan8 made their first contribution in https://github.com/affaan-m/ECC/pull/2100 * @Naominour made their first contribution in https://github.com/affaan-m/ECC/pull/2188 * @Malphite10 made their first contribution in https://github.com/affaan-m/ECC/pull/2197 * @cogiwimute367-create made their first contribution in https://github.com/affaan-m/ECC/pull/2251 * @z3tz3r0 made their first contribution in https://github.com/affaan-m/ECC/pull/2250 * @rockwellwindsor made their first contribution in https://github.com/affaan-m/ECC/pull/2258 * @stroland02 made their first contribution in https://github.com/affaan-m/ECC/pull/2202 * @hretheum made their first contribution in https://github.com/affaan-m/ECC/pull/2221 * @BERORINPO made their first contribution in https://github.com/affaan-m/ECC/pull/2234 * @Victor-Casado made their first contribution in https://github.com/affaan-m/ECC/pull/2236 * @itkdm made their first contribution in https://github.com/affaan-m/ECC/pull/2241 * @leoeletronics made their first contribution in https://github.com/affaan-m/ECC/pull/2267 * @Seekers2001 made their first contribution in https://github.com/affaan-m/ECC/pull/2118 * @lucaszhu-hue made their first contribution in https://github.com/affaan-m/ECC/pull/2279 * @kapil971390 made their first contribution in https://github.com/affaan-m/ECC/pull/2292 * @danielnguyenfinhub made their first contribution in https://github.com/affaan-m/ECC/pull/2342 * @gpitrella made their first contribution in https://github.com/affaan-m/ECC/pull/2355 * @Angad2005 made their first contribution in https://github.com/affaan-m/ECC/pull/2366 * @quadcent made their first contribution in https://github.com/affaan-m/ECC/pull/2133 * @SiaoZeng made their first contribution in https://github.com/affaan-m/ECC/pull/2383 * @Tahiti18 made their first contribution in https://github.com/affaan-m/ECC/pull/2307 * @phobicdotno made their first contribution in https://github.com/affaan-m/ECC/pull/2343 * @sshworld made their first contribution in https://github.com/affaan-m/ECC/pull/2358 * @cd1amond made their first contribution in https://github.com/affaan-m/ECC/pull/2346 * @Tanaka-VivereGratis made their first contribution in https://github.com/affaan-m/ECC/pull/2388 * @KyawZinLatt made their first contribution in https://github.com/affaan-m/ECC/pull/2319 * @dieudonneAwa made their first contribution in https://github.com/affaan-m/ECC/pull/2288 * @carloscarvallo made their first contribution in https://github.com/affaan-m/ECC/pull/2273 * @mc856 made their first contribution in https://github.com/affaan-m/ECC/pull/2274 * @jvirgovic made their first contribution in https://github.com/affaan-m/ECC/pull/2338 * @m18897829375 made their first contribution in https://github.com/affaan-m/ECC/pull/2336 * @jack-finance-able made their first contribution in https://github.com/affaan-m/ECC/pull/2390 * @yerros made their first contribution in https://github.com/affaan-m/ECC/pull/2275 * @YuhaoLin2005 made their first contribution in https://github.com/affaan-m/ECC/pull/2377 * @Cb2i made their first contribution in https://github.com/affaan-m/ECC/pull/2437 * @28winz-bot made their first contribution in https://github.com/affaan-m/ECC/pull/2422 * @sutazca made their first contribution in https://github.com/affaan-m/ECC/pull/2425 * @nidelson made their first contribution in https://github.com/affaan-m/ECC/pull/2420 * @juujb made their first contribution in https://github.com/affaan-m/ECC/pull/2416 * @Zalasyu made their first contribution in https://github.com/affaan-m/ECC/pull/2432 * @Lxcardoza993 made their first contribution in https://github.com/affaan-m/ECC/pull/2433 * @haelyra made their first contribution in https://github.com/affaan-m/ECC/pull/2467 * @thejesh23 made their first contribution in https://github.com/affaan-m/ECC/pull/2515 * @nankingjing made their first contribution in https://github.com/affaan-m/ECC/pull/2501 * @samartomar made their first contribution in https://github.com/affaan-m/ECC/pull/2503 * @fletcherm-hub made their first contribution in https://github.com/affaan-m/ECC/pull/2460 * @someiyoshino-lab made their first contribution in https://github.com/affaan-m/ECC/pull/2471 * @WinterSold1er made their first contribution in https://github.com/affaan-m/ECC/pull/2511 * @EmadDoughan made their first contribution in https://github.com/affaan-m/ECC/pull/2543 * @Oleksandr-Kh4 made their first contribution in https://github.com/affaan-m/ECC/pull/2529 * @latreon made their first contribution in https://github.com/affaan-m/ECC/pull/2536 **Full Changelog**: https://github.com/affaan-m/ECC/compare/v2.0.0...v2.1.0
此处仅展示最近 5 个版本。 在原站查看完整版本历史 ↗
当前收录版本
0.0.1
安全与评测信息
质量评测
满分100 · 来自 SkillPi LAB 实验室的评测报告。
亮点
- Comprehensive coverage of production-ready Flutter/Dart patterns
- Addresses real developer pain points across state management, navigation, networking, and architecture
- Provides practical, copy-paste-ready code examples for common scenarios
待提升项
-
触发描述可更简洁 原报告严重程度:轻微
When to Use section is comprehensive but could be more concise for better readability
改进建议:Consider condensing the trigger scenarios into bullet points for faster scanning
亮点
- Clear trigger scenarios covering new features, code review, project setup, and testing
- Well-defined boundaries for when to use the skill
待提升项
-
文档长度略长 原报告严重程度:轻微
Content is comprehensive but quite lengthy, which may impact quick reference usage
改进建议:Consider adding a quick reference section or table of contents for faster navigation
亮点
- Well-organized by concern with clear section headers
- Practical code examples throughout
- Good use of frontmatter with metadata
待提升项
-
部分模式依赖特定包版本 原报告严重程度:轻微
Some advanced patterns (like specific Riverpod or GoRouter features) may require minimum package versions
改进建议:Consider adding version requirements or compatibility notes for advanced patterns
亮点
- Robust error handling patterns with mounted checks and retry guards
- Production-ready code with proper exception handling
- Good coverage of edge cases and failure scenarios
取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。
正文静态检测
100 / 100 · skillpi-20261123-no-r3-v1
正文未命中当前规则。
分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。
权限与使用前检查
根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。
未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。
文档引用的域名或地址
这些地址可能用于文档链接或示例,不是已批准的联网清单。使用前核对实际目的地及发送的数据。
- bloclibrary.dev
- dart.dev
- docs.flutter.dev
- pub.dev
- riverpod.dev
安全评级与访问范围
risk · 静态证据核验,不代表运行安全保证。
来源文档未说明。
使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。
用户讨论
还没有已核实的点评。