macalbert/envilder/sdk-implementation-guide

Claude Code and agent skill by macalbert/envilder

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Operational guide for implementing a new Envilder runtime SDK. Covers folder structure, API surface (Tier 1 + Tier 2), provider contract, naming conventions, sync/async model, internal vs public separation, vanity imports, and testing skeleton. Use when creating Go, Java, PHP, Rust, or any future SDK.

Install

npx vskill@latest install macalbert/envilder/sdk-implementation-guide

SKILL.md

SDK Implementation Guide

Step-by-step guide for building a new Envilder runtime SDK. Complements ADR-0003 (architecture pattern) and ADR-0005 (integration tiers). For website wiring and publishing, see the sdk-release-checklist skill.

When to Use

  • Implementing a new runtime SDK (Go, Java, PHP, Rust, etc.)
  • Reviewing an SDK PR for pattern compliance
  • Onboarding a contributor to SDK development

Prerequisites

Before starting, read:

1. Folder Structure

txt
src/sdks/{runtime}/
├── domain/
│ ├── ISecretProvider ← Port interface/protocol
│ ├── MapFileConfig ← Config parsed from $config
│ ├── EnvilderOptions ← Runtime overrides
│ ├── ParsedMapFile ← Config + variable mappings
│ └── SecretProviderType ← Enum (aws, azure)
├── application/
│ ├── Envilder ← Public facade (Tier 1 + Tier 2)
│ ├── EnvilderClient ← Core resolver
│ ├── MapFileParser ← JSON parsing logic
│ └── SecretValidation ← Opt-in validate function
├── infrastructure/
│ ├── SecretProviderFactory ← Internal, not exported
│ ├── aws/
│ │ └── AwsSsmSecretProvider
│ └── azure/
│ └── AzureKeyVaultSecretProvider
└── integrations/ ← Tier 3 (future, community-driven)
└── {framework}/

Tests mirror the structure under tests/sdks/{runtime}/.

Note: This is the logical structure. Each runtime adapts to its own
conventions (e.g., Node.js uses src/ subfolder, Python uses package name
as root directory).

2. Mandatory API Surface

Tier 1: Static Facade (one-liner)
txt
Envilder.load("map.json") → injects into process env
Envilder.resolveFile("map.json") → returns resolved key-value pairs
Tier 2: Fluent Builder
txt
Envilder.fromMapFile("map.json")
.withProvider("azure")
.withVaultUrl("https://vault.azure.net")
.withProfile("my-profile") // AWS only
.inject() // injects into env
// OR
.resolve() // returns key-value pairs
Environment Routing (both tiers)
txt
Envilder.load("production", {
"production": "prod-map.json",
"staging": "stg-map.json"
})

3. Provider Contract

AspectDecision
Missing secretsReturn null/None/nil (Option<T> in Rust) or omit from result collection: never throw
ValidationOpt-in validateSecrets() post-resolution
Cross-provider validationprofile + Azure → error; vaultUrl + AWS → error
Options override configRuntime EnvilderOptions > $config from map file
Pull-onlySDKs do not support push mode
Sync vs Async per Runtime
RuntimeModelRationale
.NETBoth (sync + async methods)IConfigurationBuilder needs sync
PythonSync onlyboto3 is natively synchronous
Node.jsAsync onlyAWS SDK v3 is async, natural fit
GoSync (with context.Context and goroutines for batch)Idiomatic Go
Java/KotlinBoth (sync + async/CompletableFuture)Spring uses both patterns
PHPSync onlyPHP is single-threaded by default
RustAsync (tokio)AWS SDK for Rust is async
Batch vs Individual
RuntimeStrategyRationale
Node.jsBatch (GetParameters, max 10)Avoids waterfall awaits
.NETIndividual (GetParameter)Simpler error handling per secret
PythonIndividual (get_parameter)Matches boto3 API
GoBatch preferredReduce round trips
JavaBatch preferredAWS SDK supports batch
PHPIndividualSimpler for first iteration
RustBatch preferredAsync batch is natural

