senrecep/csharpessentials/csharpessentials-gcpsecretmanager
Claude Code and agent skill by senrecep/csharpessentials
- community
Checking that the SKILL.md file is still in the repository.
Use when loading Google Cloud Secret Manager secrets into IConfiguration at startup. Covers builder.Configuration.AddGcpSecretManager(o => o.AddProject(new ProjectSecretConfiguration { ProjectId, SecretIds, PrefixFilters, RawSecretIds, Region })) or the "GoogleSecretManager" appsettings section, with `__` → `:` key mapping, JSON secret flattening, LoggerFactory diagnostics and transient gRPC retries.
Install
npx vskill@latest install senrecep/csharpessentials/csharpessentials-gcpsecretmanagerSKILL.md
CSharpEssentials.GcpSecretManager
Configuration provider that loads secrets from Google Cloud Secret Manager into IConfiguration. Secrets become ordinary config keys after startup.
Installation
Namespace
Register in Code
- With no
PrefixFiltersand noSecretIds, every secret of the project is loaded. AddProjectreturns the options, so calls chain. Anullproject throwsArgumentNullException; no project at all throwsArgumentException.SecretManagerConfigurationOptionsandProjectSecretConfigurationaresealed records (4.0).
Register from appsettings.json
Calling AddGcpSecretManager() without a delegate reads the GoogleSecretManager section:
With a delegate, set LoadFromAppSettings = true (and optionally ConfigurationSectionName) to combine both.
Key Mapping and JSON Secrets
- A double underscore becomes the config delimiter:
MyApp__ConnectionStrings__Default→MyApp:ConnectionStrings:Default. - A secret whose value is a JSON object or array is also flattened into child keys (
Db={"Host":"x"}addsDb:Host). Secrets listed inRawSecretIdsor matchingRawSecretPrefixesare kept as the raw string only.
Logging and Retries
Configuration providers are built before dependency injection, so pass a logger factory explicitly. Without one, nothing is logged.
Listing and secret access are retried through CSharpEssentials.Resilience on ResourceExhausted and Unavailable only (3 retries, exponential backoff). Other failures are logged at Error; a listing failure skips the project, an access failure skips the secret, and loading continues.
Best Practices
- Add
AddGcpSecretManager()after the JSON file sources so secrets override local values. - Name secrets with
__separators so they bind to options sections. - Narrow loading with
PrefixFiltersorSecretIds; loading a whole project is slow and over-privileged. - Grant the service account
Secret Manager Secret Accessoronly. - Use Application Default Credentials in GCP (
gcloud auth application-default loginlocally) instead of a credentials file.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryChecking.well-known/agent-skills/csharpessentials-gcpsecretmanager/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/senrecep/csharpessentials/csharpessentials-gcpsecretmanager)