it's not easy... the document has a property 'splitViewController'... and it has a view property 'splitView'... that is the main NSSplitView... you just want to add a view inside it
be careful... as others plugins could be adding views there... for ex Craft adds one... and if your plugin adds the panel before it, Sketch will crash. so basically the very ugly way of fixing that is, if Craft is installed wait until it adds its panel before you do.