4. Internal vs Public Separation

The SecretProviderFactory is always internal (not part of public API):

RuntimeMechanism
.NETinternal keyword + InternalsVisibleTo for tests
Python_ prefix (_SecretProviderFactory) + __all__ whitelist
Node.jsNot re-exported from barrel index.ts
GoUnexported (secretProviderFactory, lowercase)
Java/KotlinPackage-private or internal (Kotlin)
PHPPrefixed _ or #[Internal] attribute / @internal docblock
Rustpub(crate) visibility

5. Naming Conventions

Package/Module Names
RuntimePackage nameImport
.NETEnvilder (NuGet)using Envilder;
Pythonenvilder (PyPI)from envilder import Envilder
Node.js@envilder/sdk (npm)import { Envilder } from '@envilder/sdk'
Goenvilder.com/go (vanity)import "envilder.com/go"
Java/Kotlincom.envilder:envilder (Maven)import com.envilder.Envilder;
PHPenvilder/envilder (Packagist)use Envilder\Envilder;
Rustenvilder (crates.io)use envilder::Envilder;
Class/Struct Naming
  • Facade class is always Envilder (consistent cross-SDK brand)
  • Client class is always EnvilderClient
  • Provider interface: ISecretProvider (or language equivalent: Protocol, trait, interface)

6. Vanity Imports (Go)

Go module path is envilder.com/go. This requires a vanity import HTML at https://envilder.com/go?go-get=1:

html
<meta name="go-import" content="envilder.com/go git https://github.com/macalbert/envilder">
<meta name="go-source" content="envilder.com/go https://github.com/macalbert/envilder https://github.com/macalbert/envilder/tree/main/src/sdks/go{/dir} https://github.com/macalbert/envilder/tree/main/src/sdks/go{/dir}/{file}#L{line}">

Serve from the Envilder website (src/website/public/go/index.html).

7. Testing Skeleton

Every SDK must have:

  • [ ] Unit tests for MapFileParser
  • [ ] Unit tests for EnvilderClient (mock ISecretProvider)
  • [ ] Unit tests for Envilder facade (mock client/provider)
  • [ ] Unit tests for SecretValidation
  • [ ] Unit tests for cross-provider validation
  • [ ] Acceptance tests with LocalStack (AWS SSM)
  • [ ] Acceptance tests with LocalStack for Azure (Azure Key Vault)

Follow sdk-acceptance-testing skill for container wrapper patterns.

8. Implementation Order (per SDK)

  1. Domain types (MapFileConfig, EnvilderOptions, SecretProviderType, ISecretProvider)
  2. MapFileParser + tests
  3. EnvilderClient + tests
  4. AwsSsmSecretProvider + acceptance tests
  5. AzureKeyVaultSecretProvider + acceptance tests
  6. Envilder facade (Tier 1 + Tier 2) + tests
  7. SecretValidation + tests
  8. Cross-provider validation + tests
  9. README, changelog, website wiring (→ sdk-release-checklist skill)

9. Checklist Before Submitting PR

  • [ ] All unit tests pass
  • [ ] All acceptance tests pass (Docker required)
  • [ ] SecretProviderFactory is not publicly exported
  • [ ] Tier 1 (load) and Tier 2 (fromMapFile().inject()) work end-to-end
  • [ ] Missing secrets silently omitted (no exceptions from provider)
  • [ ] validateSecrets() throws on empty/missing values
  • [ ] Cross-provider errors: profile+Azure→error, vaultUrl+AWS→error
  • [ ] Options override $config values
  • [ ] Environment routing works
  • [ ] Follows language-idiomatic conventions (naming, async model, visibility)

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
135
Repository forks
4
7-day trend score
25

Stars and forks are for the whole GitHub repository, not this skill alone. 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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/macalbert/envilder/sdk-implementation-guide/badge)](https://verified-skill.com/skills/macalbert/envilder/sdk-implementation-guide)

Something wrong with this skill or its page? Tell us.