I’m in the process of writing a WordPress plugin. It’s actually quite doable, but the documentation is lousy. Most of the time you can guess stuff by grepping through the source and Googling around, but just now I spent hours on something stupid.
I just wanted to include the Prototype and Scriptaculous librariries, which are distributed with WordPress. And since I wanted to do this cleanly (instead of writing to the header hard core) it took me a while to figure out.
Eventually this post led me on the right track. Thanks!