flix-docs

Provides Flix language documentation and project coding conventions for writing and reviewing Flix code.

Updated Jul 20, 2026
One-click install
npx skills add https://github.com/ababup1192/flix_ge_studio --skill flix-docs-ababup1192
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: flix-docs
Source: https://github.com/ababup1192/flix_ge_studio/tree/main/.agents/skills/flix-docs
Command: npx skills add https://github.com/ababup1192/flix_ge_studio --skill flix-docs-ababup1192

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing correct, idiomatic Flix code requires knowing the language's official documentation plus this project's specific style rules, and this Skill consolidates both so you avoid syntax mistakes, reserved-word pitfalls, and style violations before they happen. ## Core Features & Use Cases - Official Documentation Retrieval: Fetches the Flix LLM-oriented documentation (doc.flix.dev/for-llms.html) covering the type system, effect syntax, module conventions, pattern matching, and pipe operators. - Project Coding Standards: Enforces naming conventions, pipe-style code, Algebraic Effect propagation and handler priority, standard-library-first choices over Java interop, and test-writing rules. - Version-Specific Guidance: Documents Flix 0.75.1 pitfalls not in official docs, including reserved words (spawn, run), the Channel API, non-stable List.sortBy, and Java interop import rules. - Use Case: Before writing a new Flix module or fixing a compile error, activate this Skill to load the relevant syntax references and project rules so the generated code passes review on the first attempt. ## Quick Start Ask the AI to check the Flix documentation and project conventions before writing or modifying any Flix code in this repository.

Frequently Asked Questions about flix-docs

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write idiomatic Flix code with pipes and effects?

Use the |> pipe operator to avoid temporary variables, place the receiver as the last function argument, and propagate Algebraic Effects to callers instead of running them locally. Run handlers only at entry points like main or @Test where DefaultHandler applies.

What are the reserved words in Flix 0.75.1 that cause compile errors?

Reserved words like spawn and run fail even as record field names, producing indirect errors such as "Expected ',' before '='". Rename them to alternatives like start or walkR, and consult the full reserved-word list in the project rules.

Should I use Java interop or the Flix standard library?

Prefer the Flix standard library: use Fs for file operations, BufReader for buffered reading, Math.Random for randomness, and type-module conversion functions like Int32.fromString. Only fall back to Java interop when no standard equivalent exists, with imports at module top level.

How do I handle Algebraic Effects in Flix functions?

Declare effects in the function signature and let them propagate rather than calling run locally, which would turn everything into IO. Prefer DefaultHandler, then built-in handlers via with, and hand-written handlers only as a last resort, chaining multiple handlers in one run block.

Is List.sortBy stable in Flix?

No, List.sortBy and List.sort are not stable in Flix 0.75.1; equal-key elements may not keep input order. When order matters, use List.zipWithIndex to add a tiebreaker key so the composite sort key is unique.

How should Flix test functions be written?

@Test functions must return Unit and use the Assert module for assertions. Write one assert per test using tuples or lists for multiple values, avoid pattern-match branching in tests, and add clear comments including ASCII art for complex scenarios.