amber-lang
This skill provides comprehensive knowledge of Amber (amber-lang.com), a modern programming language that compiles to Bash script. Use it to write, review, debug, convert, and explain Amber code.
Quick Reference
Amber compiles to Bash 3.2+ compatible scripts. It provides ECMAScript-inspired syntax, type safety, and mandatory error handling.
CLI: amber run <file.ab> | amber build <in.ab> <out.sh> | amber check <file.ab> | amber eval '<code>'
Shebang: #!/usr/bin/env amber | File extension: .ab
Types: Text, Int, Num (needs bc), Bool, Null, [T] (typed array, no nesting)
Key syntax patterns:
let x = 10 // variable
const Y = 20 // constant
fun add(a: Int, b: Int): Int { } // typed function
fun risky(): Int? { fail 1 } // failable function (? = can fail)
pub fun exported(): Null { } // public/exportable
fun modify(ref arr: [Int]) { } // pass by reference
$ command $ // shell execution
$ cmd $ failed(code) { } // error handling (MANDATORY)
$ cmd $? // propagate failure
import { fn } from "std/module" // stdlib import
import { fn } from "./file.ab" // local import
main (args) { } // entry point
Modifiers: silent (suppress output), trust (skip error handling), sudo (privilege escalation)
Control flow: if/else, if { cond: expr } (chain), ternary (x then a else b), loop, for i in 0..n, while
Code Style Guidelines
- Always handle errors — use
failed,succeeded,exited, or?for every failable operation - Use typed function signatures for clarity
- Prefer stdlib over raw commands (e.g.,
file_readover$ cat file $) - Use
mainblocks so scripts work correctly when imported - Use
constfor values that don't change - Avoid
trust— handle errors explicitly - Use ranges (
0..n) instead of manual counter loops
Additional References
For detailed syntax, types, operators, and all language features, see references/syntax.md
For standard library documentation:
- references/stdlib-text.md — Text manipulation (split, replace, regex, trim, parse, etc.)
- references/stdlib-array.md — Array operations (find, pop, shift, contains, etc.)
- references/stdlib-fs.md — File system (read, write, glob, chmod, extract, etc.)
- references/stdlib-env.md — Environment, I/O, styling (env vars, input prompts, colored output, etc.)
- references/stdlib-math-date-http.md — Math, date/time, and HTTP operations
For real-world example scripts, see references/examples.md
More from aaronflorey/agent-skills
go-cobra
Write, scaffold, and debug Go CLI applications with `github.com/spf13/cobra`. Use this skill whenever the user mentions Cobra, `cobra.Command`, a Go command-line app, subcommands, persistent or local flags, required flags, argument validation, shell completions, generated docs, or wants to build or refactor a cobra-based CLI.
24laravel-actions
Write, scaffold, explain, and refactor code using the `lorisleiva/laravel-actions` package. Use this skill whenever the user mentions Laravel Actions, `AsAction`, `php artisan make:action`, action classes, converting a controller, job, listener, or command into an action, dispatching an action as a job, using an action as a controller or listener, or adding validation, authorization, testing, or mocking around an action.
24num30-config
Write, debug, and explain Go configuration code using `github.com/num30/config`. Use this skill when the user mentions `num30/config`, wants config structs, file plus env plus CLI flag loading, validation, config watching, precedence rules, or asks how to integrate the num30/config package into a Go application.
22pelican-panel-plugins
Write, scaffold, explain, and debug plugins for the Pelican gaming panel. Use this skill whenever the user mentions Pelican plugins, extending Pelican, FilamentPHP resources or pages for Pelican, plugin service providers, custom permissions, plugin settings, routes, models, widgets, or asks how to add new functionality to the Pelican panel.
21go-viper
Write, debug, and explain Go configuration code with `github.com/spf13/viper`. Use this skill whenever the user mentions Viper, `viper`, config structs, reading config from files plus env vars plus flags, Cobra or `pflag` integration, unmarshaling into structs, env key replacers, config precedence, config watching, or a clean Viper bootstrap.
20mise
Configure and use `mise` for dev tool management, environment variables, and task running. Use this skill when the user mentions `mise`, `mise.toml`, `.mise.toml`, `mise use`, `mise install`, `mise run`, `mise x`, project tool versions like Node or Python, task definitions, env vars, hooks, backends, or asks how to configure mise in a project.
17