You can gain a bonus of Competence to skills, or Enhancement to abilities. The Spell itself does not actually have a cap. It merely uses CL 20 as the highest example, and mentions the formula to figure the cost of using the spell, with the math done out for you up to CL20 (if the cap actually was CL20, the cost list AND the formula is redundant). However the spell does have a limitations based on how it is being used.
For Skills the maximum bonus checks your current Caster Level, and can only go as high as half of that, and the “donor demon” has to have at least twice as many RANKS in the skill as the bonus granted. Note, there is a difference in the skills sore in the demons entry, and its actual ranks in the skill (the Balor has a +31 in UMD, but only 23 ranks)
For Abilities the maximum bonus checks your current Caster Level, and can only go as high as a quarter of that, and the “donor demon” has to have a CURRENT ability score MODIFIER of twice the granted bonus.
Before anyone says that this isn’t a good spell, it is a +11 competence to UMD (and the other skills that stay relevant for certain people) without making a custom item, and the bonus from the abilities can get as high as your caster level, and as high as you are willing to boost the demon’s ability score first.
When I used this I got stat bonuses of +17, +12, +12, +8
, +15, +12, and Str was “only” 17 because of the CL cap since mine was 69 after boosting it up, and I was level 16.
… If you have access to Circle Magic your Str and Wis will be MUCH higher than mine was, +26 and +23 respectively. (both are only capped by CL, Str because you can boost it to insanity with Consumptive Field, but you hit your CL cap for Extract Gift, and Wis because of the Owl’s Insight boost being CL-based).