I don't see anything in our wiki off hand. However, if you're going to write your own, looking at an existing sniffer should make it clear what needs to happen. For instance, see  any of the sniff() functions in /lib/galaxy/datatypes/interval.py

I was mistaken about the lack of documentation about sniffing. Here's some useful documentation within the context of adding a datatype to Galaxy:

http://bitbucket.org/galaxy/galaxy-central/wiki/AddingDatatypes

J.