Agent Skills › htekdev/vidpipe

htekdev/vidpipe

GitHub

管理Late.co社交媒体排期API,支持列出、重排、批量删除和同步帖子。用于清理队列、调整发布时间、检查API状态或故障排查。需配置LATE_API_KEY并遵循Bearer认证规范。

4 skills 201

Install All Skills

npx skills add htekdev/vidpipe --all -g -y
More Options

List skills in collection

npx skills add htekdev/vidpipe --list

Skills in Collection (4)

管理Late.co社交媒体排期API,支持列出、重排、批量删除和同步帖子。用于清理队列、调整发布时间、检查API状态或故障排查。需配置LATE_API_KEY并遵循Bearer认证规范。
管理已排期的帖子 清理Late队列 重新安排帖子时间 检查Late API状态 排查Late API问题
.github/skills/late-api/SKILL.md
npx skills add htekdev/vidpipe --skill late-api -g -y
SKILL.md
Frontmatter
{
    "name": "late-api",
    "description": "Manage Late.co social media scheduling API — list, reschedule, bulk delete, and sync scheduled posts. Use this skill when asked to manage scheduled posts, clean up the Late queue, reschedule posts, inspect Late API state, or troubleshoot Late API issues."
}

Late API Management Skill

Operational workflows for managing scheduled social media posts via the Late.co API (https://getlate.dev/api/v1). This skill helps you list, reschedule, bulk delete, and sync posts when the posting schedule changes or issues arise.

Prerequisites

  • LATE_API_KEY environment variable set (Bearer token, format: sk_...)
  • The project's schedule.json in the repo root defines posting time slots per platform

Authentication

All requests use Bearer auth:

curl -H "Authorization: Bearer $env:LATE_API_KEY" https://getlate.dev/api/v1/posts

API Base URL

https://getlate.dev/api/v1

API Reference

Posts

Method Endpoint Description
GET /v1/posts List posts. Supports query params: status (draft/scheduled/published/failed), platform, profileId, dateFrom, dateTo, createdBy, includeHidden
POST /v1/posts Create a post. Fields: content, platforms (array of {platform, accountId}), scheduledFor (ISO datetime), timezone, isDraft, publishNow, mediaItems, queuedFromProfile, queueId, tags, hashtags, tiktokSettings, platformSpecificData
GET /v1/posts/{postId} Get a single post by ID
PUT /v1/posts/{postId} Update a post. Only draft/scheduled/failed/partial posts can be edited. Fields: content, scheduledFor, tiktokSettings
DELETE /v1/posts/{postId} Delete a post. Published posts cannot be deleted. Refunds upload quota
POST /v1/posts/bulk-upload Bulk upload from CSV. Optional dryRun query param

Accounts

Method Endpoint Description
GET /v1/accounts List connected social media accounts

Profiles

Method Endpoint Description
GET /v1/profiles List profiles
POST /v1/profiles Create a profile

Queue (Late's built-in scheduling)

Method Endpoint Description
GET /v1/queue/slots?profileId=X Get queue schedules for a profile. Add all=true for all queues
POST /v1/queue/slots Create a new queue. Body: profileId, name, timezone, slots, active
PUT /v1/queue/slots Update queue. Body: profileId, queueId, timezone, slots, reshuffleExisting (auto-reschedule existing posts)
DELETE /v1/queue/slots?profileId=X&queueId=Y Delete a queue
GET /v1/queue/preview?profileId=X&count=N Preview upcoming N queue slots
GET /v1/queue/next-slot?profileId=X Preview next available slot (informational only — do NOT use with scheduledFor)

Media

Method Endpoint Description
POST /v1/media/presign Get presigned upload URL. Body: {filename, contentType}{uploadUrl, publicUrl, key, expiresIn}
PUT {uploadUrl} Upload file bytes to the presigned URL with Content-Type header

Analytics

Method Endpoint Description
GET /v1/analytics Get post performance metrics and engagement data

Publishing Logs

Method Endpoint Description
GET /v1/logs View publishing attempt logs (API endpoint, status, request/response, retries). Retained 7 days

Webhooks

Method Endpoint Description
GET /v1/webhooks List configured webhooks
POST /v1/webhooks Create a webhook. Events: post.scheduled, post.published, post.failed, post.partial, account.connected, account.disconnected, message.received

Rate Limits

Plan Requests/min
Free 60
Build 120
Accelerate 600
Unlimited 1,200

Additional limits:

  • Velocity: 15 posts/hour/account
  • Daily: Platform-specific (X: 20, Pinterest: 25, Instagram/Facebook: 100, Threads: 250, others: 50)
  • Cooldown: Escalating backoff on repeated errors (10min → 20min → 40min → 24h)

Project-Specific Context

schedule.json Format

The project's schedule.json (repo root) defines local posting time slots:

{
  "timezone": "America/Chicago",
  "platforms": {
    "linkedin": {
      "slots": [
        { "days": ["tue", "wed"], "time": "08:00", "label": "Morning thought leadership" }
      ],
      "avoidDays": ["sat", "sun"]
    }
  }
}

Existing LateApiClient (src/L2-clients/late/lateApi.ts)

The project has a TypeScript client with these methods:

  • listProfiles()LateProfile[]
  • listAccounts()LateAccount[]
  • getScheduledPosts(platform?)LatePost[]
  • getDraftPosts(platform?)LatePost[]
  • createPost(params)LatePost
  • updatePost(postId, updates)LatePost
  • deletePost(postId)void
  • uploadMedia(filePath){url, type}
  • validateConnection(){valid, profileName?, error?}
  • listQueues(profileId, all?) — List all queues for a profile
  • createQueue(params) — Create a new queue
  • updateQueue(params) — Update queue (supports reshuffleExisting)
  • deleteQueue(profileId, queueId) — Delete a queue
  • previewQueue(profileId, queueId?, count?) — Preview upcoming slot times
  • getNextQueueSlot(profileId, queueId?) — Get next available slot

Approved posts use queue-first scheduling: VidPipe resolves queueId via {platform}-{clipType} naming, sends queuedFromProfile + queueId, and relies on Late FIFO order. Manual scheduledFor is fallback-only.

Local Queue (src/services/postStore.ts)

Published posts are tracked locally in publish-queue/ (pending) and published/ (done). Each item has metadata.json with latePostId, scheduledFor, platform, accountId, status.

Scheduler (src/services/scheduler.ts)

findNextSlot(platform) finds the next available time slot by:

  1. Loading schedule.json config
  2. Fetching booked slots from Late API + local published items
  3. Generating candidates in 14-day chunks, sorted chronologically
  4. Returning the first unbooked candidate

Operational Workflows

1. List All Scheduled Posts

curl -s -H "Authorization: Bearer $env:LATE_API_KEY" \
  "https://getlate.dev/api/v1/posts?status=scheduled" | python -m json.tool

Filter by platform:

curl -s -H "Authorization: Bearer $env:LATE_API_KEY" \
  "https://getlate.dev/api/v1/posts?status=scheduled&platform=linkedin"

Filter by date range:

curl -s -H "Authorization: Bearer $env:LATE_API_KEY" \
  "https://getlate.dev/api/v1/posts?status=scheduled&dateFrom=2026-02-01&dateTo=2026-03-01"

2. Reschedule a Single Post

curl -s -X PUT -H "Authorization: Bearer $env:LATE_API_KEY" \
  -H "Content-Type: application/json" \
  "https://getlate.dev/api/v1/posts/{postId}" \
  -d '{"scheduledFor": "2026-02-20T08:00:00-06:00"}'

3. Bulk Reschedule All Posts (Schedule Change)

When schedule.json changes, use this workflow:

  1. Read the new schedule from schedule.json
  2. Fetch all scheduled posts from Late API
  3. For each post, compute the new optimal time slot based on the updated schedule
  4. Update each post with the new scheduledFor datetime via PUT /v1/posts/{postId}
  5. Report what changed (old time → new time for each post)

Important: Always confirm with the user before executing bulk reschedule. Show them the proposed changes first.

Recommended: Use vidpipe sync-queues --reshuffle for automated bulk reschedule via Late queue system. Use vidpipe realign --queue or vidpipe reschedule --queue for queue-based alternatives.

4. Bulk Delete Scheduled Posts

# First list to confirm what will be deleted
curl -s -H "Authorization: Bearer $env:LATE_API_KEY" \
  "https://getlate.dev/api/v1/posts?status=scheduled&platform=twitter"

# Then delete each post by ID (published posts CANNOT be deleted)
curl -s -X DELETE -H "Authorization: Bearer $env:LATE_API_KEY" \
  "https://getlate.dev/api/v1/posts/{postId}"

Important: Always list and confirm with the user before deleting. Show post content previews.

5. Sync Local Queue with Late API

Compare local published/ metadata with Late API state:

  1. Read all local published items from recordings/*/publish-queue/ and published/
  2. For each item with a latePostId, fetch the Late post via GET /v1/posts/{postId}
  3. Report mismatches:
    • Orphaned in Late: Posts in Late API with no matching local item
    • Orphaned locally: Local items with latePostId that no longer exists in Late
    • Schedule mismatch: scheduledFor differs between local metadata and Late API

6. Validate Late API Connection

curl -s -H "Authorization: Bearer $env:LATE_API_KEY" \
  "https://getlate.dev/api/v1/profiles"

If this returns profiles, the connection is valid. If 401, the API key is invalid or expired.

7. View Publishing Logs

curl -s -H "Authorization: Bearer $env:LATE_API_KEY" \
  "https://getlate.dev/api/v1/logs"

Shows publishing attempts with platform API endpoint, HTTP status, request/response bodies, and retry info. Logs are retained for 7 days.

8. Inspect Connected Accounts

curl -s -H "Authorization: Bearer $env:LATE_API_KEY" \
  "https://getlate.dev/api/v1/accounts" | python -m json.tool

Returns all connected social accounts with _id, platform, username, displayName, isActive, profileId.

9. Update Late Queue Slots (with auto-reshuffle)

If you want Late's built-in queue (not the local schedule.json) to reschedule existing posts:

curl -s -X PUT -H "Authorization: Bearer $env:LATE_API_KEY" \
  -H "Content-Type: application/json" \
  "https://getlate.dev/api/v1/queue/slots" \
  -d '{
    "profileId": "PROFILE_ID",
    "timezone": "America/Chicago",
    "slots": [
      {"day": "tue", "time": "08:00"},
      {"day": "wed", "time": "12:00"}
    ],
    "reshuffleExisting": true
  }'

The reshuffleExisting: true flag tells Late to automatically move existing queued posts to match the new slots.


Safety Rules

  1. Never delete published posts — the API will reject it anyway (400 error)
  2. Always list before bulk operations — show the user what will be affected
  3. Confirm destructive actions — ask the user to approve before deleting or rescheduling multiple posts
  4. Use dryRun for bulk uploads — test with ?dryRun=true query param first
  5. Respect rate limits — add delays between bulk API calls (60 req/min on free plan)
  6. Handle 429 responses — check Retry-After header and wait before retrying

Troubleshooting

Problem Cause Fix
401 Unauthorized Invalid or expired API key Check LATE_API_KEY env var, regenerate key at getlate.dev settings
429 Rate Limited Too many requests Wait for Retry-After period, add delays between bulk calls
400 on DELETE Trying to delete a published post Published posts cannot be deleted — only draft/scheduled/failed
400 on PUT Trying to update a published post Published/publishing/cancelled posts cannot be edited
Empty posts list Wrong status filter or no posts exist Try without status filter, check platform filter matches account
Media upload fails Presigned URL expired (1 hour) Request a new presigned URL and retry upload
Duplicate 409 Same content posted to same account within 24h Change content or wait 24 hours
Account cooldown Repeated publishing errors Wait for cooldown to expire (escalating: 10min → 24h)
用于将 npm 包发布到注册表的完整工作流。涵盖版本检查、构建测试、通过 Playwright 创建带 2FA 豁免的细粒度访问令牌、配置认证、执行发布及清理本地凭证,并提供故障排除指南。
用户要求发布或部署 npm 包 需要处理 npm 包的版本管理和发布流程
.github/skills/npm-publish/SKILL.md
npx skills add htekdev/vidpipe --skill npm-publish -g -y
SKILL.md
Frontmatter
{
    "name": "npm-publish",
    "description": "Publish packages to npm registry. Use this skill when asked to publish, release, or deploy a package to npm. Handles granular access token creation, authentication, and publishing with 2FA bypass."
}

npm Publish Skill

Complete workflow for publishing packages to the npm registry, including granular access token creation via the npmjs.com web UI.

Prerequisites

  • npm account with package write access
  • Playwright browser tool available for token creation
  • Package must be built (npm run build) and tests passing (npm test)

Publishing Workflow

Step 1: Check if already published

npm view <package-name> version

If the package/version already exists, bump the version in package.json before proceeding.

Step 2: Build and test

npm run build && npm test

Ensure there are no build errors and all tests pass before publishing.

Step 3: Create granular access token (if needed)

If you don't have a valid token:

  1. Navigate to https://www.npmjs.com/settings/~/tokens using Playwright browser
  2. If not logged in, the user must authenticate (npm sends email OTP)
  3. Click "Generate New Token"
  4. Fill in:
    • Token name: <package-name>-publish
    • Bypass 2FA: Check the checkbox
    • Packages and scopes → Permissions: "Read and write"
    • Select packages: "All packages" radio button
    • Expiration: 90 days (maximum for write tokens)
  5. Click "Generate token"
  6. Copy the token from the success page (starts with npm_)

Step 4: Configure and publish

npm config set //registry.npmjs.org/:_authToken=<TOKEN>
npm publish --access public

Step 5: Verify publication

npm view <package-name> version

Confirm the published version matches what you expected.

Step 6: Clean up token from local config

npm config delete //registry.npmjs.org/:_authToken

This removes the token from your local .npmrc so it is not accidentally leaked.

Important Notes

  • npm granular tokens with write access have a max 90-day expiry
  • Bypass 2FA checkbox MUST be enabled for CLI publishing to work
  • The "All packages" radio must be explicitly selected (it's not selected by default despite appearing so)
  • Always clean up tokens from local .npmrc after publishing
  • Token stays saved in npmjs.com account for re-use within its expiry window

Troubleshooting

Problem Cause Fix
E403 error Token doesn't have bypass 2FA enabled, or expired Regenerate token with bypass 2FA checked
"Must select at least one package" "All packages" radio not actually selected Click "All packages" radio button explicitly
Email OTP required npm login requires email verification User must check their email — cannot be automated
E404 on npm view Package not yet published This is expected for first-time publishes
Version conflict Version already exists on registry Bump version in package.json before publishing
用于 vidpipe 项目的完整版本发布流程。涵盖版本递增判断、代码构建测试、Git 标签创建、GitHub Release 发布及 npm 包发布,确保版本一致性与发布质量。
用户要求发布新版本 用户要求生成版本号或打标签 用户要求创建 GitHub Release 用户要求发布到 npm
.github/skills/release/SKILL.md
npx skills add htekdev/vidpipe --skill release -g -y
SKILL.md
Frontmatter
{
    "name": "release",
    "description": "Create a new version release for vidpipe. Use this skill when asked to release, version, tag, or create a new version. Handles version bump, changelog generation, GitHub release, and npm publishing."
}

Release Skill

Complete workflow for creating a new versioned release of vidpipe, including version bump, release notes, GitHub release, and npm publishing.

Prerequisites

  • Clean working tree (git status shows no uncommitted changes)
  • All tests passing (npm test)
  • gh CLI authenticated (gh auth status)
  • npm publish token available (see npm-publish skill)

Release Workflow

Step 1: Determine Version Bump

Check commits since the last tag to decide the bump type:

git log --oneline $(git describe --tags --abbrev=0)..HEAD
  • patch (x.x.1): Only bug fixes (fix: commits)
  • minor (x.1.0): New features (feat: commits), no breaking changes
  • major (1.0.0): Breaking changes (BREAKING CHANGE or !: commits)

Step 2: Bump Version

npm version <patch|minor|major> --no-git-tag-version

This updates package.json and package-lock.json without creating a git tag (we'll do that manually after release notes).

Step 3: Build and Test

npm run build && npm test

All tests must pass before proceeding.

Step 4: Commit Version Bump

git add package.json package-lock.json
git commit -m "chore: bump version to <NEW_VERSION>"
git push origin main

Step 5: Create Git Tag

git tag -a v<NEW_VERSION> -m "v<NEW_VERSION>"
git push origin v<NEW_VERSION>

Step 6: Generate Release Notes

Write release notes that include:

  • Features (feat: commits) — describe what's new with user-facing impact
  • Bug Fixes (fix: commits) — describe what was broken and how it's fixed
  • Documentation — notable doc improvements
  • Internal — infrastructure, refactoring, DX improvements

Format as GitHub-flavored markdown with emoji section headers (✨ Features, 🐛 Fixes, 📖 Documentation, 🔧 Internal).

Include a changelog link at the bottom:

**Full Changelog**: https://github.com/htekdev/vidpipe/compare/vOLD...vNEW

Step 7: Create GitHub Release

gh release create v<NEW_VERSION> --title "v<NEW_VERSION> — <SHORT_DESCRIPTION>" --notes "<RELEASE_NOTES>"

Step 8: Publish to npm

Follow the npm-publish skill:

  1. Set auth token: npm config set //registry.npmjs.org/:_authToken=<TOKEN>
  2. Publish: npm publish --access public
  3. Verify: npm view vidpipe version
  4. Clean up: npm config delete //registry.npmjs.org/:_authToken

If no token is available, use Playwright to create one (see npm-publish skill).

Step 9: Verify

  • GitHub release visible: gh release view v<NEW_VERSION>
  • npm version matches: npm view vidpipe version

Important Notes

  • Always push commits BEFORE creating the tag (tag should point to a pushed commit)
  • Use --no-git-tag-version with npm version to separate the version bump commit from the tag
  • Release notes should be written for END USERS, not developers
  • The npm token (vidpipe-publish) expires every 90 days — check expiry if publish fails
  • If npm registry shows old version after publish, wait 30-60 seconds for propagation
利用 Gemini AI 视觉模型审查和分析视频文件。支持传入视频路径及自定义提示词,用于描述内容、检查字幕质量或评估剪辑效果,返回详细分析结果。
需要审查视频内容 分析视频中的视觉元素 检查字幕可读性 评估视频剪辑流畅度
.github/skills/video-review/SKILL.md
npx skills add htekdev/vidpipe --skill video-review -g -y
SKILL.md
Frontmatter
{
    "name": "video-review",
    "description": "Review and inspect video files using Gemini AI vision. Use this skill when asked to inspect, review, analyze, describe, or understand what's happening in a video file. Supports custom prompts for targeted analysis."
}

Video Review Skill

Analyze any video file using Google Gemini's vision model. Upload the video, send a custom prompt (or use a default review prompt), and return Gemini's analysis.

Prerequisites

How to Use

Run the review-video.ts script in this skill directory with the video path and an optional prompt:

cd C:\Repos\htekdev\video-auto-note-taker
npx tsx .github/skills/video-review/review-video.ts "<video-path>" "<optional-prompt>"

Arguments

  1. video-path (required): Absolute or relative path to the video file
  2. prompt (optional): Custom prompt to send alongside the video. If omitted, uses a general review prompt that describes what's happening in the video.

Examples

# General review — describe what's in the video
npx tsx .github/skills/video-review/review-video.ts "recordings/my-video/short-clip.mp4"

# Custom prompt — ask specific questions
npx tsx .github/skills/video-review/review-video.ts "recordings/my-video/short-clip.mp4" "Are the captions readable? Do they overlap with any important content on screen?"

# Check caption quality on a short
npx tsx .github/skills/video-review/review-video.ts "recordings/my-video/shorts/clip-square-captioned.mp4" "Describe what you see. Are there any visual issues, glitches, or misaligned elements?"

# Review editorial decisions
npx tsx .github/skills/video-review/review-video.ts "recordings/my-video/my-video-edited.mp4" "Does this video flow well? Are there any jarring cuts or awkward transitions?"

Environment Variables

Variable Required Description
GEMINI_API_KEY Yes Google AI Studio API key
GEMINI_MODEL No Model to use (default: gemini-2.5-pro)

Output

The script prints Gemini's full analysis to stdout. For large outputs, pipe to a file:

npx tsx .github/skills/video-review/review-video.ts "video.mp4" "What's wrong?" > review-output.md

Default Prompt

When no custom prompt is provided, the script uses:

Describe everything you see in this video in detail. Cover: visual layout, text/captions visible, any overlays or graphics, video quality, audio sync observations, pacing, and anything that looks wrong or could be improved. Be specific with timestamps.

Troubleshooting

  • "GEMINI_API_KEY is required": Set the env var in your .env file or shell
  • Timeout on large videos: Gemini processes uploads async — long videos may take 30-60s to become ready
  • Empty response: Try a simpler prompt or a shorter video clip

trang chủ - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-07-05 21:55
浙ICP备14020137号-1 $bản đồ khách truy cập$