Everywhere (at conferences, in various GH repos) I see people completely freely sharing their ways of using AI. Employees of several companies I've recently passed through without any second thought put their guardrails into shared repos, prompts for how to do code self-review. Hell: manual testers are currently sitting and writing an entire agent that will replace them once completed.
For me this is shooting yourself in the foot: the prompts I've developed over the last dozen or so months are one of the few things that make me even slightly irreplaceable.
Am I thinking correctly, or am I overreacting?
Don't fall in love with the code you wrote to do the work you did there. It's part of the process. Someone will have to maintain it well after you're gone.
No, you're not. Company time + company resources = company property. Company project = company property. No code within any given company belongs to one person, but belongs to (spoiler alert!) the company.
If you want to develop voodoo to make you irreplaceable, do it in the context of your own projects, with your own resources, on your own time.
PS: there may well be legal reason that they require the prompts. e.g. to ensure that you're not injecting materials owned by someone else. They are perfectly justified in demanding access to every byte which goes into their software, documents, infrastructure, etc.
I guess it depends on the details of your employment contract, but typically (and by common sense) any work you do that you are being paid for, or was done using company equipment or resources, belongs to the company and not you. Based on what you've said here, I'd say that your stance is incorrect.