ivy-interactive/ivy-framework/ivy-create-any-connection
Claude Code and agent skill by ivy-interactive/ivy-framework
- community
Checking that the SKILL.md file is still in the repository.
Create an ad-hoc API connection or service integration in an Ivy project. Supports NuGet package, OpenAPI/Swagger with Refitter, REST API, and custom HTTP client approaches. Use when the user wants to connect to an external API, add a service integration, or create a typed client for a REST endpoint.
Install
npx vskill@latest install ivy-interactive/ivy-framework/ivy-create-any-connectionSKILL.md
ivy-create-any-connection
Create a connection to an external API or service inside an existing Ivy project. This produces connection files under Connections/[ConnectionName]/ -- it does NOT create a separate project or catalog entry. Only use this skill when the user wants to connect to an API or service that does not already have a pre-built reference connection in the Ivy catalog.
Pre-flight: Read Learnings
If the file .ivy/learnings/ivy-create-any-connection.md exists in the project directory, read it first and apply any lessons learned from previous runs of this skill.
Reference Files
Read before implementing:
- references/AGENTS.md -- Ivy framework API reference (widgets, hooks, layouts, inputs, colors)
Step 1: Validate the Project
- Verify this is a valid Ivy project. Check for a
.csprojfile andProgram.csin the working directory. If this is not an Ivy project, tell the user and stop.
- LLM endpoint detection: If the user's request mentions an OpenAI-compatible LLM endpoint (URL contains
openai,litellm,chat/completions, orv1; or keywords like "OpenAI-compatible", "LLM proxy", "chat completions"), do NOT create an ad-hoc connection. Instead, tell the user to use the OpenAI reference connection, which already supports custom endpoints via theOpenAI:Endpointsecret. Stop and suggest using the/ivy-create-using-reference-connectionskill with "OpenAI" as the provider.
Step 2: Clarify the Target API
- Is it clear what API or service the connection is for? If not, ask the user to clarify. Ask for a link to the API documentation or the name of the service. Some services have multiple APIs (e.g. Stripe has payments, billing, customers). If so, clarify which API and reflect this in the connection name.
- Determine a name for the connection. This is usually the service name in PascalCase, like "Stripe" or "GitHub". Ask the user to confirm the name.
- Create the connection directory using the pattern
Connections/[ConnectionName]/inside the user's project directory.
Expected directory structure after this skill completes:
Step 3: Choose an Approach
- Try to find a good NuGet package that implements the API.
GOOD indicators:
- Lots of downloads
- Recently updated
- Permissive license (MIT, Apache-2.0, BSD, ISC, etc.)
- Good documentation
- Official, created by the service itself
BAD indicators:
- Few downloads
- Not updated in a long time
- Restrictive license (GPL, etc.)
- No documentation
- Not official, created by a third party
Notes:
- For anything related to LLM model inference, prefer packages that provide an
IChatClientadapter viaMicrosoft.Extensions.AI. It is fine to also register the provider-specific client (e.g.AnthropicClient) -- but always registerIChatClientas well if possible, since it gives a unified chat interface across all LLM connections.
Given these parameters, present the user a list of potential NuGets. The strategy for choosing the connection approach (in priority order):
- NuGet package -- if a good NuGet exists, proceed to the "NuGet Approach" section
- OpenAPI/Swagger spec -- if no good NuGet exists but the API has an official OpenAPI spec, use Refitter to generate a typed client. Proceed to the "OpenAPI / Refitter Approach" section
- Custom client -- as a last resort, if there is no NuGet and no OpenAPI spec, generate a custom HTTP client from the API documentation. Proceed to the "Custom HTTP Client Approach" section
Consult with the user on which approach to take if not clear.
NuGet Approach
Add the NuGet package
- Add the selected NuGet package(s) to the project using the dotnet CLI:
Create the Connection class
- Create
Connections/[ConnectionName]/[ConnectionName]Connection.csimplementingIConnectionandIHaveSecrets.
The connection class must follow this pattern:
- Some connections need multiple secrets. Use appropriate names.
Set up secrets
- Determine what secrets are needed to connect to the API. For example: API key, bearer token, client ID/secret, endpoint URL, etc. Ask the user what credentials the API requires if not clear from documentation.
- Initialize user secrets for the project (idempotent if already initialized):
Note: If the user provided specific credential values in their prompt (API keys, tokens, endpoints), set them asPresetvalues inGetSecrets():new Secret("Key", "user-provided-value"). This ensures the connection works immediately without manual secret configuration.
- Make sure the connection class's
GetSecrets()method returns all secret keys, andRegisterServices()reads them fromIConfiguration.
After completing the NuGet approach, proceed to the Verification section.
OpenAPI / Refitter Approach
No suitable NuGet package was found, but the API has an official OpenAPI/Swagger specification. Use Refitter to generate a strongly-typed C# client from the spec.
Find the OpenAPI spec
- Search for the official OpenAPI/Swagger spec URL for the API. Common locations:
https://api.example.com/openapi.jsonhttps://api.example.com/swagger.jsonhttps://api.example.com/v1/openapi.yaml- The API documentation site often links to it
- GitHub repositories may contain the spec file
Validate that the URL returns a valid OpenAPI 2.0/3.0/3.1 spec (JSON or YAML). Ask the user to confirm the spec URL.
Determine authentication
- What authentication scheme does the API use?
- Bearer token (
Authorization: Bearer <token>) -- most common for modern APIs - API key header (e.g.
X-Api-Key: <key>) -- common for simpler APIs
Note the auth scheme type (bearer or apikey) and the header name (e.g. Authorization or X-Api-Key).
Set up secrets
- Initialize user secrets for the project (idempotent if already initialized):
Note: If the user provided specific credential values in their prompt (API keys, tokens, endpoints), set them asPresetvalues inGetSecrets():new Secret("Key", "user-provided-value"). This ensures the connection works immediately without manual secret configuration.
Install Refitter and Refit
- Ensure the Refitter dotnet tool is installed globally:
- Add the Refit NuGet package to the project:
Create the .refitter configuration
- Create the file
Connections/[ConnectionName]/[ConnectionName].refitterwith smart defaults:
Key settings explained:
operationNameGenerator: "SingleClientFromPathSegments"-- generates a single interface with method names derived from URL path segments instead of operationIds (cleaner names)optionalParameters: true-- optional query params become C# optional parameters with defaultsimmutableRecords: false-- generates mutable classes (safer for serialization)generateNullableReferenceTypes: true-- respects nullable reference typesinterfaceName-- omits theIprefix; Refitter adds it automatically, producingI[ConnectionName]Client
Generate the client
- Run refitter to generate the C# client from the OpenAPI spec:
This generates [ConnectionName]Client.cs containing the I[ConnectionName]Client Refit interface with all API methods.
- Verify the generated file exists and contains the expected interface. If generation fails, check that:
- The OpenAPI spec URL is accessible
- The spec is valid (the
--skip-validationflag is already used) - The output path is correct
Create Refresh.ps1
- Create
Connections/[ConnectionName]/Refresh.ps1so the client can be regenerated when the API spec changes:
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingsrc/claude-plugin/skills/ivy-create-any-connection/SKILL.md
Popularity
- 7-day trend score
- 0
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/ivy-interactive/ivy-framework/ivy-create-any-connection)