skills/featbit-sdks-go/SKILL.md
Expert guidance for integrating FeatBit Go Server SDK. Use when user asks about "Go SDK", "Golang feature flags", "FeatBit Go", or mentions .go files with FeatBit. Do not use for Node.js, Python, Java, .NET, or JavaScript questions.
npx skillsauth add featbit/featbit-skills featbit-sdks-goInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use for server-side Go applications — HTTP servers, background workers, CLI tools — that need real-time feature flag evaluation.
Why server-side SDK: maintains one persistent WebSocket connection, synchronizes all flag data locally in under 100 ms, then evaluates every flag locally in under 10 ms per call on average. Do not use for frontend JavaScript or mobile applications — those require a client-side SDK.
https://github.com/featbit/featbit-go-sdk
Copy and track progress:
Step 1: Install the module
Run:
go get github.com/featbit/featbit-go-sdk
Step 2: Create the client
Use this minimal setup:
client, err := featbit.NewFBClient(envSecret, streamingUrl, eventUrl)
if err != nil {
return err
}
defer client.Close()
Step 3: Evaluate the first feature flag
Use the official pattern:
user, _ := interfaces.NewUserBuilder("<unique-user-key>").UserName("Jane").Build()
_, detail, _ := client.BoolVariation("flag-key", user, false)
fmt.Printf("flag %s returns %s, reason: %s\n", detail.KeyName, detail.Variation, detail.Reason)
Step 4: Validate the integration
If client.IsInitialized() is false or evaluation returns the fallback unexpectedly, verify envSecret, streamingUrl, and eventUrl, then retry.
After the client is initialized, evaluate a feature flag with a user and a fallback value:
user, _ := interfaces.NewUserBuilder("<unique-user-key>").UserName("Jane").Build()
value, detail, _ := client.BoolVariation("flag-key", user, false)
fmt.Println(value, detail.Reason)
Use the first return value when only the flag result is needed. Use detail when the evaluation reason is also needed — detail.Reason explains why the value was returned, detail.KeyName and detail.Variation identify the matched variation.
Also available for non-boolean flags: Variation (string), IntVariation, DoubleVariation, JsonVariation.
Add custom properties to FBUser when targeting rules depend on user attributes beyond key and userName:
user, _ := interfaces.NewUserBuilder("a-unique-key-of-user").
UserName("bob").
Custom("age", "15").
Custom("country", "FR").
Build()
Use Custom(key, value) for any attribute that must be referenced in feature flag targeting rules.
AllLatestFlagsVariations to get all flags for a user at once.tools
Expert guidance for integrating FeatBit JavaScript Client SDK in browser environments. Use when user asks about "JavaScript client SDK", "browser feature flags", "FeatBit JS", "vanilla JS SDK", or mentions browser-side HTML/JS with FeatBit. Do not use for Node.js server-side, React, React Native, .NET, Python, Java, or Go questions.
development
Expert guidance for integrating FeatBit Java Server SDK. Use when user asks about "Java SDK", "Java feature flags", "FeatBit Java", "Maven feature flags", or mentions .java or build.gradle files with FeatBit. Do not use for .NET, Go, Node.js, Python, or JavaScript questions.
tools
Expert guidance for integrating FeatBit .NET Server SDK into C# and ASP.NET Core applications. Use when user asks about ".NET SDK", "C# feature flags", "ASP.NET Core FeatBit", "dotnet feature flags", or mentions .cs or .csproj files. Do not use for Node.js, Python, Java, Go, or client-side JavaScript questions.
development
Expert guidance for using the FeatBit REST API to manage projects, environments, and feature flags programmatically. Use when user asks about "FeatBit API", "REST API", "create project API", "create environment API", "create feature flag API", "API authentication", "OpenAPI key", or needs to automate FeatBit operations via HTTP endpoints. Do not use for SDK integration, deployment configuration, or flag evaluation questions.