The Charles VIII's claim to Naples was three fold. On the one hand Charles IV of Anjou, last male line descendent of the House of Anjou, willed Naples Provence and Anjou to him. But that will was forced and based in part upon Charles VIII's descent from Marie d'Anjou, his grandmother and wife of Charles VII. She was the sister of Charles IV's father Charles of Le Maine and of his uncle Rene I. I discussed this
here in another thread. Charles IV had no heirs nor siblings to pass anything to. However Rene I had a daughter, Yolande of Bar, who was married to the Count of Vaudemont. Under normal circumstances her claim would be superior to that of her aunt Marie and Marie's descendents. Hence the forced will specifying the French crown.
The third and weekest part of the claim is that Charles VIII and Charles IV of Lorraine were both male line descendents of Margaret of Anjou wife of Charles Count of Valois (who incidentally is progenitor of the House of Valois). Margaret's dowry was Anjou itself which led to the creation of the House of Valois-Anjou when her grandson John II enfeoffed his second son Louis with Anjou. Louis was then adopted by Joan I Naples of the senior Capetian House of Anjou bringing the claims to Naples to the younger Valois House of Anjou. But the younger house never ruled there. The Hungarian Durazzo branch of the Capetian-Anjou line continued until Joan II who again adopted a Valois-Anjou. But they failed to press their claims against the Trastamara. Nevertheless this is were the idea of closest male heir comes in. Though its ambiguous because the claim really only extends to Anjou because that was the extent of Margaret's dowry. Joan I's adoption rights extend only to the younger House of Anjou not to the rest of the Valois so even under Salic law it couldn't pass outside Valois-Anjou unless it's considered to originate from Margaret, which by the marriage contract it couldn't. If anything Joan I and Joan II's acts of adoption and the Valois-Anjou claims that extend from them set the precedent that the Neapolitan inheritance could be willed to a particular claimant regardless of the familial relationship.
So when Charles VIII dies without heirs he can will his claims to Louis XII. But if we were to follow strict rules of inheritance there are other claimants. Yolande's son Rene II of Lorraine that would have the best claim to Naples but if we assume his claims have already been disavowed it could pass through Louis XI's daughter Anne. She married Peter II of Bourbon but was survived only by her daughter Suzanne who married OTL Charles III of Bourbon of the Montpensier branch of Bourbon. This is interesting in that Charles III had no children with Suzanne and upon her death (in 1521) he disputed the Bourbon inheritance with Francis I's mother Louise of Savoy, leading to his switch to Spanish allegiance. Though its hard to see him ever claiming Naples jure uxoris as he never did OTL.
With Anne having no male descendents her younger sister could claim to be heir apparent of Naples. Her sister was Joan of Berry who was married to Louis d'Orleans, OTL Louis XII. It was a forced marriage and OTL Louis had the marriage annulled as soon as her brother (Charles VIII) died. So if she is considered crucial to retaining control of Naples he may put up with her but the trade off is he would be unable to marry Anne of Brittany and thus Brittany would pass out of the French crown to whoever marries Anne. Furthermore its unlikely he would ever have a child with Joan making it hard to pass those claims on. That's a big part of why this didn't happen OTL, it meant sacrificing Brittany and the hope of perpetuating the House of Orleans in favor of being heir apparent behind Anne's daughter Suzanne (it's impossible to know in 1499 that Suzanne would never have children).
Thus neither Rene II of Lorraine nor Suzanne de Bourbon are likely to be able to press their, somewhat theoretical, claims and indeed neither did OTL. So even though its somewhat unorthodox as a matter of realpolitik the claims pass to Louis XII d'Orleans even if he annuls his marriage to Joan. Allowing him to claim Naples
and Brittany by marrying Anne of Brittany. Milan is relatively straightforward. As Yorel outlined it stems from Valentina Visconti. Francis I can claim it via a salic law as a descendent of Valentina or jure uxoris as husband of Louis XII's daughter Claude (who was responsible for transmitting Brittany to him).
To pull out the relevant points for this TTL I would say that Rene II or Suzanne could be useful pawns in the Italian wars. Indeed Suzanne's OTL husband did get involved and lead the Spanish armies against France precisely because of a succession dispute (thought OTL it was over the Duchy of Bourbon). I should also note that Suzanne's marriage OTL was 1505 so well after the POD so she may marry some one else TTL, perhaps someone who wants to use her as a pretext to claim Naples. In that vein Francis I may make a good choice as he also brings added claims to Bourbon via his mother, though with the same trade off of loosing Brittany. There's also the deposed Trastamara Kings of Naples to consider. They could make for good pretenders if someone wanted to back them, though the Spanish may just assume press their own claims directly as Ferdinand II did OTL. It's also worth mentioning that the Pope, as nominal feudal lord of Naples (the crown was still theoretical of fief of the Papacy) can add considerable legitimacy to any claim advancing the cause of a particular pretender.
Make of this what you will. To quote Yorel 'I hope I was clear enough and didn't make this sound too complicated...'