I know dwarves are not known for their books and poems unlike a certain pointy eared race, but, all dwarven things I know of they seem to have a massive mechanical understanding. They must learn it from somewhere, so..
How about a dwarven learning hall. In this hall you can select what you would like your dwarfs to learn, such as mining or masonry or whatever, and whenever they are idle they will go here to learn.
Before they can learn though a dwarf who is skilled has to first raise the level of knowledge in the hall of learning. In this way the hall is kinda like a dwarf. The hall has a knowledge level that has been inscribed into the tablets and that knowledge can only come from someone experiencing it somewhere.
So if someone wanted it to teach mining it would work something like this:
*assuming no place is designated for mining, as it would take priority*
1. User tells Hall of knowledge to teach mining.
2. Legendary Miner enters hall of knowledge and after about a season has brought the level of knowledge up to proficient.... then he dies to unicorn.
3. Some Unskilled peasants with mining tag on go here to learn
4. The peasants after a season or so now are proficient miners.
5. Since the building only has a proficient skill level, the peasants cannot learn more and now go on to parting and becoming friends with everyone in the fortress.. or whatever.
*Edit - This would also be a great place to have children go to keep them out of harms way and such... or to crush with a cave in.. up to you I suppose.
http://images.elfwood.com/art/k/r/kronenberg/dwarven_library.jpg