Agent skill

fennel-lang

Expert guidance for Fennel code in all forms. Load this skill whenever a task involves reading, writing, debugging, reviewing, translating, or reasoning about Fennel.

Stars 7
Forks 0

Install this agent skill to your Project

npx add-skill https://github.com/datwaft/dotfiles/tree/main/.config/opencode/skills/fennel-lang

SKILL.md

Fennel Language

Fennel is a Lisp that compiles to Lua. It preserves Lua runtime semantics while providing Lisp syntax, expression-oriented forms, pattern matching, and macros.

This skill is language-first: prioritize semantics, forms, idioms, and reasoning. Do not assume tooling or project setup unless explicitly requested.

Use this skill when

  • writing, editing, reviewing, or refactoring Fennel code
  • translating between Lua and Fennel
  • explaining Fennel syntax, forms, macros, or runtime behavior
  • debugging compile-time and runtime issues
  • evaluating idiomatic quality and semantic correctness

Non-negotiable Fennel model

  • Fennel is fully interoperable with Lua; compiled output should not add runtime overhead.
  • Everything is expression-oriented.
  • Tables are the core runtime data structure and are mutable.
  • :name syntax is a string literal, not a keyword type.
  • nil means absence; setting a table key to nil removes that key.
  • Prefer let and local for immutable locals; use var only for intentional reassignment.
  • fn has no arity checks; lambda enforces required arguments.
  • Operators (+, =, and, etc.) and .. are special forms, not higher-order functions.
  • Operator argument counts are fixed at compile-time.
  • Pattern matching is ordered: first matching clause wins.
  • In case, ?x means maybe-nil binding and _x means ignored binding.
  • Sequential patterns are prefix matches; [] matches any table.
  • match auto-pins existing bindings; case binds fresh names unless explicitly pinned.
  • Native multiple return values are common and affect composition behavior.
  • Iterators are foundational (each, for, icollect, collect, accumulate) rather than seq abstractions.
  • Macros are compile-time transformations running in compiler scope, not runtime scope.
  • Macro hygiene matters: use gensym (name#) for helper locals.
  • Modules are plain returned values (usually tables) with explicit exports.

Coding defaults

  • Keep code idiomatic to both Fennel readers and Lua runtime constraints.
  • Favor simple, explicit forms over clever macro-heavy abstractions.
  • Use if for value branches and when for side effects.
  • Keep var lifetimes tight.
  • Prefer destructuring where it improves readability.
  • Prefer static field/method syntax (foo.bar, foo:bar) when possible.
  • Handle expected failures with (values nil err) and case/case-try patterns.
  • Reserve error/assert for unrecoverable paths or boundary failures.
  • Treat lua escape hatch as temporary or constrained interop aid.
  • Avoid deprecated or legacy compatibility forms in new code.

Macro defaults

  • Write a macro only when syntax transformation is required.
  • Design macro expansion first, then macro call shape.
  • Prefer quasiquote/unquote templates over manual list/sym construction.
  • Reject malformed macro inputs with assert-compile and source-aware forms.
  • Avoid caller-scope assumptions; require runtime dependencies inside expansion when needed.

Clojure-to-Fennel guardrails

  • Do not assume clojure.core runtime facilities.
  • Do not assume dynamic var/binding semantics.
  • Do not assume persistent collection semantics or seq-first APIs.
  • Translate to iterator-native and table-native patterns.
  • Keep module export and visibility model explicit and Lua-friendly.

Reference map

  • Complete language semantics and forms: reference.md
  • Style, naming, layout, and module conventions: style-guide.md
  • Macro authoring, hygiene, AST behavior, and diagnostics: macro-guide.md
  • Clojure assumption corrections and translation model: differences-with-clojure.md

Working approach

  • Preserve project conventions when they differ from defaults.
  • Avoid broad refactors unless requested.
  • Prefer exact semantics over surface-level translation.
  • If uncertain about a form or edge case, verify against references/reference.md before emitting code.

Expand your agent's capabilities with these related and highly-rated skills.

datwaft/dotfiles

jira-cli

Use this skill when the user wants to inspect, search, summarize, or update Jira issues, epics, sprints, boards, projects, releases, or server metadata with the `jira` command-line tool (`jira-cli`, `ankitpokhrel/jira-cli`). Also use it when the prompt mentions Jira issue keys like `ABC-123`, JQL, assignees/reporters, sprint or board queries, release/version lists, or converting Jira's interactive output into script-friendly `--plain`, `--raw`, `--table`, or `-n` commands.

7 0
Explore
datwaft/dotfiles

jj-vcs

Use jj (Jujutsu) version control system. Load this skill when the user wants to perform version control operations with jj, or when they explicitly mention jj/jujutsu.

7 0
Explore
datwaft/dotfiles

atlassian-cli

Use Atlassian CLI (acli) for Jira and Confluence operations. Load this skill when a task mentions Atlassian CLI/acli, Jira command-line workflows, or Confluence command-line workflows.

7 0
Explore
edmundmiller/dotfiles

zbench

Benchmark interactive zsh performance with zsh-bench and track regressions. Use when benchmarking shell startup, comparing zsh latency after config changes, investigating slow shell, or running git bisect on performance. Trigger phrases: "benchmark zsh", "shell is slow", "zbench", "zsh-bench", "shell startup time", "profile zsh", "zsh performance".

53 5
Explore
edmundmiller/dotfiles

nix-rebuild

Rebuild nix-darwin/NixOS system after dotfiles changes. Use when config files managed by Nix (lazygit, ghostty, etc.) need to be regenerated, or after editing any .nix file in the dotfiles repo.

53 5
Explore
edmundmiller/dotfiles

hass-config-flow

Interact with Home Assistant via the REST API on a NixOS host. Use when adding integrations, querying entities, managing config flows, creating API tokens, or automating HA setup programmatically. Also covers identifying device protocols (Matter, Zigbee, Thread, HomeKit) from the device registry. Trigger phrases: "add HA integration", "configure home assistant", "query HA entities", "create HA token", "HA REST API", "pair homekit", "set up matter in HA", "add spotify to HA", "is this device zigbee or thread", "what protocol is this device", "move devices to ZHA", "identify matter devices".

53 5
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results