Of course there is!
Give your FB number when checking in for the Skyteam/AF flights, and whatever Star Alliance programme number you use when checking in for the Star Alliance flights.
Or retroclaim each segment from within your FB or Star Alliance FFP, as appropriate.
Note that in Star Alliance, the flights must be both marketed (flight number) and operated by a Star Alliance member.