apideck-go
Skill4 starsChanged 3 months agoApache-2.0View on GitHub
Apideck Unified API integration patterns for Go. Use when building integrations with accounting software (QuickBooks, Xero, NetSuite), CRMs (Salesforce, HubSpot, Pipedrive), HRIS platforms (Workday, BambooHR), file storage (Google Drive, Dropbox, Box), ATS systems (Greenhouse, Lever), e-commerce, or any of Apideck's 200+ connectors using Go. Covers the github.com/apideck-libraries/sdk-go package, authentication, CRUD operations, pagination, error handling, and Vault connection management.
- Reads credentials
In this repository182 other files it gives its agents.
- AGENTS.mdAGENTS.md
- llms.txtllms.txt
- access-financialsSkill
- acertaSkill
- activecampaignSkill
- actSkill
- acumaticaSkill
- adp-ihcmSkill
- adp-runSkill
- adp-workforce-nowSkill
- afasSkill
- alexishrSkill
- amazon-seller-centralSkill
- apideck-best-practicesSkill
- apideck-codegenSkill
- apideck-connector-coverageSkill
- apideck-dotnetSkill
- apideck-javaSkill
- apideck-mcp-month-end-closeSkill
- apideck-mcp-onboard-employeeSkill
- apideck-mcp-pay-billSkill
- apideck-mcp-receive-paymentSkill
- apideck-mcpSkill
- apideck-migrationSkill
- apideck-nodeSkill
- apideck-phpSkill
- apideck-portmanSkill
- apideck-pythonSkill
- apideck-restSkill
- apideck-unified-apiSkill
- asanaSkill
- attioSkill
- azure-active-directorySkill
- azure-devopsSkill
- bamboohrSkill
- banqupSkill
- basecampSkill
- bigcommerceSkill
- blackbaudSkill
- bol-comSkill
- boxSkill
- breathehrSkill
- bullhorn-atsSkill
- campfireSkill
- cascade-hrSkill
- catalystoneSkill
- cegid-talentsoftSkill
- ceridian-dayforceSkill
- cezannehrSkill
- charliehrSkill
- ciphrSkill
- clearbooks-ukSkill
- clickupSkill
- closeSkill
- copperSkill
- deelSkill
- digitsSkill
- dropboxSkill
- dualentrySkill
- ebaySkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 2 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 25
ALWAYS use the github.com/apideck-libraries/sdk-go SDK.
- Distinctive: line 26
ALWAYS pass security, app ID, and consumer ID via functional options when creating the client.
- Very specific: line 27
USE ServiceID on requests to specify which downstream connector to use.
- Very specific: line 28
ALWAYS check returned error values (idiomatic Go error handling).
- Very specific: line 29
USE sdkgo.Pointer() helper for optional fields.
- Distinctive: line 30
DO NOT store API keys in source code.
- Very specific: line 87
All resources follow the pattern: s.{Api}.{Resource}.{Operation}(ctx, request), returning (response, error).
- Very specific: line 150
Use the Next() method on the response.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Apideck Go SDK Skill
Overview
The Apideck Unified API provides a single integration layer to connect with 200+ third-party services across accounting, CRM, HRIS, file storage, ATS, e-commerce, and more. The official Go SDK provides typed clients for all unified APIs.
Installation
go get github.com/apideck-libraries/sdk-goIMPORTANT RULES
- ALWAYS use the
github.com/apideck-libraries/sdk-goSDK. DO NOT make rawnet/httpcalls to the Apideck API. - ALWAYS pass security, app ID, and consumer ID via functional options when creating the client.
- USE
ServiceIDon requests to specify which downstream connector to use. - ALWAYS check returned
errorvalues (idiomatic Go error handling). - USE
sdkgo.Pointer()helper for optional fields. - DO NOT store API keys in source code. Use environment variables.
Quick Start
package main
import (
"context"
"fmt"
"log"
"os"
sdkgo "github.com/apideck-libraries/sdk-go"
"github.com/apideck-libraries/sdk-go/models/components"
"github.com/apideck-libraries/sdk-go/models/operations"
)
func main() {
ctx := context.Background()
s := sdkgo.New(
sdkgo.WithConsumerID("your-consumer-id"),
sdkgo.WithAppID("your-app-id"),
sdkgo.WithSecurity(os.Getenv("APIDECK_API_KEY")),
)
res, err := s.Crm.Contacts.List(ctx, operations.CrmContactsAllRequest{
ServiceID: sdkgo.Pointer("salesforce"),
Limit: sdkgo.Pointer(int64(20)),
})
if err != nil {
log.Fatal(err)
}
for _, contact := range res.GetContactsResponse.Data {
fmt.Println(contact.Name)
}
}SDK Patterns
Client Setup
import sdkgo "github.com/apideck-libraries/sdk-go"
s := sdkgo.New(
sdkgo.WithConsumerID("your-consumer-id"),
sdkgo.WithAppID("your-app-id"),
sdkgo.WithSecurity(os.Getenv("APIDECK_API_KEY")),
)CRUD Operations
All resources follow the pattern: s.{Api}.{Resource}.{Operation}(ctx, request), returning (response, error).
import (
sdkgo "github.com/apideck-libraries/sdk-go"
"github.com/apideck-libraries/sdk-go/models/components"
"github.com/apideck-libraries/sdk-go/models/operations"
)
ctx := context.Background()
// LIST
res, err := s.Crm.Contacts.List(ctx, operations.CrmContactsAllRequest{
ServiceID: sdkgo.Pointer("salesforce"),
Limit: sdkgo.Pointer(int64(20)),
Filter: &components.ContactsFilter{
Email: sdkgo.Pointer("john@example.com"),
},
Sort: &components.ContactsSort{
By: (*components.ContactsSortBy)(sdkgo.Pointer("updated_at")),
Direction: (*components.SortDirection)(sdkgo.Pointer("desc")),
},
})
// CREATE
res, err := s.Crm.Contacts.Create(ctx, operations.CrmContactsAddRequest{
ServiceID: sdkgo.Pointer("salesforce"),
Contact: components.ContactInput{
FirstName: sdkgo.Pointer("John"),
LastName: sdkgo.Pointer("Doe"),
Emails: []components.Email{
{Email: sdkgo.Pointer("john@example.com"), Type: (*components.EmailType)(sdkgo.Pointer("primary"))},
},
PhoneNumbers: []components.PhoneNumber{
{Number: sdkgo.Pointer("+1234567890"), Type: (*components.PhoneNumberType)(sdkgo.Pointer("mobile"))},
},
},
})
// GET
res, err := s.Crm.Contacts.Get(ctx, operations.CrmContactsOneRequest{
ID: "contact_123",
ServiceID: sdkgo.Pointer("salesforce"),
})
// UPDATE
res, err := s.Crm.Contacts.Update(ctx, operations.CrmContactsUpdateRequest{
ID: "contact_123",
ServiceID: sdkgo.Pointer("salesforce"),
Contact: components.ContactInput{
FirstName: sdkgo.Pointer("Jane"),
},
})
// DELETE
res, err := s.Crm.Contacts.Delete(ctx, operations.CrmContactsDeleteRequest{
ID: "contact_123",
ServiceID: sdkgo.Pointer("salesforce"),
})Pagination
Use the Next() method on the response. Returns nil when no more pages:
res, err := s.Accounting.Invoices.List(ctx, operations.AccountingInvoicesAllRequest{
ServiceID: sdkgo.Pointer("quickbooks"),
Limit: sdkgo.Pointer(int64(50)),
})
if err != nil {
log.Fatal(err)
}
for {
for _, invoice := range res.GetInvoicesResponse.Data {
fmt.Printf("%s: %v\n", *invoice.Number, *invoice.Total)
}
res, err = res.Next()
if err != nil {
log.Fatal(err)
}
if res == nil {
break
}
}Error Handling
import (
"errors"
"github.com/apideck-libraries/sdk-go/models/apierrors"
)
res, err := s.Crm.Contacts.Get(ctx, req)
if err != nil {
var badReq *apierrors.BadRequestResponse
var unauthorized *apierrors.UnauthorizedResponse
var notFound *apierrors.NotFoundResponse
var paymentReq *apierrors.PaymentRequiredResponse
var unprocessable *apierrors.UnprocessableResponse
switch {
case errors.As(err, &badReq):
log.Printf("Bad request: %s", badReq.Error())
case errors.As(err, &unauthorized):
log.Printf("Unauthorized: %s", unauthorized.Error())
case errors.As(err, ¬Found):
log.Printf("Not found: %s", notFound.Error())
case errors.As(err, &paymentReq):
log.Printf("Payment required: %s", paymentReq.Error())
case errors.As(err, &unprocessable):
log.Printf("Unprocessable: %s", unprocessable.Error())
default:
var apiErr *apierrors.APIError
if errors.As(err, &apiErr) {
log.Printf("API error %d: %s", apiErr.StatusCode, apiErr.Error())
} else {
log.Fatal(err)
}
}
}Retry Configuration
import "github.com/apideck-libraries/sdk-go/retry"
// Global
s := sdkgo.New(
sdkgo.WithRetryConfig(retry.Config{
Strategy: "backoff",
Backoff: &retry.BackoffStrategy{
InitialInterval: 1,
MaxInterval: 50,
Exponent: 1.1,
MaxElapsedTime: 100,
},
RetryConnectionErrors: false,
}),
sdkgo.WithConsumerID("your-consumer-id"),
sdkgo.WithAppID("your-app-id"),
sdkgo.WithSecurity(os.Getenv("APIDECK_API_KEY")),
)
// Per-operation
res, err := s.Crm.Contacts.List(ctx, req,
operations.WithRetries(retry.Config{
Strategy: "backoff",
Backoff: &retry.BackoffStrategy{InitialInterval: 1, MaxInterval: 50, Exponent: 1.1, MaxElapsedTime: 100},
}),
)API Namespaces
| Namespace | Resources |
s.Accounting.* | Invoices, Bills, Payments, Customers, Suppliers, LedgerAccounts, JournalEntries, TaxRates, CreditNotes, PurchaseOrders, BalanceSheet, ProfitAndLoss, and more |
s.Crm.* | Contacts, Companies, Leads, Opportunities, Activities, Notes, Pipelines, Users |
s.Hris.* | Employees, Companies, Departments, Payrolls, TimeOffRequests |
s.FileStorage.* | Files, Folders, Drives, DriveGroups, SharedLinks, UploadSessions |
s.Ats.* | Applicants, Applications, Jobs |
s.Vault.* | Connections, Consumers, Sessions, CustomMappings, Logs |
s.Webhook.* | Webhooks, EventLogs |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

