How to vibe-code your own community widgets with Claude Code and Developer Studio
Hi!
The video above describes four custom widgets running on our demo community for CC. This post is the written walkthrough, so you can build something similar. You don’t need to be an engineer - you just need patience, a GitHub account, your vibecoding tool of choice, and admin access to your community.
What you’ll need
- Admin access to your community, including Developer Studio
- A GitHub account and an empty repository
- Claude Code (or another coding assistant you’re comfortable with)
- The Developer Studio docs open in a tab: https://developer-portal.gainsight.com/docs/
Step 1: Start with one small question
Pick something your members keep asking, like “what should I read next?” or “who can I ask about this?” Build the smallest version that answers it. My first widget only suggested members. Everything else came after I had that working.
Step 2: Give Claude the rules before the idea
Most of the time I saved came from handing Claude the docs first. Here’s where I started:
In my Github Repo, I need to build a widget for CC. Use https://developer-portal.gainsight.com/docs/ for good guidelines on how to build this widget.
I want the widget to do the following:
- Understand the topics of conversation the user has been part of and the things they're interested in, as well as any other data point we have about them
- Identify and suggest potential connections in the community in a "Users Like You" kind of format that allows them to click a button and start a private message
Giving Claude guidelines first means you can correct the direction before any code exists.
Step 3: Understand the shape of a widget
Claude will generate this, but it helps to recognize it. If you’re ever a little lost about what’s going on, ask Claude to explain it to you in plain language, as if you are not an engineer. I did that a lot!
- An
extensions_registry.jsonfile at the root of the repository. Each widget gets an entry with a type, title, category, source path and a settings form. - A JavaScript module that exports
init(sdk). It mounts its UI inside the container the platform gives it and reads its settings from the SDK. - Settings you define (title, how many items to show, which connector to use) show up in the page builder sidebar, so a community manager can change them without code.
Step 4: Connect the repository
In Developer Studio, within Control, enable your repository as a source and watch the main branch. Push your code, wait for the build status to show Completed, and the widget appears in the widget library. Add it to a page in the page builder. Check out this support doc for more detail.
Pro tip: open the page in a fresh tab after each build. Browsers will happily show you the old version.
Step 5: Add live data with a connector (optional, but this is where personalization comes from)
My recommendations and directory read recent community topics. To do that:
- Create an API client in your community (read-only scope is enough).
- In Developer Studio, create a connector using OAuth client credentials. The token URL and the endpoint should both be on your community’s API host. Mixing hosts is a common cause of “invalid client.”
- Store the client ID and secret as secrets. The platform will refuse raw secrets in connector fields and point you to the secrets API. Reference them as
{{ get_secret('your_secret_name') }}. - Use the connector’s response template to trim and filter on the server. Anything the connector returns can be seen in the browser’s Network tab, so only send fields and categories you’re happy to expose.
Check out this support doc for more detail.
And a safety note: never paste credentials into a chat with Claude or anywhere else. Create them in the community, store them as secrets, and tell Claude only the secret names. Claude will yell at you and make you regenerate new credentials - ask me how I know 😅
Step 6: Let Claude see your widget, and iterate in small loops
Add the built widget to a custom page in your community sandbox, and tell Claude where it is. It can pull up a browser to test and validate everything it’s doing. You may need to log in to your community sandbox to give it the best data.
My loop was: ask Claude for one change, run its tests, push, wait for the build, look at the live page, then describe what I wanted changed back to Claude. Exact guidance like “Change the colour of the search button to #3F639C” works better than “It looks wrong”.
The one that got me the best UI results?
Ok there's like, a lot of white space for this widget. I just added a Dynamic Content widget to the page you have access to. Can you adjust the margins so they align better with the Dynamic Content widget at the top of the screen?
Giving Claude an out-of-the-box widget to “see” helped align my widget to the UI throughout the community. And you can tell I was nearing the end of my 3-hour session as my language got way more casual 😂
Be thoughtful about privacy
My widgets use public community activity only. I added options to exclude roles and an opt-out profile field, and the message starter in “Users like you” is editable and never sent automatically. If you build anything that surfaces people, decide your opt-out approach before you launch.
I’d love to hear what you’re thinking of building. Share your idea below, and if you get stuck, tell me where and I’ll do my best to point you in the right direction.
Ainsley