Documentation and support for writing mix plugins

Is there any good documentation for writing plugins for mix? What I am after is a way to build systems written in both LFE (Lisp Flavoured Erlang) and Elixir. Elixir uses mix and LFE uses rebar3 so what is the best way to handle both? Erlang modules are of course handled by both.