Skip to content
Back to search

mix

SkillWorks with Claude CodeGitHub

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.

Checked today

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
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/leoafarias--mix/badge.svg)](/listings/leoafarias--mix)

HTML

<a href="/listings/leoafarias--mix"><img src="/api/listings/leoafarias--mix/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

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.

  1. {
  2. "name": "mix",
  3. "version": "1.1.0",
  4. "displayName": "Mix",
  5. "description": "Mix Flutter styling and layout guidance for agents working on Mix code, projects using package:mix, and the Mix monorepo.",
  6. "author": {
  7. "name": "Leo Farias",
  8. "url": "https://github.com/leoafarias"
  9. },
  10. "homepage": "https://www.fluttermix.com",
  11. "repository": "https://github.com/btwld/mix",
  12. "license": "BSD-3-Clause",
  13. "keywords": ["dart", "flutter", "mix", "styling", "layout", "grid", "design-systems"]
  14. }
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.

  1. <picture>
  2. <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/btwld/mix/main/assets/dark.svg">
  3. <img alt="Mix logo" src="https://raw.githubusercontent.com/btwld/mix/main/assets/light.svg">
  4. </picture>
  5. # Mix
  6. Type-safe styling for Flutter, with style definitions separate from widget structure.
  7. [![pub package](https://img.shields.io/pub/v/mix)](https://pub.dev/packages/mix)
  8. [![Test Workflow](https://img.shields.io/github/actions/workflow/status/btwld/mix/test.yml?branch=main&label=Test%20Workflow)](https://github.com/btwld/mix/actions/workflows/test.yml?query=branch%3Amain)
  9. [![BSD 3-Clause license](https://img.shields.io/github/license/btwld/mix)](LICENSE)
  10. [Package](https://pub.dev/packages/mix) ·
  11. [Documentation](https://fluttermix.com/mix/docs/) ·
  12. [BSD 3-Clause license](LICENSE)
  13. ## Core concepts
  14. - Styler → Spec → Widget: a typed style resolves to data that a widget renders.
  15. - Styles are values: fluent methods return new merged styles, so bases can be reused.
  16. - Props defer values: concrete values, tokens, and Mix values resolve with context;
  17. plain values replace, while Mix values accumulate fieldwise.
  18. - Tokens name values: `MixScope` supplies them; `ContextToken` can compute a default.
  19. - Variants are conditional patches: state-dependent patches have higher priority,
  20. with declaration order preserved within each priority group.
  21. - Modifiers wrap widgets; directives transform values during resolution or rendering.
  22. - Animation interpolates resolved specs: implicit, phase, and keyframe modes.
  23. - Annotations generate typed plumbing and widgets from style recipes.
  24. The [decision log](ARCHITECTURE.md) explain the boundaries
  25. and tradeoffs behind these concepts. The bullets describe the model; the log
  26. preserves reasons to revisit a choice.
  27. ## Start
  28. ```bash
  29. flutter pub add mix
  30. ```
  31. Current sources require Dart 3.12+ and Flutter 3.44+; check the
  32. [package manifest](packages/mix/pubspec.yaml) for the version you use.
  33. ```dart
  34. import 'package:flutter/material.dart';
  35. import 'package:mix/mix.dart';
  36. final cardStyle = BoxStyler()
  37. .size(240, 100)
  38. .color(Colors.blue)
  39. .alignment(.center)
  40. .borderRadius(.circular(12));
  41. final card = Box(
  42. style: cardStyle,
  43. child: StyledText(
  44. 'Hello Mix',
  45. style: TextStyler().color(Colors.white).fontSize(18),
  46. ),
  47. );
  48. ```
  49. ## Packages
  50. | Package | Purpose |
  51. |---|---|
  52. | [mix](packages/mix) | Styling, tokens, variants, animation and layout |
  53. | [mix_annotations](packages/mix_annotations) | Code-generation annotations |
  54. | [mix_generator](packages/mix_generator) | build_runner generators |
  55. | [mix_lint](packages/mix_lint) | Mix analyzer rules |
  56. | [mix_protocol](packages/mix_protocol) | JSON contract, codecs and schemas |
  57. | [mix_winds](packages/mix_winds) | Tailwind utility compiler and Flutter widgets |
  58. | [mix_chart](packages/mix_chart) | Line, bar and pie charts |
  59. | [mix_chart_protocol](packages/mix_chart_protocol) | Optional chart JSON vocabulary |
  60. ## Examples and guides
  61. - [Showcase](examples/showcase): widgets, responsive layouts, interactions and charts.
  62. - [Example workspace setup](examples): dependencies and web builds.
  63. - [Styling](https://fluttermix.com/mix/docs/guides/styling/),
  64. [variants](https://fluttermix.com/mix/docs/guides/dynamic-styling/),
  65. [tokens](https://fluttermix.com/mix/docs/guides/design-token/),
  66. [animation](https://fluttermix.com/mix/docs/guides/animations/).
  67. - [Grid layout](packages/mix/doc/grid-layout.md),
  68. [scope and theming](packages/mix/doc/mix-scope-and-theming.md),
  69. [token migration](packages/mix/doc/token-migration-guide.md).
  70. - [MixWidget constructors](guides/mix-widget-variant-constructors.md),
  71. [protocol integration](packages/mix_protocol/GUIDE.md),
  72. [protocol publishing](guides/publishing_mix_protocol.md).
  73. ## Contribute
  74. Read [AGENTS.md](AGENTS.md) for setup, commands, generated-file rules and
  75. verification. Dependencies are bootstrapped with Melos.
  76. The [website source](https://github.com/btwld/mix-docs) lives separately.
  77. The [Mix agent skill](skills/mix/SKILL.md) includes portable API references.
  78. Install it in a consuming project with:
  79. ```bash
  80. npx skills add btwld/mix --skill mix -y
  81. ```
  82. [Contributors](https://github.com/btwld/mix/graphs/contributors)
setup.sh · Bundled script · 146 lines · 1 finding marked
  1. #!/usr/bin/env sh
  2. set -eu
  3. log() { printf '%s\n' "$*" >&2; }
  4. die() { log "ERROR: $*"; exit 1; }
  5. have() { command -v "$1" >/dev/null 2>&1; }
  6. # ----------------------------
  7. # Environment check
  8. # ----------------------------
  9. if [ "${CLAUDE_CODE_REMOTE:-}" != "true" ]; then
  10. die "This setup script is intended for Claude Code remote environments only.
  11. Set CLAUDE_CODE_REMOTE=true to override, or use standard Flutter/FVM installation."
  12. fi
  13. # ----------------------------
  14. # Config
  15. # ----------------------------
  16. FVM_INSTALL_DIR="${FVM_INSTALL_DIR:-$HOME/fvm}"
  17. FVM_BIN_DIR="$FVM_INSTALL_DIR/bin"
  18. PUB_CACHE_BIN="$HOME/.pub-cache/bin"
  19. # ----------------------------
  20. # Requirements
  21. # ----------------------------
  22. have curl || die "curl is required"
  23. have tar || die "tar is required"
  24. have bash || die "bash is required for the FVM install script"
  25. # ----------------------------
  26. # Install FVM
  27. # ----------------------------
  28. if [ ! -x "$FVM_BIN_DIR/fvm" ]; then
  29. log "Installing FVM..."
  30. 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
  31. fi
  32. export PATH="$FVM_BIN_DIR:$PUB_CACHE_BIN:$PATH"
  33. have fvm || die "fvm not found on PATH after install"
  34. log "FVM: $(fvm --version)"
  35. # ----------------------------
  36. # Install Flutter via FVM
  37. # ----------------------------
  38. if [ -f ".fvmrc" ] || [ -f ".fvm/fvm_config.json" ]; then
  39. log "Installing Flutter SDK..."
  40. fvm install
  41. else
  42. log "No .fvmrc found; skipping Flutter install"
  43. fi
  44. log "Flutter: $(fvm flutter --version | head -1)"
  45. # ----------------------------
  46. # Install DCM (Dart Code Metrics)
  47. # ----------------------------
  48. DCM_VERSION="${DCM_VERSION:-1.31.4}"
  49. if ! have dcm; then
  50. log "Installing DCM ${DCM_VERSION}..."
  51. case "$(uname -s)" in
  52. Linux)
  53. ARCH=$(uname -m)
  54. case "$ARCH" in
  55. x86_64) DEB_ARCH="amd64" ;;
  56. aarch64) DEB_ARCH="arm64" ;;
  57. *) die "Unsupported architecture: $ARCH" ;;
  58. esac
  59. DEB_FILE="dcm_${DCM_VERSION}-1_${DEB_ARCH}.deb"
  60. DEB_URL="https://github.com/CQLabs/homebrew-dcm/releases/download/${DCM_VERSION}/${DEB_FILE}"
  61. curl -fsSL -o "/tmp/${DEB_FILE}" "$DEB_URL"
  62. dpkg -i "/tmp/${DEB_FILE}" || die "Failed to install DCM"
  63. rm -f "/tmp/${DEB_FILE}"
  64. ;;
  65. Darwin)
  66. if have brew; then
  67. brew tap CQLabs/dcm
  68. brew install dcm
  69. else
  70. die "Homebrew is required to install DCM on macOS"
  71. fi
  72. ;;
  73. *)
  74. die "Unsupported OS: $(uname -s)"
  75. ;;
  76. esac
  77. fi
  78. have dcm && log "DCM: $(dcm --version)"
  79. # Activate DCM if license key is provided
  80. if have dcm && [ -n "${DCM_LICENSE_KEY:-}" ]; then
  81. log "Activating DCM..."
  82. dcm activate --license-key="$DCM_LICENSE_KEY"
  83. elif have dcm; then
  84. log "Note: DCM installed but not activated. Set DCM_LICENSE_KEY to activate."
  85. log " For OSS projects, request a free license at https://dcm.dev/pricing/"
  86. fi
  87. # ----------------------------
  88. # Melos bootstrap
  89. # ----------------------------
  90. if [ -f "melos.yaml" ]; then
  91. log "Installing melos and bootstrapping..."
  92. fvm dart pub global activate melos >/dev/null
  93. fvm dart pub global run melos bootstrap
  94. elif [ -f "pubspec.yaml" ]; then
  95. log "Running: fvm flutter pub get"
  96. fvm flutter pub get
  97. fi
  98. # ----------------------------
  99. # Setup symlinks for non-interactive shell access
  100. # ----------------------------
  101. SYMLINK_DIR="/usr/local/bin"
  102. if [ -d ".fvm/flutter_sdk/bin" ]; then
  103. FLUTTER_SDK_BIN="$(cd .fvm/flutter_sdk/bin && pwd)"
  104. # Create symlinks for flutter and dart
  105. for cmd in flutter dart; do
  106. if [ -x "$FLUTTER_SDK_BIN/$cmd" ]; then
  107. ln -sf "$FLUTTER_SDK_BIN/$cmd" "$SYMLINK_DIR/$cmd"
  108. log "Created symlink: $SYMLINK_DIR/$cmd -> $FLUTTER_SDK_BIN/$cmd"
  109. fi
  110. done
  111. fi
  112. # Create symlinks for fvm and melos
  113. if [ -x "$FVM_BIN_DIR/fvm" ]; then
  114. ln -sf "$FVM_BIN_DIR/fvm" "$SYMLINK_DIR/fvm"
  115. log "Created symlink: $SYMLINK_DIR/fvm"
  116. fi
  117. if [ -x "$PUB_CACHE_BIN/melos" ]; then
  118. ln -sf "$PUB_CACHE_BIN/melos" "$SYMLINK_DIR/melos"
  119. log "Created symlink: $SYMLINK_DIR/melos"
  120. fi
  121. log ""
  122. log "Setup complete. Commands are available globally:"
  123. log " flutter --version"
  124. log " dart --version"
  125. log " fvm --version"
  126. log " melos --version"

Version history

  • v1.1.010/19/2026

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.