mix
Mix Flutter styling and layout guidance for agents working on Mix code, projects using package:mix, and the Mix monorepo.
Safety scan
A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.
Check it deeper on your machine
It has changed since its scan on 11 Nov 2026.
As a Claude Code plugin, install it and then ask Claude Code:
/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/btwld/mix with scanskillsafety
Or from a terminal, clone it and run it:
git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/btwld/mix'
It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.
Badge for your README
Markdown
[](/listings/leoafarias--mix)HTML
<a href="/listings/leoafarias--mix"><img src="/api/listings/leoafarias--mix/badge.svg" alt="findsafeskills safety rating" /></a>Install
Install instructions from the README
As written by the repo's author. findsafeskills has not verified these steps.
Prerequisites
- **Dart SDK**: 3.12.0 or higher - **Flutter**: 3.44.0 or higher
Installation
flutter pub add mix
Or in `pubspec.yaml`:
dependencies: mix: <latest>
import 'package:mix/mix.dart';
First Widget
final cardStyle = BoxStyler()
.size(240, 100)
.color(Colors.blue)
.alignment(.center)
.borderRadius(.circular(12))
.border(.color(Colors.black).width(1).style(.solid));
Box(
style: cardStyle,
child: StyledText(
'Hello Mix',
style: TextStyler().color(Colors.white).fontSize(18),
),
);What was scanned
The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.
.claude-plugin/plugin.json · Manifest · 14 lines
View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)
This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.
- {
- "name": "mix",
- "version": "1.1.0",
- "displayName": "Mix",
- "description": "Mix Flutter styling and layout guidance for agents working on Mix code, projects using package:mix, and the Mix monorepo.",
- "author": {
- "name": "Leo Farias",
- "url": "https://github.com/leoafarias"
- },
- "homepage": "https://www.fluttermix.com",
- "repository": "https://github.com/btwld/mix",
- "license": "BSD-3-Clause",
- "keywords": ["dart", "flutter", "mix", "styling", "layout", "grid", "design-systems"]
- }
README.md · README · 104 lines
View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)
This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.
- <picture>
- <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/btwld/mix/main/assets/dark.svg">
- <img alt="Mix logo" src="https://raw.githubusercontent.com/btwld/mix/main/assets/light.svg">
- </picture>
- # Mix
- Type-safe styling for Flutter, with style definitions separate from widget structure.
- [](https://pub.dev/packages/mix)
- [](https://github.com/btwld/mix/actions/workflows/test.yml?query=branch%3Amain)
- [](LICENSE)
- [Package](https://pub.dev/packages/mix) ·
- [Documentation](https://fluttermix.com/mix/docs/) ·
- [BSD 3-Clause license](LICENSE)
- ## Core concepts
- - Styler → Spec → Widget: a typed style resolves to data that a widget renders.
- - Styles are values: fluent methods return new merged styles, so bases can be reused.
- - Props defer values: concrete values, tokens, and Mix values resolve with context;
- plain values replace, while Mix values accumulate fieldwise.
- - Tokens name values: `MixScope` supplies them; `ContextToken` can compute a default.
- - Variants are conditional patches: state-dependent patches have higher priority,
- with declaration order preserved within each priority group.
- - Modifiers wrap widgets; directives transform values during resolution or rendering.
- - Animation interpolates resolved specs: implicit, phase, and keyframe modes.
- - Annotations generate typed plumbing and widgets from style recipes.
- The [decision log](ARCHITECTURE.md) explain the boundaries
- and tradeoffs behind these concepts. The bullets describe the model; the log
- preserves reasons to revisit a choice.
- ## Start
- ```bash
- flutter pub add mix
- ```
- Current sources require Dart 3.12+ and Flutter 3.44+; check the
- [package manifest](packages/mix/pubspec.yaml) for the version you use.
- ```dart
- import 'package:flutter/material.dart';
- import 'package:mix/mix.dart';
- final cardStyle = BoxStyler()
- .size(240, 100)
- .color(Colors.blue)
- .alignment(.center)
- .borderRadius(.circular(12));
- final card = Box(
- style: cardStyle,
- child: StyledText(
- 'Hello Mix',
- style: TextStyler().color(Colors.white).fontSize(18),
- ),
- );
- ```
- ## Packages
- | Package | Purpose |
- |---|---|
- | [mix](packages/mix) | Styling, tokens, variants, animation and layout |
- | [mix_annotations](packages/mix_annotations) | Code-generation annotations |
- | [mix_generator](packages/mix_generator) | build_runner generators |
- | [mix_lint](packages/mix_lint) | Mix analyzer rules |
- | [mix_protocol](packages/mix_protocol) | JSON contract, codecs and schemas |
- | [mix_winds](packages/mix_winds) | Tailwind utility compiler and Flutter widgets |
- | [mix_chart](packages/mix_chart) | Line, bar and pie charts |
- | [mix_chart_protocol](packages/mix_chart_protocol) | Optional chart JSON vocabulary |
- ## Examples and guides
- - [Showcase](examples/showcase): widgets, responsive layouts, interactions and charts.
- - [Example workspace setup](examples): dependencies and web builds.
- - [Styling](https://fluttermix.com/mix/docs/guides/styling/),
- [variants](https://fluttermix.com/mix/docs/guides/dynamic-styling/),
- [tokens](https://fluttermix.com/mix/docs/guides/design-token/),
- [animation](https://fluttermix.com/mix/docs/guides/animations/).
- - [Grid layout](packages/mix/doc/grid-layout.md),
- [scope and theming](packages/mix/doc/mix-scope-and-theming.md),
- [token migration](packages/mix/doc/token-migration-guide.md).
- - [MixWidget constructors](guides/mix-widget-variant-constructors.md),
- [protocol integration](packages/mix_protocol/GUIDE.md),
- [protocol publishing](guides/publishing_mix_protocol.md).
- ## Contribute
- Read [AGENTS.md](AGENTS.md) for setup, commands, generated-file rules and
- verification. Dependencies are bootstrapped with Melos.
- The [website source](https://github.com/btwld/mix-docs) lives separately.
- The [Mix agent skill](skills/mix/SKILL.md) includes portable API references.
- Install it in a consuming project with:
- ```bash
- npx skills add btwld/mix --skill mix -y
- ```
- [Contributors](https://github.com/btwld/mix/graphs/contributors)
setup.sh · Bundled script · 146 lines · 1 finding marked
- #!/usr/bin/env sh
- set -eu
- log() { printf '%s\n' "$*" >&2; }
- die() { log "ERROR: $*"; exit 1; }
- have() { command -v "$1" >/dev/null 2>&1; }
- # ----------------------------
- # Environment check
- # ----------------------------
- if [ "${CLAUDE_CODE_REMOTE:-}" != "true" ]; then
- die "This setup script is intended for Claude Code remote environments only.
- Set CLAUDE_CODE_REMOTE=true to override, or use standard Flutter/FVM installation."
- fi
- # ----------------------------
- # Config
- # ----------------------------
- FVM_INSTALL_DIR="${FVM_INSTALL_DIR:-$HOME/fvm}"
- FVM_BIN_DIR="$FVM_INSTALL_DIR/bin"
- PUB_CACHE_BIN="$HOME/.pub-cache/bin"
- # ----------------------------
- # Requirements
- # ----------------------------
- have curl || die "curl is required"
- have tar || die "tar is required"
- have bash || die "bash is required for the FVM install script"
- # ----------------------------
- # Install FVM
- # ----------------------------
- if [ ! -x "$FVM_BIN_DIR/fvm" ]; then
- log "Installing FVM..."
- curl -fsSL https://fvm.app/install.sh | bash
- Note: Pipes a downloaded script directly into a shell (curl | sh / wget | bash)
- Line 35 on GitHub
- fi
- export PATH="$FVM_BIN_DIR:$PUB_CACHE_BIN:$PATH"
- have fvm || die "fvm not found on PATH after install"
- log "FVM: $(fvm --version)"
- # ----------------------------
- # Install Flutter via FVM
- # ----------------------------
- if [ -f ".fvmrc" ] || [ -f ".fvm/fvm_config.json" ]; then
- log "Installing Flutter SDK..."
- fvm install
- else
- log "No .fvmrc found; skipping Flutter install"
- fi
- log "Flutter: $(fvm flutter --version | head -1)"
- # ----------------------------
- # Install DCM (Dart Code Metrics)
- # ----------------------------
- DCM_VERSION="${DCM_VERSION:-1.31.4}"
- if ! have dcm; then
- log "Installing DCM ${DCM_VERSION}..."
- case "$(uname -s)" in
- Linux)
- ARCH=$(uname -m)
- case "$ARCH" in
- x86_64) DEB_ARCH="amd64" ;;
- aarch64) DEB_ARCH="arm64" ;;
- *) die "Unsupported architecture: $ARCH" ;;
- esac
- DEB_FILE="dcm_${DCM_VERSION}-1_${DEB_ARCH}.deb"
- DEB_URL="https://github.com/CQLabs/homebrew-dcm/releases/download/${DCM_VERSION}/${DEB_FILE}"
- curl -fsSL -o "/tmp/${DEB_FILE}" "$DEB_URL"
- dpkg -i "/tmp/${DEB_FILE}" || die "Failed to install DCM"
- rm -f "/tmp/${DEB_FILE}"
- ;;
- Darwin)
- if have brew; then
- brew tap CQLabs/dcm
- brew install dcm
- else
- die "Homebrew is required to install DCM on macOS"
- fi
- ;;
- *)
- die "Unsupported OS: $(uname -s)"
- ;;
- esac
- fi
- have dcm && log "DCM: $(dcm --version)"
- # Activate DCM if license key is provided
- if have dcm && [ -n "${DCM_LICENSE_KEY:-}" ]; then
- log "Activating DCM..."
- dcm activate --license-key="$DCM_LICENSE_KEY"
- elif have dcm; then
- log "Note: DCM installed but not activated. Set DCM_LICENSE_KEY to activate."
- log " For OSS projects, request a free license at https://dcm.dev/pricing/"
- fi
- # ----------------------------
- # Melos bootstrap
- # ----------------------------
- if [ -f "melos.yaml" ]; then
- log "Installing melos and bootstrapping..."
- fvm dart pub global activate melos >/dev/null
- fvm dart pub global run melos bootstrap
- elif [ -f "pubspec.yaml" ]; then
- log "Running: fvm flutter pub get"
- fvm flutter pub get
- fi
- # ----------------------------
- # Setup symlinks for non-interactive shell access
- # ----------------------------
- SYMLINK_DIR="/usr/local/bin"
- if [ -d ".fvm/flutter_sdk/bin" ]; then
- FLUTTER_SDK_BIN="$(cd .fvm/flutter_sdk/bin && pwd)"
- # Create symlinks for flutter and dart
- for cmd in flutter dart; do
- if [ -x "$FLUTTER_SDK_BIN/$cmd" ]; then
- ln -sf "$FLUTTER_SDK_BIN/$cmd" "$SYMLINK_DIR/$cmd"
- log "Created symlink: $SYMLINK_DIR/$cmd -> $FLUTTER_SDK_BIN/$cmd"
- fi
- done
- fi
- # Create symlinks for fvm and melos
- if [ -x "$FVM_BIN_DIR/fvm" ]; then
- ln -sf "$FVM_BIN_DIR/fvm" "$SYMLINK_DIR/fvm"
- log "Created symlink: $SYMLINK_DIR/fvm"
- fi
- if [ -x "$PUB_CACHE_BIN/melos" ]; then
- ln -sf "$PUB_CACHE_BIN/melos" "$SYMLINK_DIR/melos"
- log "Created symlink: $SYMLINK_DIR/melos"
- fi
- log ""
- log "Setup complete. Commands are available globally:"
- log " flutter --version"
- log " dart --version"
- log " fvm --version"
- log " melos --version"
Version history
v1.1.010/19/2026
Ratings and comments
Sign in to rate this skill.
Sign inFree to use. If it’s helped, pass it on.