The two "starter" extensions are commented with lots of information and are good learning resources. The "stencil" extension however is just that, something you can make a copy of and remove everything you don't need.

It may also be worth look for other popular extensions on the Marketplace. They all have a link to the source code on the information page.

Because Bolt is written in PHP, it should be no surprise that the extensions
must also be written in PHP. Bolt is built upon the awesome
Silex micro- framework, and uses a lot of components from the
Symfony framework.

When coding your extensions, you should use as much of the functionality
provided by Silex and the included components as possible. Don't re-invent
the wheel, and things like that.

See the chapter on Bolt internals for a detailed overview of the
provided Bolt functionality, Silex objects and included libraries.

Bolt strives to adhere to the PSR-2 coding style.
When writing your extensions, you should try to do the same.

If you want to delve deeper into what you can and cannot do with extensions, see
the chapter on Bolt internals for a detailed
overview of the provided Bolt functionality, Silex objects and included
libraries.