flutter-environment-setup-linux

Linux environment setup for Flutter desktop development with OS detection and toolchain validation. Automatically detects Debian/Ubuntu or ChromeOS and halts with instructions for non-apt systems Installs core dependencies (curl, git, unzip, libglu1-mesa) and Linux desktop toolchain (clang, cmake, ninja-build, GTK libraries) Prompts for optional IDE setup (VS Code or Android Studio via snap) Runs flutter doctor -v and flutter devices to validate the environment, automatically installing missing packages if detected

INSTALLATION
npx skills add https://github.com/flutter/skills --skill flutter-environment-setup-linux
Run in your project or agent environment. Adjust flags if your CLI version differs.

SKILL.md

$2a

-

Update System Packages:

Execute the following command to refresh the package lists and upgrade existing packages:

sudo apt-get update -y && sudo apt-get upgrade -y

-

Install Core Prerequisites:

Install the base dependencies required for Flutter to operate and build on Linux:

sudo apt-get install -y curl git unzip xz-utils zip libglu1-mesa

-

Install Linux Desktop Toolchain:

Install the specific C/C++ toolchain and GTK libraries required to compile Linux desktop applications:

sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev libstdc++-12-dev

-

IDE Configuration Prompt:

STOP AND ASK THE USER: "For the best experience, an IDE with Flutter support is recommended. Would you like me to provide the installation commands for Visual Studio Code or Android Studio?"

  • If VS Code: Provide the snap installation command: sudo snap install --classic code
  • If Android Studio: Provide the snap installation command: sudo snap install android-studio --classic

-

Validate the Environment:

Run the Flutter diagnostic tool to verify the Linux toolchain and device availability:

flutter doctor -v

flutter devices

Validate-and-Fix: Analyze the output of flutter doctor -v.

  • If the "Linux toolchain" section reports missing dependencies, parse the missing package names, construct a new sudo apt-get install -y <packages> command, and execute it.
  • If flutter devices does not list a linux platform device, verify that the libgtk-3-dev package was successfully installed and re-run the validation.

Constraints

  • Do not include any external URLs, hyperlinks, or references to external documentation.
  • Assume the user has sudo privileges and do not explain basic privilege escalation concepts.
  • Do not explain what individual packages (e.g., curl, cmake) do; assume the user understands standard Linux development tools.
  • Strictly use apt-get for package management to ensure non-interactive compatibility (-y flags must be present).
  • All terminal commands must be enclosed in bash code blocks.
BrowserAct

Let your agent run on any real-world website

Bypass CAPTCHA & anti-bot for free. Start local, scale to cloud.

Explore BrowserAct Skills →

Stop writing automation&scrapers

Install the CLI. Run your first Skill in 30 seconds. Scale when you're ready.

Start free
free · no credit card