writing-skills
writing-skills
Use when creating new skills, editing existing skills, or verifying skills work before deployment
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".
Independent GitHub snapshot · Automated classification · Original documentation governs
name: hootsuite-deploy-integration description: 'Deploy 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".
' allowed-tools: Read, Write, Edit, Bash(vercel:), Bash(fly:), Bash(gcloud:*) version: 1.6.0 license: MIT author: Jeremy Longshore jeremy@intentsolutions.io tags:
Deploy Hootsuite social media management backends. Key consideration: OAuth refresh tokens must persist across deployments — use a database or key-value store, not environment variables.
// api/schedule.ts — Vercel serverless
import type { VercelRequest, VercelResponse } from '@vercel/node';
export default async function handler(req: VercelRequest, res: VercelResponse) {
if (req.method !== 'POST') return res.status(405).end();
// Get token from persistent store (not env var — tokens rotate)
const token = await getStoredToken();
const response = await fetch('https://platform.hootsuite.com/v1/messages', {
method: 'POST',
headers: { 'Authorization': `Bearer ${token}`, 'Content-Type': 'application/json' },
body: JSON.stringify(req.body),
});
const result = await response.json();
res.json(result);
}
vercel env add HOOTSUITE_CLIENT_ID production
vercel env add HOOTSUITE_CLIENT_SECRET production
vercel --prod
// Use Redis, database, or KV store for token persistence
// Tokens refresh every ~1 hour and refresh_token changes each time
import { kv } from '@vercel/kv';
async function getStoredToken(): Promise<string> {
let token = await kv.get('hootsuite:access_token');
const expiresAt = await kv.get('hootsuite:expires_at') as number;
if (!token || Date.now() > expiresAt - 60000) {
const refreshToken = await kv.get('hootsuite:refresh_token') as string;
const newTokens = await refreshHootsuiteToken(refreshToken);
await kv.set('hootsuite:access_token', newTokens.access_token);
await kv.set('hootsuite:refresh_token', newTokens.refresh_token);
await kv.set('hootsuite:expires_at', Date.now() + newTokens.expires_in * 1000);
token = newTokens.access_token;
}
return token as string;
}
Produce a deployment receipt with artifact digest, environment, canary profile, health/quota/draft assertions, owner approval, rollout state, and rollback reference. Exclude post copy, media, handles, and secrets.
Halt for unknown profile/destination, missing approval, public-post path in a canary, unbounded retry, or leaked copy in telemetry. Cancel/revert the schedule and restore the previous revision.
artifact=sha256:opaque; env=staging; canary=sandbox-brand; health=pass; draft=pass; public_posts=0; rollback=release-r31 supports controlled promotion.
For webhooks, see hootsuite-webhooks-events.