Install Yeoman and the Lens Extension generator:
npm install -g yo generator-lens-ext
The Yeoman generator will walk you through the steps required to create your extension prompting for the required information.
yo lens-ext
You can also clone this repo and run npm link
to use yo lens-ext
locally.