Looking to write a DaVinci Resolve plugin
The Resolve scripting API comes with DaVinci Resolve Studio.  The most platform-agnostic way of finding it is through the Resolve &quot;help&quot; menu, under Help-&gt;Documentation-&gt;Developer.  This will open a folder in your system browser which contains scripting examples for LUA, PYTHON, OFX, and more.  The README.txt file in the scripting folder contains a list of commonly used API functions.
User julian_b has posted pretty printed versions of this text file on the Resolve user forums, but as he warns, those versions may not be the most current. Formatted Resolve Python API Docs
Also, you'll want to get your hands on the Fusion 8 Scripting Guide and Reference Manual.pdf .  Much of Resolve's scripting power came with the acquisition of eyeon Fusion, which is now integrated within Resolve, and its constituent classes and methods are contained within a &quot;Fusion&quot; scriptable object.
There's an active community of Fusion users who maintain a very supportive forum with helpful scripting resources at steakunderwater.com/wesuckless.  (There's a long history behind the strange domain name, which comes from the eyeon days).  There, you'll find the Suck Less Fusion Bug Tracker, the &quot;Scripting, Fuses, and Macros&quot; subforum, and Reactor, a Fusion plugin package manager, which contains more helpful links to resources, as well as its own helpful scripting examples.

or (better yet) a plugin that does this already .. or a plugin library I can search for one?

Reactor is the place you'd find one already built, if one exists already.  It would also be the place to share one which you create.  When you're ready to deploy, the site admin, Secondman frequently helps new developers bundle their packages for Reactor.
While WSL and Reactor aren't &quot;official&quot; documentation, its volunteers are active, supportive, and passionate experts, whose guidance is invaluable, and I cannot recommend highly enough.