/hootsuite-pack:hootsuite-ci-integrationfrom hootsuite-pack
Sets up CI/CD for Hootsuite social media management with GitHub Actions, including unit tests with mocked API responses and live integration tests on merge to main.
Ships in hootsuite-pack. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Set up CI/CD for Hootsuite social media management integrations: run unit tests with mocked post scheduling and analytics responses on every PR, validate live API connectivity for social profile queries on merge to main. Hootsuite's API handles scheduled posts, social analytics, and multi-network publishing, so CI pipelines verify scheduling logic, content validation rules, and analytics data aggregation.
# .github/workflows/hootsuite-ci.yml
name: Hootsuite CI
on:
pull_request:
paths: ['src/hootsuite/**', 'tests/**']
push:
branches: [main]
jobs:
unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: '20' }
- run: npm ci
- run: npm test -- --reporter=verbose
integration-tests:
if: github.ref == 'refs/heads/main'
needs: unit-tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: '20' }
- run: npm ci
- run: npm run test:integration
env:
HOOTSUITE_CLIENT_ID: ${{ secrets.HOOTSUITE_CLIENT_ID }}
HOOTSUITE_CLIENT_SECRET: ${{ secrets.HOOTSUITE_CLIENT_SECRET }}
HOOTSUITE_REFRESH_TOKEN: ${{ secrets.HOOTSUITE_REFRESH_TOKEN }}
// tests/hootsuite-service.test.ts
import { describe, it, expect, vi } from 'vitest';
import { schedulePost, getPostAnalytics } from '../src/hootsuite-service';
vi.mock('../src/hootsuite-client', () => ({
HootsuiteClient: vi.fn().mockImplementation(() => ({
createMessage: vi.fn().mockResolvedValue({
id: 'msg_abc123',
state: 'SCHEDULED',
scheduledSendTime: '2026-04-07T14:00:00Z',
socialProfileIds: ['sp_twitter', 'sp_linkedin'],
}),
getAnalytics: vi.fn().mockResolvedValue({
postId: 'msg_abc123',
metrics: { impressions: 1200, clicks: 85, engagement_rate: 0.071 },
}),
listSocialProfiles: vi.fn().mockResolvedValue({
profiles: [
{ id: 'sp_twitter', type: 'TWITTER', name: '@company' },
{ id: 'sp_linkedin', type: 'LINKEDIN', name: 'Company Page' },
],
}),
})),
}));
describe('Hootsuite Service', () => {
it('schedules a multi-network post', async () => {
const result = await schedulePost('Launch day!', {
profiles: ['sp_twitter', 'sp_linkedin'],
scheduledTime: '2026-04-07T14:00:00Z',
});
expect(result.state).toBe('SCHEDULED');
expect(result.socialProfileIds).toHaveLength(2);
});
it('retrieves post analytics', async () => {
const analytics = await getPostAnalytics('msg_abc123');
expect(analytics.metrics.engagement_rate).toBeGreaterThan(0.05);
});
});
// tests/integration/hootsuite.integration.test.ts
import { describe, it, expect } from 'vitest';
const hasCredentials = !!process.env.HOOTSUITE_CLIENT_ID;
describe.skipIf(!hasCredentials)('Hootsuite Live API', () => {
it('lists social profiles via OAuth', async () => {
const tokenRes = await fetch('https://platform.hootsuite.com/oauth2/token', {
method: 'POST',
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
body: new URLSearchParams({
grant_type: 'refresh_token',
client_id: process.env.HOOTSUITE_CLIENT_ID!,
client_secret: process.env.HOOTSUITE_CLIENT_SECRET!,
refresh_token: process.env.HOOTSUITE_REFRESH_TOKEN!,
}),
});
const { access_token } = await tokenRes.json();
const res = await fetch('https://platform.hootsuite.com/v1/socialProfiles', {
headers: { Authorization: `Bearer ${access_token}` },
});
expect(res.status).toBe(200);
});
});
| CI Issue | Cause | Fix |
|---|---|---|
401 Unauthorized | Refresh token expired | Re-authorize OAuth flow and update HOOTSUITE_REFRESH_TOKEN secret |
| Post scheduling fails | Social profile disconnected | Verify profile connections in Hootsuite dashboard |
| Analytics returns empty | Post too recent (< 24h) | Wait for analytics processing or use older post IDs |
| Rate limit (429) | Exceeded 300 requests/min | Add request throttling and reduce parallel test concurrency |
| Duplicate post detected | Same content scheduled twice | Add idempotency key or content hash check before scheduling |
For deployment, see hootsuite-deploy-integration.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
hootsuite, ci-cd, github-actions, social-media, integration-testing, unit-testing
18 skills in this plugin
/hootsuite-common-errorsDiagnose and fix Hootsuite common errors and exceptions.
Use when encountering Hootsuite errors, debugging failed requests,
or troubleshooting integration issues.
Trigger with phrases like "hootsuite error", "fix hootsuite",
"hootsuite not working", "debug hootsuite".
/hootsuite-core-workflow-aExecute Hootsuite primary workflow: Core Workflow A.
Use when implementing primary use case,
building main features, or core integration tasks.
Trigger with phrases like "hootsuite main workflow",
"primary task with hootsuite".
/hootsuite-core-workflow-bExecute Hootsuite secondary workflow: Core Workflow B.
Use when implementing secondary use case,
or complementing primary workflow.
Trigger with phrases like "hootsuite secondary workflow",
"secondary task with hootsuite".
/hootsuite-cost-tuningOptimize Hootsuite costs through tier selection, sampling, and usage monitoring.
Use when analyzing Hootsuite billing, reducing API costs,
or implementing usage monitoring and budget alerts.
Trigger with phrases like "hootsuite cost", "hootsuite billing",
"reduce hootsuite costs", "hootsuite pricing", "hootsuite expensive", "hootsuite budget".
/hootsuite-debug-bundleCollect Hootsuite debug evidence for support tickets and troubleshooting.
Use when encountering persistent issues, preparing support tickets,
or collecting diagnostic information for Hootsuite problems.
Trigger with phrases like "hootsuite debug", "hootsuite support bundle",
"collect hootsuite logs", "hootsuite diagnostic".
/hootsuite-deploy-integrationDeploy Hootsuite integrations to Vercel, Fly.io, and Cloud Run platforms.
Use when deploying Hootsuite-powered applications to production,
configuring platform-specific secrets, or setting up deployment pipelines.
Trigger with phrases like "deploy hootsuite", "hootsuite Vercel",
"hootsuite production deploy", "hootsuite Cloud Run", "hootsuite Fly.io".
npx claudepluginhub flight505/skill-forge --plugin hootsuite-packOther plugins' skills for the same job