Consider you have a monorepo in github, whereas each folder represents a microservice.
Now I want to be able to have a git tag for each microservice separately.
Since we are sharing one repo, each tag for example v1.0.0 for microservice foo1 will capture this tag from being created for microservice foo2.
Instead, we can create tags named foo1-v1.0.0 and foo2-v1.0.0 to solve this collision.
My question if we have some nice package or tool for doing precisely this convention- meaning semver with some prefix?
Thanks in advance
If your package feed is fully SemVer compliant, you can use the build metatag:

Package the microservices separately.
Apply the commit hash from which they were built to the metatag in the package version string (v1.0.42+commitId)
Tag the commit hash with the package name and full version string (MicroserviceA v1.0.42+commitId).

Sadly, not all package services (NPM comes to mind) are SemVer compliant and often drop the metatag, arguing that it is not used for sorting. Also, not all version automation can do repo tagging with a prefix other than 'v'.
Managing monorepo versioning using modified version of semver in a python project