I like this idea. Here's what I think though.
I think this could be an idea for the next max level Clan Castle and maybe a level or two under max. Having the capability to request 1-2 capacity worth of spells as well as troops. Just keep it as a high level Clan Castle option and you won't have to worry about powerful spells dumpstering low level players. On that note though, you can get the 20 capacity CC at TH 6 and get a max drag that's going to dump on any decent base of the same level for the most part. I don't think that would tip the balance in favor of the attacker too much more than it already is. Also, from a defensive stand point, maybe Clan castles can have boosted effects in wars and against normal attacks depending on whatever donated spell is inside to tip the balance back in the favor of the defender? For example, if there's a blue spell in the clan castle, it will explode doing a lot of area of effect damage when the castle goes down. Or if the Clan Castle contains a healing spell, maybe any buildings and troops within a close range of the castle receive healing while the Castle still stands. Having a Rage spell in the castle could boost defensive capabilities of troops and towers within a certain range. Jump spells inside the Castle could act as an area of effect spring trap? I'm not sure about that last one XD. None the less, I really like the idea of donated spells. If not having it in the clan castle, maybe you can request a spell from a clan member and it takes up your own pre-existing spell capacity.