API Connector
⚡ UNIQUE FEATURE: Natural language API integration for 100+ popular services. Automatically handles authentication (OAuth, API keys), builds requests, parses responses, and generates integration code. No API docs reading required!
What This Skill Does
Connect to any API using plain English:
- 100+ Pre-configured APIs: GitHub, Slack, Stripe, Twilio, SendGrid, OpenAI, and more
- Natural language requests: "Send a Slack message to #general" → API call
- Auto authentication: Handles OAuth, API keys, JWT automatically
- Response parsing: Extracts relevant data from complex responses
- Code generation: Generates integration code in your language
- Webhook setup: Creates and manages webhooks
- Rate limiting: Automatically handles rate limits and retries
- Testing mode: Test API calls before using in production
Supported Services
Communication
- Slack: Messages, channels, users, files
- Discord: Servers, channels, messages, roles
- Twilio: SMS, voice calls, WhatsApp
- SendGrid: Email campaigns, templates
- Telegram: Bots, messages, groups
Development
- GitHub: Repos, issues, PRs, actions, releases
- GitLab: Projects, merge requests, CI/CD
- Bitbucket: Repositories, pipelines
- Linear: Issues, projects, teams
- Jira: Issues, boards, sprints
Payments
- Stripe: Payments, customers, subscriptions
- PayPal: Transactions, invoices
- Square: Payments, inventory
Cloud & Infrastructure
- AWS: S3, Lambda, EC2, RDS
- Google Cloud: Storage, Compute, Functions
- Azure: VMs, Storage, Functions
- Vercel: Deployments, projects
- Netlify: Sites, builds, functions
Data & Analytics
- Google Analytics: Reports, events, conversions
- Mixpanel: Events, funnels, cohorts
- Segment: Events, identify, track
AI & ML
- OpenAI: GPT, DALL-E, Embeddings
- Anthropic Claude: Messages, conversations
- Hugging Face: Models, inference
- Replicate: Model predictions
CRM & Sales
- Salesforce: Leads, opportunities, accounts
- HubSpot: Contacts, deals, companies
- Intercom: Users, conversations, messages
Productivity
- Notion: Pages, databases, blocks
- Airtable: Bases, records, tables
- Google Workspace: Drive, Sheets, Calendar, Gmail
- Microsoft 365: OneDrive, Excel, Outlook
Social Media
- Twitter/X: Tweets, timelines, users
- LinkedIn: Posts, profiles, connections
- Instagram: Posts, stories, insights
- YouTube: Videos, playlists, analytics
Instructions
Phase 1: Service Discovery
Identify API:
Ask user:
- Which service to connect to?
- What action to perform?
- Authentication details (if not configured)
Check Configuration:
# Load API configs from .api-connector-config.yml
Use Read to check if API is already configured
Setup Authentication (if needed):
For API Key auth:
Ask user for API key
Securely store in config (or use environment variable)
For OAuth:
1. Generate OAuth URL
2. User authorizes in browser
3. Receive callback with code
4. Exchange for access token
5. Store tokens securely
For JWT:
Request credentials
Generate JWT token
Store for subsequent requests
Phase 2: Natural Language to API Call
When user makes a request:
Parse Intent:
"Send a Slack message to #general saying Hello"
Parsed:
- Service: Slack
- Action: Send message
- Channel: #general
- Content: "Hello"
Build API Request:
Example 1: Slack Message
curl -X POST https://slack.com/api/chat.postMessage \
-H "Authorization: Bearer ${SLACK_TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"channel": "#general",
"text": "Hello"
}'
Example 2: GitHub Create Issue
curl -X POST https://api.github.com/repos/owner/repo/issues \
-H "Authorization: token ${GITHUB_TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"title": "Bug: App crashes on startup",
"body": "Description...",
"labels": ["bug"]
}'
Example 3: Stripe Create Payment
curl -X POST https://api.stripe.com/v1/payment_intents \
-u "${STRIPE_SECRET_KEY}:" \
-d amount=2000 \
-d currency=usd \
-d "payment_method_types[]"=card
Execute Request:
Use Bash to make curl request
Or use WebFetch for simple GET requests
Phase 3: Response Handling
Parse Response:
// Raw GitHub API response
{
"id": 123456,
"number": 42,
"title": "Bug: App crashes",
"html_url": "https://github.com/owner/repo/issues/42",
"state": "open",
"created_at": "2025-01-13T10:30:00Z",
...100 more fields
}
Extract Relevant Data:
✅ Issue created successfully!
Issue #42: Bug: App crashes
URL: https://github.com/owner/repo/issues/42
Status: Open
Handle Errors:
❌ API Error: Rate limit exceeded
Details:
- Limit: 5000 requests/hour
- Remaining: 0
- Resets at: 2025-01-13 11:00:00 UTC
Suggestion: Retry in 15 minutes or use a different token
Phase 4: Code Generation
Offer to generate integration code:
Python:
import requests
def send_slack_message(channel: str, text: str) -> dict:
"""Send a message to a Slack channel."""
url = "https://slack.com/api/chat.postMessage"
headers = {
"Authorization": f"Bearer {os.environ['SLACK_TOKEN']}",
"Content-Type": "application/json"
}
data = {
"channel": channel,
"text": text
}
response = requests.post(url, headers=headers, json=data)
response.raise_for_status()
return response.json()
# Usage
result = send_slack_message("#general", "Hello from Python!")
print(f"Message sent: {result['ts']}")
JavaScript:
async function sendSlackMessage(channel, text) {
const response = await fetch('https://slack.com/api/chat.postMessage', {
method: 'POST',
headers: {
'Authorization': `Bearer ${process.env.SLACK_TOKEN}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({ channel, text })
});
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}
return await response.json();
}
// Usage
const result = await sendSlackMessage('#general', 'Hello from JavaScript!');
console.log(`Message sent: ${result.ts}`);
Examples
Example 1: GitHub Automation
User: "Create a GitHub issue in my-repo about fixing the login bug"
Workflow:
- Parse: repo=my-repo, action=create issue, title=about login bug
- Build request with GitHub API
- Execute: POST /repos/owner/my-repo/issues
- Show result: "Issue #42 created: https://github.com/..."
- Offer code generation
Result:
✅ GitHub issue created!
Issue #42: Fix login bug
Repository: owner/my-repo
URL: https://github.com/owner/my-repo/issues/42
Would you like me to:
1. Generate Python/JS code for this
2. Set up a webhook to track this issue
3. Create a similar issue in another repo
Example 2: Multi-Service Workflow
User: "When a new Stripe payment succeeds, send a thank you email via SendGrid and log it to Airtable"
Workflow:
- Setup Stripe webhook
- Generate webhook handler code:
@app.route('/webhook/stripe', methods=['POST'])
def stripe_webhook():
event = stripe.Webhook.construct_event(
request.data, request.headers['STRIPE_SIGNATURE'],
webhook_secret
)
if event['type'] == 'payment_intent.succeeded':
payment = event['data']['object']
email = payment['receipt_email']
# Send thank you email
send_email_sendgrid(
to=email,
subject="Thank you for your purchase!",
body="Your payment has been received."
)
# Log to Airtable
airtable_create_record('Payments', {
'Customer': email,
'Amount': payment['amount'] / 100,
'Date': datetime.now()
})
return {'status': 'success'}
Example 3: Bulk Operations
User: "Get all open PRs from my GitHub repos and send a summary to Slack"
Workflow:
- Fetch repos: GET /user/repos
- For each repo: GET /repos/{owner}/{repo}/pulls?state=open
- Aggregate results
- Format message
- Send to Slack
Result:
📊 Open Pull Requests Summary
my-api: 3 open PRs
- #42: Add authentication (2 days old)
- #43: Update dependencies (5 days old)
- #44: Fix bug in login (1 day old)
my-frontend: 1 open PR
- #15: Redesign homepage (3 days old)
Total: 4 open PRs across 2 repos
Posted to #engineering on Slack ✅
Configuration
.api-connector-config.yml:
services:
slack:
auth_type: oauth
token: ${SLACK_TOKEN}
workspace: my-workspace
github:
auth_type: token
token: ${GITHUB_TOKEN}
default_owner: my-org
stripe:
auth_type: api_key
secret_key: ${STRIPE_SECRET_KEY}
publishable_key: ${STRIPE_PUBLISHABLE_KEY}
sendgrid:
auth_type: api_key
api_key: ${SENDGRID_API_KEY}
from_email: noreply@example.com
defaults:
timeout: 30s
retry_count: 3
rate_limit_handling: auto
webhooks:
base_url: https://myapp.com/webhooks
secret: ${WEBHOOK_SECRET}
Advanced Features
1. Batch Operations
User: "Star all repos from @anthropics on GitHub"
Skill:
1. List repos: GET /users/anthropics/repos
2. For each repo: PUT /user/starred/{owner}/{repo}
3. Show progress
4. Handle rate limits
2. Webhook Management
# Create webhook
claude api webhook create github \
--url https://myapp.com/webhook \
--events push,pull_request
# List webhooks
claude api webhook list github
# Test webhook
claude api webhook test github webhook-id
3. API Explorer
# Discover available endpoints
claude api explore github
# Show endpoint documentation
claude api docs github repos.create
4. Request Builder
Interactive mode for complex APIs:
claude api build stripe payment
1. What type of operation? [create/read/update/delete] create
2. Resource? payment_intent
3. Amount? 5000
4. Currency? usd
5. Payment methods? card
6. Save customer? yes
Generated request:
[Shows curl command]
Execute now? [yes/no]
Tool Requirements
- Bash: Execute API calls with curl
- Read: Load configuration and credentials
- Write: Save responses and generated code
- WebFetch: Simple GET requests
Security
- Never logs sensitive data (tokens, passwords)
- Uses environment variables for secrets
- Validates SSL certificates
- Sanitizes request/response logs
Best Practices
- Store secrets in environment variables: Never commit API keys
- Test before production: Use testing endpoints when available
- Handle rate limits: Respect API limits
- Error handling: Always check response status
- Logging: Log API calls for debugging
Limitations
- Rate limits depend on your API plan
- Complex OAuth flows may need manual intervention
- Some APIs require IP whitelisting
- Webhook setup requires public URL
Related Skills
Changelog
Version 1.0.0 (2025-01-13)
- Initial release
- 100+ API integrations
- OAuth, API key, JWT auth
- Code generation (Python, JavaScript)
- Webhook support
- Natural language requests
Contributing
Help expand API support:
- Add new services
- Improve error messages
- Add more code examples
- Create integration templates
License
Apache License 2.0 - See LICENSE
Author
GLINCKER Team
🌟 Connect to any API without reading documentation - just ask!
1---2name: api-connector3description: Connect to 100+ popular APIs using natural language - automatic authentication, request building, and response parsing4license: Apache-2.05---67# API Connector89**⚡ UNIQUE FEATURE**: Natural language API integration for 100+ popular services. Automatically handles authentication (OAuth, API keys), builds requests, parses responses, and generates integration code. No API docs reading required!1011## What This Skill Does1213Connect to any API using plain English:1415- **100+ Pre-configured APIs**: GitHub, Slack, Stripe, Twilio, SendGrid, OpenAI, and more16- **Natural language requests**: "Send a Slack message to #general" → API call17- **Auto authentication**: Handles OAuth, API keys, JWT automatically18- **Response parsing**: Extracts relevant data from complex responses19- **Code generation**: Generates integration code in your language20- **Webhook setup**: Creates and manages webhooks21- **Rate limiting**: Automatically handles rate limits and retries22- **Testing mode**: Test API calls before using in production2324## Supported Services2526### Communication27- **Slack**: Messages, channels, users, files28- **Discord**: Servers, channels, messages, roles29- **Twilio**: SMS, voice calls, WhatsApp30- **SendGrid**: Email campaigns, templates31- **Telegram**: Bots, messages, groups3233### Development34- **GitHub**: Repos, issues, PRs, actions, releases35- **GitLab**: Projects, merge requests, CI/CD36- **Bitbucket**: Repositories, pipelines37- **Linear**: Issues, projects, teams38- **Jira**: Issues, boards, sprints3940### Payments41- **Stripe**: Payments, customers, subscriptions42- **PayPal**: Transactions, invoices43- **Square**: Payments, inventory4445### Cloud & Infrastructure46- **AWS**: S3, Lambda, EC2, RDS47- **Google Cloud**: Storage, Compute, Functions48- **Azure**: VMs, Storage, Functions49- **Vercel**: Deployments, projects50- **Netlify**: Sites, builds, functions5152### Data & Analytics53- **Google Analytics**: Reports, events, conversions54- **Mixpanel**: Events, funnels, cohorts55- **Segment**: Events, identify, track5657### AI & ML58- **OpenAI**: GPT, DALL-E, Embeddings59- **Anthropic Claude**: Messages, conversations60- **Hugging Face**: Models, inference61- **Replicate**: Model predictions6263### CRM & Sales64- **Salesforce**: Leads, opportunities, accounts65- **HubSpot**: Contacts, deals, companies66- **Intercom**: Users, conversations, messages6768### Productivity69- **Notion**: Pages, databases, blocks70- **Airtable**: Bases, records, tables71- **Google Workspace**: Drive, Sheets, Calendar, Gmail72- **Microsoft 365**: OneDrive, Excel, Outlook7374### Social Media75- **Twitter/X**: Tweets, timelines, users76- **LinkedIn**: Posts, profiles, connections77- **Instagram**: Posts, stories, insights78- **YouTube**: Videos, playlists, analytics7980## Instructions8182### Phase 1: Service Discovery83841. **Identify API**:85 ```86 Ask user:87 - Which service to connect to?88 - What action to perform?89 - Authentication details (if not configured)90 ```91922. **Check Configuration**:93 ```bash94 # Load API configs from .api-connector-config.yml95 Use Read to check if API is already configured96 ```97983. **Setup Authentication** (if needed):99100 **For API Key auth**:101 ```102 Ask user for API key103 Securely store in config (or use environment variable)104 ```105106 **For OAuth**:107 ```bash108 1. Generate OAuth URL109 2. User authorizes in browser110 3. Receive callback with code111 4. Exchange for access token112 5. Store tokens securely113 ```114115 **For JWT**:116 ```117 Request credentials118 Generate JWT token119 Store for subsequent requests120 ```121122### Phase 2: Natural Language to API Call123124When user makes a request:1251261. **Parse Intent**:127 ```128 "Send a Slack message to #general saying Hello"129130 Parsed:131 - Service: Slack132 - Action: Send message133 - Channel: #general134 - Content: "Hello"135 ```1361372. **Build API Request**:138139 **Example 1: Slack Message**140 ```bash141 curl -X POST https://slack.com/api/chat.postMessage \142 -H "Authorization: Bearer ${SLACK_TOKEN}" \143 -H "Content-Type: application/json" \144 -d '{145 "channel": "#general",146 "text": "Hello"147 }'148 ```149150 **Example 2: GitHub Create Issue**151 ```bash152 curl -X POST https://api.github.com/repos/owner/repo/issues \153 -H "Authorization: token ${GITHUB_TOKEN}" \154 -H "Content-Type: application/json" \155 -d '{156 "title": "Bug: App crashes on startup",157 "body": "Description...",158 "labels": ["bug"]159 }'160 ```161162 **Example 3: Stripe Create Payment**163 ```bash164 curl -X POST https://api.stripe.com/v1/payment_intents \165 -u "${STRIPE_SECRET_KEY}:" \166 -d amount=2000 \167 -d currency=usd \168 -d "payment_method_types[]"=card169 ```1701713. **Execute Request**:172 ```bash173 Use Bash to make curl request174 Or use WebFetch for simple GET requests175 ```176177### Phase 3: Response Handling1781791. **Parse Response**:180 ```json181 // Raw GitHub API response182 {183 "id": 123456,184 "number": 42,185 "title": "Bug: App crashes",186 "html_url": "https://github.com/owner/repo/issues/42",187 "state": "open",188 "created_at": "2025-01-13T10:30:00Z",189 ...100 more fields190 }191 ```1921932. **Extract Relevant Data**:194 ```195 ✅ Issue created successfully!196197 Issue #42: Bug: App crashes198 URL: https://github.com/owner/repo/issues/42199 Status: Open200 ```2012023. **Handle Errors**:203 ```204 ❌ API Error: Rate limit exceeded205206 Details:207 - Limit: 5000 requests/hour208 - Remaining: 0209 - Resets at: 2025-01-13 11:00:00 UTC210211 Suggestion: Retry in 15 minutes or use a different token212 ```213214### Phase 4: Code Generation215216Offer to generate integration code:217218**Python**:219```python220import requests221222def send_slack_message(channel: str, text: str) -> dict:223 """Send a message to a Slack channel."""224 url = "https://slack.com/api/chat.postMessage"225 headers = {226 "Authorization": f"Bearer {os.environ['SLACK_TOKEN']}",227 "Content-Type": "application/json"228 }229 data = {230 "channel": channel,231 "text": text232 }233234 response = requests.post(url, headers=headers, json=data)235 response.raise_for_status()236 return response.json()237238# Usage239result = send_slack_message("#general", "Hello from Python!")240print(f"Message sent: {result['ts']}")241```242243**JavaScript**:244```javascript245async function sendSlackMessage(channel, text) {246 const response = await fetch('https://slack.com/api/chat.postMessage', {247 method: 'POST',248 headers: {249 'Authorization': `Bearer ${process.env.SLACK_TOKEN}`,250 'Content-Type': 'application/json'251 },252 body: JSON.stringify({ channel, text })253 });254255 if (!response.ok) {256 throw new Error(`HTTP error! status: ${response.status}`);257 }258259 return await response.json();260}261262// Usage263const result = await sendSlackMessage('#general', 'Hello from JavaScript!');264console.log(`Message sent: ${result.ts}`);265```266267## Examples268269### Example 1: GitHub Automation270271**User**: "Create a GitHub issue in my-repo about fixing the login bug"272273**Workflow**:2741. Parse: repo=my-repo, action=create issue, title=about login bug2752. Build request with GitHub API2763. Execute: POST /repos/owner/my-repo/issues2774. Show result: "Issue #42 created: https://github.com/..."2785. Offer code generation279280**Result**:281```282✅ GitHub issue created!283284Issue #42: Fix login bug285Repository: owner/my-repo286URL: https://github.com/owner/my-repo/issues/42287288Would you like me to:2891. Generate Python/JS code for this2902. Set up a webhook to track this issue2913. Create a similar issue in another repo292```293294### Example 2: Multi-Service Workflow295296**User**: "When a new Stripe payment succeeds, send a thank you email via SendGrid and log it to Airtable"297298**Workflow**:2991. Setup Stripe webhook3002. Generate webhook handler code:301 ```python302 @app.route('/webhook/stripe', methods=['POST'])303 def stripe_webhook():304 event = stripe.Webhook.construct_event(305 request.data, request.headers['STRIPE_SIGNATURE'],306 webhook_secret307 )308309 if event['type'] == 'payment_intent.succeeded':310 payment = event['data']['object']311 email = payment['receipt_email']312313 # Send thank you email314 send_email_sendgrid(315 to=email,316 subject="Thank you for your purchase!",317 body="Your payment has been received."318 )319320 # Log to Airtable321 airtable_create_record('Payments', {322 'Customer': email,323 'Amount': payment['amount'] / 100,324 'Date': datetime.now()325 })326327 return {'status': 'success'}328 ```329330### Example 3: Bulk Operations331332**User**: "Get all open PRs from my GitHub repos and send a summary to Slack"333334**Workflow**:3351. Fetch repos: GET /user/repos3362. For each repo: GET /repos/{owner}/{repo}/pulls?state=open3373. Aggregate results3384. Format message3395. Send to Slack340341**Result**:342```343📊 Open Pull Requests Summary344345my-api: 3 open PRs346- #42: Add authentication (2 days old)347- #43: Update dependencies (5 days old)348- #44: Fix bug in login (1 day old)349350my-frontend: 1 open PR351- #15: Redesign homepage (3 days old)352353Total: 4 open PRs across 2 repos354355Posted to #engineering on Slack ✅356```357358## Configuration359360`.api-connector-config.yml`:361362```yaml363services:364 slack:365 auth_type: oauth366 token: ${SLACK_TOKEN}367 workspace: my-workspace368369 github:370 auth_type: token371 token: ${GITHUB_TOKEN}372 default_owner: my-org373374 stripe:375 auth_type: api_key376 secret_key: ${STRIPE_SECRET_KEY}377 publishable_key: ${STRIPE_PUBLISHABLE_KEY}378379 sendgrid:380 auth_type: api_key381 api_key: ${SENDGRID_API_KEY}382 from_email: noreply@example.com383384defaults:385 timeout: 30s386 retry_count: 3387 rate_limit_handling: auto388389webhooks:390 base_url: https://myapp.com/webhooks391 secret: ${WEBHOOK_SECRET}392```393394## Advanced Features395396### 1. Batch Operations397398```399User: "Star all repos from @anthropics on GitHub"400401Skill:4021. List repos: GET /users/anthropics/repos4032. For each repo: PUT /user/starred/{owner}/{repo}4043. Show progress4054. Handle rate limits406```407408### 2. Webhook Management409410```bash411# Create webhook412claude api webhook create github \413 --url https://myapp.com/webhook \414 --events push,pull_request415416# List webhooks417claude api webhook list github418419# Test webhook420claude api webhook test github webhook-id421```422423### 3. API Explorer424425```bash426# Discover available endpoints427claude api explore github428429# Show endpoint documentation430claude api docs github repos.create431```432433### 4. Request Builder434435Interactive mode for complex APIs:436```437claude api build stripe payment4384391. What type of operation? [create/read/update/delete] create4402. Resource? payment_intent4413. Amount? 50004424. Currency? usd4435. Payment methods? card4446. Save customer? yes445446Generated request:447[Shows curl command]448449Execute now? [yes/no]450```451452## Tool Requirements453454- **Bash**: Execute API calls with curl455- **Read**: Load configuration and credentials456- **Write**: Save responses and generated code457- **WebFetch**: Simple GET requests458459## Security460461- Never logs sensitive data (tokens, passwords)462- Uses environment variables for secrets463- Validates SSL certificates464- Sanitizes request/response logs465466## Best Practices4674681. **Store secrets in environment variables**: Never commit API keys4692. **Test before production**: Use testing endpoints when available4703. **Handle rate limits**: Respect API limits4714. **Error handling**: Always check response status4725. **Logging**: Log API calls for debugging473474## Limitations475476- Rate limits depend on your API plan477- Complex OAuth flows may need manual intervention478- Some APIs require IP whitelisting479- Webhook setup requires public URL480481## Related Skills482483- [workflow-composer](../../automation/workflow-composer/SKILL.md) - Chain API calls484- [database-query](../database-query/SKILL.md) - Store API results485- [slack-bridge](../slack-bridge/SKILL.md) - Advanced Slack integration486487## Changelog488489### Version 1.0.0 (2025-01-13)490- Initial release491- 100+ API integrations492- OAuth, API key, JWT auth493- Code generation (Python, JavaScript)494- Webhook support495- Natural language requests496497## Contributing498499Help expand API support:500- Add new services501- Improve error messages502- Add more code examples503- Create integration templates504505## License506507Apache License 2.0 - See [LICENSE](../../../LICENSE)508509## Author510511**GLINCKER Team**512- GitHub: [@GLINCKER](https://github.com/GLINCKER)513- Repository: [claude-code-marketplace](https://github.com/GLINCKER/claude-code-marketplace)514515---516517**🌟 Connect to any API without reading documentation - just ask!**