agent-instructions
Use when writing project instructions for a coding agent (CLAUDE.md, AGENTS.md, or equivalent). Covers what belongs in them, what does not, structure, and…
Use when building Flutter applications. Covers widget composition, state management, build-method performance, platform channels, and the rendering behavior behind most Flutter jank.
$ npx -y skills add nimadorostkar/Claude-Skills-collection --skill flutter --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/flutterContext preview
The summary Claude sees to decide when to auto-load this skill.
Use when building Flutter applications. Covers widget composition, state management, build-method performance, platform channels, and the rendering behavior behind most Flutter jank.
name: flutter description: Use when building Flutter applications. Covers widget composition, state management, build-method performance, platform channels, and the rendering behavior behind most Flutter jank. metadata: category: mobile version: 1.0.0 tags: [flutter, dart, widgets, state-management, performance]
Build Flutter applications whose widget tree rebuilds only where it must. Flutter's performance model is simple and unforgiving: a `setState` at the top of the tree rebuilds everything below it.
1. **Compose small widgets** — A 300-line `build` method rebuilds as one unit. Extracting subtrees into widgets is the primary performance tool in Flutter, not a style preference. 2. **Mark everything possible `const`** — A `const` widget is never rebuilt. This is the cheapest optimization available and most codebases leave it on the table. 3. **Scope the rebuild** — `Consumer`, `Selector`, or a Riverpod provider that watches one field. `setState` in a parent rebuilds every child that is not `const`. 4. **Handle all three async states** — Loading, error, and data. `FutureBuilder` without an error branch shows a spinner forever when the request fails. 5. **Profile in profile mode** — Debug mode is meaningfully slower and will mislead you in both directions. Use the DevTools timeline on a real device.
**Scoped rebuild versus a rebuild of everything:**
// Costly: setState here rebuilds the whole screen, including the static header
// and the entire list, on every counter tick.
class _DashboardState extends State<Dashboard> {
int _count = 0;
@override
Widget build(BuildContext context) => Column(
children: [
const DashboardHeader(), // const: spared, correctly
OrderList(orders: widget.orders), // not const: rebuilt every tick
Text('$_count'),
ElevatedButton(onPressed: () => setState(() => _count++), child: const Text('+')),
],
);
}
// Better: only the Text listening to the counter rebuilds.
class Dashboard extends ConsumerWidget {
const Dashboard({super.key});
@override
Widget build(BuildContext context, WidgetRef ref) => Column(
children: [
const DashboardHeader(),
const OrderList(),
Consumer(builder: (_, ref, __) => Text('${ref.watch(counterProvider)}')),
ElevatedButton(
onPressed: () => ref.read(counterProvider.notifier).increment(),
child: const Text('+'),
),
],
);
}**Async with every state handled:**
switch (ref.watch(ordersProvider)) {
AsyncData(:final value) when value.isEmpty => const EmptyState(),
AsyncData(:final value) => OrderList(orders: value),
AsyncError(:final error) => ErrorState(error: error, onRetry: _retry),
_ => const LoadingSkeleton(),
}A curated library of 137 production-grade skills for Claude and other AI coding agents. Every skill follows one structure, speaks with one voice, and earns its place by changing what the agent does.
Repo: nimadorostkar/Claude-Skills-collection
Use when writing project instructions for a coding agent (CLAUDE.md, AGENTS.md, or equivalent). Covers what belongs in them, what does not, structure, and…
Use when an agent needs state that survives a session or a context compaction. Covers what to persist, file-based memory, structuring notes for retrieval, and…
Use when automating agent behavior with lifecycle hooks. Covers hook events, deterministic enforcement of rules the model should not be trusted to remember,…
Use when packaging skills, commands, hooks, and MCP servers into a distributable plugin. Covers manifest structure, bundling, versioning, testing, and…
Use when writing a new skill for an AI agent. Covers scoping, description writing for reliable triggering, progressive disclosure, and the difference between a…
Use when reviewing or improving an existing agent skill. Covers triggering accuracy, content quality, redundancy with the base model, and measuring whether the…