Have you considered any other options for metadata storage besides the sidecar file? If this is an agentic skill, I would imagine that other methods could be similarly effective - like a cli “getattr —filename” or even “sqlite3 “select metadata where filename=“.
Given agent context strategy is converging on “filesystem is best”, we would need more robust metadata facilities . You have a good opportunity here to test which methods are most effective - starting with your sidecar file.