Try commenting out the entire getHTML() method of CategoryPage.php (just the contents of it, you might need the function declaration to stop it crashing). Then you should end up with just the skin and no contents.
I tried commenting this lines:
function getHTML() { /*global $wgOut, $wgCategoryMagicGallery, $wgCategoryPagingLimit; wfProfileIn( __METHOD__ );
$this->showGallery = $wgCategoryMagicGallery && !$wgOut->mNoGallery;
$this->clearCategoryState(); $this->doCategoryQuery(); $this->finaliseCategoryState();
$r = $this->getCategoryTop() . $this->getSubcategorySection() . $this->getPagesSection() . $this->getImageSection() . $this->getCategoryBottom();
wfProfileOut( __METHOD__ ); return $r;*/ }
But it still works perfectly, i dont know whats wrong, i comment all the function and dont crash, nothing. Please if you know why this happens im very greatfully