that's a pretty broad question.
For the phantom-dependency, it depends how you would like to do that. You can download the different phantom-distros, and depending on the platform, unzip the appropriate one, and call the executable. I'm not an expert, but that's generally how it is done.
As for creating a Kibana plugin, that requires you to check out the Kibana source-code. As for a getting-started, I'd start with this video. https://www.elastic.co/elasticon/conf/2016/sf/how-to-build-your-own-kibana-plugins.
You can then take a look at the https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md guide to get some overview of developing for Kibana.