Install
openclaw skills install tiktok-content-pipelineAutomates TikTok carousel content creation, smart scheduling, publishing via Postiz API, and analytics-driven optimization for niche accounts.
openclaw skills install tiktok-content-pipelineAutomated TikTok carousel content generation, publishing, scheduling, and analytics-driven optimization for any niche.
This skill provides a complete content pipeline for TikTok accounts. It handles:
| Credential | Purpose | How to Obtain |
|---|---|---|
| Postiz API Key | Publishing & analytics via Postiz CLI | Sign up at postiz.com → Settings → API Keys |
| TikTok Integration ID | Links your TikTok account to Postiz | Postiz dashboard → Integrations → Add TikTok |
Recommended: Set POSTIZ_API_KEY as an environment variable (e.g. in ~/.zshrc or ~/.bashrc) rather than storing it in config files. The pipeline checks for this env var first.
Alternative: Store in accounts/<your-account>/config.json under postiz.apiKey. If using this approach, ensure the file is not committed to version control (add to .gitignore).
The Integration ID is account-specific and stored in per-account config.json.
postiz CLI via shell commands. All arguments are escaped to prevent injection.accounts/ and output/ directories.auto-improve mode can modify account configs and auto-post — test on a throwback account first.npm audit after installing dependencies to check for known vulnerabilities.export POSTIZ_API_KEY="your-key-here"config.example.json to accounts/<your-account>/config.jsontemplates/ for your nichenode cli.js create <account> --template <template-name>See SETUP.md for the full setup guide.
node cli.js create my-brand --template example-nostalgia
This copies the template into accounts/my-brand/ and sets createdAt to now.
Edit accounts/my-brand/config.json:
{
"account": { "name": "my-brand", "handle": "@mybrand", "niche": "your-niche", "createdAt": "2026-01-15T00:00:00Z" },
"postiz": { "apiKey": "YOUR_KEY", "integrationId": "YOUR_TIKTOK_ID" },
"posting": { "timezone": "Europe/London" }
}
Or use the CLI:
node cli.js config my-brand --handle @mybrand --integration-id YOUR_ID --api-key YOUR_KEY
node cli.js generate my-brand --type showcase
node cli.js generate my-brand --type showcase --post # Generate and post as draft
The generator uses the template's generator.js to create carousel slides, applies hooks from config, adds keyword overlays for TikTok SEO, and outputs to accounts/my-brand/output/.
node cli.js schedule my-brand # This week's schedule
node cli.js schedule my-brand --next # Next optimal posting slot
The scheduler automatically adjusts frequency based on account age:
node cli.js analytics my-brand --days 7
node cli.js analytics my-brand --days 7 --auto-improve # Auto-implement fixes
These findings are baked into the framework's scheduling, optimization, and content scoring:
| Type | Example | Avg Engagement |
|---|---|---|
| Contradiction | "Everyone thinks X, but actually..." | 9%+ |
| Challenge | "If you used X, you had no skill 😂" | 11%+ |
| Gatekeeping | "Only real ones remember..." | 8%+ |
| POV | "POV: You just discovered..." | 7%+ |
| Nostalgia | "Remember this? 🔥" | 6%+ |
| Question | "Would you do this? Yes or no 👇" | 8%+ |
The ViralOptimizer scores content before posting (0-100):
Verdicts:
When analyzing post performance, use this matrix to decide what to fix:
| Views | Engagement | Diagnosis | Action |
|---|---|---|---|
| High (>1000) | High (>5%) | SCALE | Create 3 variations of this content. Test same hook with different visuals. |
| High (>1000) | Low (<3%) | FIX CTA | Hook is working — add stronger call-to-action. Add opinion-split or challenge. |
| Low (<500) | High saves (>10%) | FIX HOOK | Content converts — needs better opening hook. Test trending audio. Stronger first-slide text. |
| Low (<500) | Low (<3%) | FULL RESET | Try radically different format. Research top creators in niche. Test different posting time. |
| Metric | Target | Viral | Poor |
|---|---|---|---|
| Completion rate | 80% | 90% | 40% |
| Save-to-view ratio | 15% | 25% | 3% |
| Share rate | 8% | 15% | 2% |
| Comment rate | 5% | 10% | 1% |
| Profile visit rate | 12% | 20% | 3% |
| Follower conversion | 8% | 15% | 2% |
Templates define the content types, hooks, hashtags, and generation logic for a niche.
templates/your-niche/
├── config.json # Content types, hooks, hashtags, settings
├── generator.js # Content generation logic (extends ContentGenerator)
└── README.md # Template documentation
{
"account": { "template": "your-niche", "niche": "Your Niche" },
"content": {
"types": {
"your-content-type": { "description": "...", "slides": 6 }
},
"hashtagSets": {
"default": ["#yourniche", "#fyp"]
}
},
"hooks": {
"your-content-type": ["Hook text 1", "Hook with {placeholder} 2"]
},
"posting": { "timezone": "Europe/London" }
}
const ContentGenerator = require('../../core/ContentGenerator');
class YourNicheGenerator extends ContentGenerator {
getSupportedTypes() {
return Object.keys(this.config.content.types);
}
async _generateContent(contentType, options, outputDir) {
this._ensureOutputDir(outputDir);
const hook = this.getSlide1Hook(contentType, options);
// Generate slides using sharp/canvas/ImageMagick
// Return { slides: [...paths], hook: hook.text, caption: '...' }
}
}
module.exports = YourNicheGenerator;
tiktok-content-pipeline/
├── cli.js # Universal CLI
├── core/
│ ├── ContentGenerator.js # Abstract base for content generation
│ ├── Publisher.js # Postiz API integration
│ ├── PostingScheduler.js # Smart scheduling engine
│ ├── ViralOptimizer.js # Content scoring & optimization
│ └── AnalyticsEngine.js # Performance tracking & insights
├── accounts/ # Per-account configs & output (created at runtime)
└── templates/ # Niche templates
└── example-nostalgia/ # Example template to fork