But the gist of it is that I wire it up through Aspire (don't need to, but makes it nice) to set the environment variable on my main app host.
I have a small set of utility functions to access the DI container with common patterns like creating a scope for scoped services: https://github.com/zeeq-ai/zeeq-app/blob/main/src/backend/Ze... (optional, but useful)
And a skill: https://github.com/zeeq-ai/zeeq-app/blob/main/.agents/skills...
I recommend you "train" the skill like I do in my the blog post. Basically ask the agent to get an instance of an object from DI like a repository class or your DbContext and have it perform some operations. Have it wrap a function and add logging. Have it replace a function. Then once it learns how to do this, have it write the skill bespoke to your project.