ugcinc 4.1.127 → 4.1.129
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +206 -0
- package/dist/skills.d.ts +1 -0
- package/dist/skills.js +391 -0
- package/dist/tools/accounts.d.ts +2 -0
- package/dist/tools/accounts.js +127 -0
- package/dist/tools/automations.d.ts +2 -0
- package/dist/tools/automations.js +123 -0
- package/dist/tools/comments.d.ts +2 -0
- package/dist/tools/comments.js +30 -0
- package/dist/tools/index.d.ts +13 -0
- package/dist/tools/index.js +33 -0
- package/dist/tools/media.d.ts +2 -0
- package/dist/tools/media.js +77 -0
- package/dist/tools/org.d.ts +2 -0
- package/dist/tools/org.js +33 -0
- package/dist/tools/posts.d.ts +2 -0
- package/dist/tools/posts.js +102 -0
- package/dist/tools/stats.d.ts +2 -0
- package/dist/tools/stats.js +82 -0
- package/dist/tools/tasks.d.ts +2 -0
- package/dist/tools/tasks.js +39 -0
- package/dist/tools/types.d.ts +8 -0
- package/dist/tools/types.js +2 -0
- package/package.json +4 -4
package/dist/cli.d.ts
ADDED
package/dist/cli.js
ADDED
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
const client_1 = require("./client");
|
|
38
|
+
const tools_1 = require("./tools");
|
|
39
|
+
const skills_1 = require("./skills");
|
|
40
|
+
const fs = __importStar(require("fs"));
|
|
41
|
+
const path = __importStar(require("path"));
|
|
42
|
+
function parseEnvValue(content, name) {
|
|
43
|
+
for (const line of content.split('\n')) {
|
|
44
|
+
const trimmed = line.trim();
|
|
45
|
+
if (trimmed.startsWith(`${name}=`)) {
|
|
46
|
+
let value = trimmed.slice(name.length + 1);
|
|
47
|
+
if ((value.startsWith('"') && value.endsWith('"')) || (value.startsWith("'") && value.endsWith("'"))) {
|
|
48
|
+
value = value.slice(1, -1);
|
|
49
|
+
}
|
|
50
|
+
return value;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return undefined;
|
|
54
|
+
}
|
|
55
|
+
function checkEnvFile(filePath, name) {
|
|
56
|
+
if (!fs.existsSync(filePath))
|
|
57
|
+
return undefined;
|
|
58
|
+
return parseEnvValue(fs.readFileSync(filePath, 'utf-8'), name);
|
|
59
|
+
}
|
|
60
|
+
function loadEnvVar(name) {
|
|
61
|
+
if (process.env[name])
|
|
62
|
+
return process.env[name];
|
|
63
|
+
let dir = process.cwd();
|
|
64
|
+
while (true) {
|
|
65
|
+
// Check .env in this directory
|
|
66
|
+
const value = checkEnvFile(path.join(dir, '.env'), name);
|
|
67
|
+
if (value)
|
|
68
|
+
return value;
|
|
69
|
+
// Check immediate child directories for .env files
|
|
70
|
+
if (fs.existsSync(dir)) {
|
|
71
|
+
for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
|
|
72
|
+
if (entry.isDirectory() && !entry.name.startsWith('.') && !entry.name.startsWith('node_modules')) {
|
|
73
|
+
const childValue = checkEnvFile(path.join(dir, entry.name, '.env'), name);
|
|
74
|
+
if (childValue)
|
|
75
|
+
return childValue;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
const parent = path.dirname(dir);
|
|
80
|
+
if (parent === dir)
|
|
81
|
+
break;
|
|
82
|
+
dir = parent;
|
|
83
|
+
}
|
|
84
|
+
return undefined;
|
|
85
|
+
}
|
|
86
|
+
function printUsage() {
|
|
87
|
+
console.log('Usage: ugcinc <command> [args]');
|
|
88
|
+
console.log('');
|
|
89
|
+
console.log('Commands:');
|
|
90
|
+
console.log(' init Set up Claude Code skills in your project');
|
|
91
|
+
console.log(' <tool_name> [json_params] Run an API tool');
|
|
92
|
+
console.log(' --list List all available tools as JSON');
|
|
93
|
+
console.log(' --help Show this help message');
|
|
94
|
+
console.log('');
|
|
95
|
+
console.log('Environment variables:');
|
|
96
|
+
console.log(' UGC_API_KEY (required for tools) Your UGC Inc API key');
|
|
97
|
+
console.log(' UGC_ORG_ID (optional) Organization ID to scope requests');
|
|
98
|
+
console.log('');
|
|
99
|
+
console.log('Available tools:');
|
|
100
|
+
for (const tool of tools_1.allTools) {
|
|
101
|
+
console.log(` ${tool.name.padEnd(30)} ${tool.description}`);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
function runInit() {
|
|
105
|
+
const cwd = process.cwd();
|
|
106
|
+
const skillsDir = path.join(cwd, '.claude', 'skills');
|
|
107
|
+
let created = 0;
|
|
108
|
+
let skipped = 0;
|
|
109
|
+
for (const [skillPath, content] of Object.entries(skills_1.skillFiles)) {
|
|
110
|
+
const fullPath = path.join(skillsDir, skillPath);
|
|
111
|
+
const dir = path.dirname(fullPath);
|
|
112
|
+
if (!fs.existsSync(dir)) {
|
|
113
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
114
|
+
}
|
|
115
|
+
if (fs.existsSync(fullPath)) {
|
|
116
|
+
skipped++;
|
|
117
|
+
console.log(` skip ${skillPath} (already exists)`);
|
|
118
|
+
}
|
|
119
|
+
else {
|
|
120
|
+
fs.writeFileSync(fullPath, content);
|
|
121
|
+
created++;
|
|
122
|
+
console.log(` create ${skillPath}`);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
console.log('');
|
|
126
|
+
console.log(`Done! Created ${created} skill files${skipped > 0 ? `, skipped ${skipped} existing` : ''}.`);
|
|
127
|
+
console.log('');
|
|
128
|
+
console.log('Next steps:');
|
|
129
|
+
console.log(' 1. Set your API key: export UGC_API_KEY="your-api-key"');
|
|
130
|
+
console.log(' 2. Try a command: /accounts list my accounts');
|
|
131
|
+
console.log('');
|
|
132
|
+
console.log('Available skills:');
|
|
133
|
+
console.log(' /accounts Manage accounts, warmup, and social profiles');
|
|
134
|
+
console.log(' /posts Schedule, update, and manage posts');
|
|
135
|
+
console.log(' /media Manage media library and social audio');
|
|
136
|
+
console.log(' /automations Run and manage automation workflows');
|
|
137
|
+
console.log(' /stats View account and post statistics');
|
|
138
|
+
}
|
|
139
|
+
async function runTool(toolName, rawParams) {
|
|
140
|
+
const tool = tools_1.toolRegistry[toolName];
|
|
141
|
+
if (!tool) {
|
|
142
|
+
console.error(JSON.stringify({
|
|
143
|
+
ok: false,
|
|
144
|
+
error: `Unknown tool: ${toolName}`,
|
|
145
|
+
available: tools_1.allTools.map(t => t.name),
|
|
146
|
+
}));
|
|
147
|
+
process.exit(1);
|
|
148
|
+
}
|
|
149
|
+
const apiKey = loadEnvVar('UGC_API_KEY');
|
|
150
|
+
if (!apiKey) {
|
|
151
|
+
console.error(JSON.stringify({
|
|
152
|
+
ok: false,
|
|
153
|
+
error: 'UGC_API_KEY not found in environment or any .env file in the directory tree',
|
|
154
|
+
}));
|
|
155
|
+
process.exit(1);
|
|
156
|
+
}
|
|
157
|
+
const orgId = loadEnvVar('UGC_ORG_ID');
|
|
158
|
+
const client = new client_1.UGCClient({ apiKey, orgId });
|
|
159
|
+
let params = undefined;
|
|
160
|
+
if (rawParams) {
|
|
161
|
+
const parseResult = tool.schema.safeParse(JSON.parse(rawParams));
|
|
162
|
+
if (!parseResult.success) {
|
|
163
|
+
console.error(JSON.stringify({
|
|
164
|
+
ok: false,
|
|
165
|
+
error: 'Invalid parameters',
|
|
166
|
+
details: parseResult.error.issues,
|
|
167
|
+
}));
|
|
168
|
+
process.exit(1);
|
|
169
|
+
}
|
|
170
|
+
params = parseResult.data;
|
|
171
|
+
}
|
|
172
|
+
else {
|
|
173
|
+
const parseResult = tool.schema.safeParse(undefined);
|
|
174
|
+
if (!parseResult.success) {
|
|
175
|
+
console.error(JSON.stringify({
|
|
176
|
+
ok: false,
|
|
177
|
+
error: 'This tool requires parameters',
|
|
178
|
+
details: parseResult.error.issues,
|
|
179
|
+
}));
|
|
180
|
+
process.exit(1);
|
|
181
|
+
}
|
|
182
|
+
params = parseResult.data;
|
|
183
|
+
}
|
|
184
|
+
const result = await tool.execute(client, params);
|
|
185
|
+
console.log(JSON.stringify(result, null, 2));
|
|
186
|
+
}
|
|
187
|
+
async function main() {
|
|
188
|
+
const args = process.argv.slice(2);
|
|
189
|
+
if (args.length === 0 || args[0] === '--help' || args[0] === '-h') {
|
|
190
|
+
printUsage();
|
|
191
|
+
process.exit(0);
|
|
192
|
+
}
|
|
193
|
+
if (args[0] === '--list') {
|
|
194
|
+
console.log(JSON.stringify(tools_1.allTools.map(t => ({
|
|
195
|
+
name: t.name,
|
|
196
|
+
description: t.description,
|
|
197
|
+
})), null, 2));
|
|
198
|
+
process.exit(0);
|
|
199
|
+
}
|
|
200
|
+
if (args[0] === 'init') {
|
|
201
|
+
runInit();
|
|
202
|
+
process.exit(0);
|
|
203
|
+
}
|
|
204
|
+
await runTool(args[0], args[1]);
|
|
205
|
+
}
|
|
206
|
+
main();
|
package/dist/skills.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const skillFiles: Record<string, string>;
|
package/dist/skills.js
ADDED
|
@@ -0,0 +1,391 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.skillFiles = void 0;
|
|
4
|
+
const run = 'npx ugcinc';
|
|
5
|
+
exports.skillFiles = {
|
|
6
|
+
'accounts/SKILL.md': `---
|
|
7
|
+
name: accounts
|
|
8
|
+
description: Manage UGC Inc accounts - list, update, create, warmup, and social profiles. Use when the user wants to see their accounts, change account settings, or create new ones.
|
|
9
|
+
allowed-tools: Bash, Read
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
You manage UGC Inc accounts through the CLI. Run tools with:
|
|
13
|
+
\`\`\`bash
|
|
14
|
+
${run} <tool_name> '<json_params>'
|
|
15
|
+
\`\`\`
|
|
16
|
+
|
|
17
|
+
Requires \`UGC_API_KEY\` env var. Set \`UGC_ORG_ID\` to scope to a specific organization.
|
|
18
|
+
|
|
19
|
+
## Tools
|
|
20
|
+
|
|
21
|
+
### list_accounts
|
|
22
|
+
List accounts with optional filters.
|
|
23
|
+
\`\`\`bash
|
|
24
|
+
${run} list_accounts
|
|
25
|
+
${run} list_accounts '{"tag":"fitness"}'
|
|
26
|
+
${run} list_accounts '{"status":"warmed","org_group":"team-a"}'
|
|
27
|
+
\`\`\`
|
|
28
|
+
Filters: \`tag\`, \`org_group\`, \`user_group\`, \`status\` (uninitialized|pending|initialized|setup|warming|warmed|needs_replacement|replacing|failed|deleted)
|
|
29
|
+
|
|
30
|
+
### get_account_status
|
|
31
|
+
Get tasks/warmup progress for accounts.
|
|
32
|
+
\`\`\`bash
|
|
33
|
+
${run} get_account_status '{"accountIds":["id1","id2"]}'
|
|
34
|
+
${run} get_account_status '{"includeCompleted":true}'
|
|
35
|
+
\`\`\`
|
|
36
|
+
|
|
37
|
+
### update_account_info
|
|
38
|
+
Update metadata (tags, groups, keywords, warmup version, etc).
|
|
39
|
+
\`\`\`bash
|
|
40
|
+
${run} update_account_info '{"updates":[{"accountId":"id","tag":"new-tag","keywords":"kw1,kw2","warmupVersion":"v2_smart"}]}'
|
|
41
|
+
\`\`\`
|
|
42
|
+
|
|
43
|
+
### update_account_socials
|
|
44
|
+
Update social profile (username, bio, avatar, nickname). Applied within 24h. Rate limited.
|
|
45
|
+
\`\`\`bash
|
|
46
|
+
${run} update_account_socials '{"updates":[{"accountId":"id","bio":"new bio","nickName":"New Name"}]}'
|
|
47
|
+
\`\`\`
|
|
48
|
+
|
|
49
|
+
### niche_switch
|
|
50
|
+
Switch account niche. Updates keywords + description and resets warmup automatically.
|
|
51
|
+
\`\`\`bash
|
|
52
|
+
${run} niche_switch '{"updates":[{"accountId":"id","keywords":["fitness","gym"],"description":"Fitness content"}]}'
|
|
53
|
+
\`\`\`
|
|
54
|
+
|
|
55
|
+
### delete_account_posts
|
|
56
|
+
Delete ALL posts from accounts (creates a task that deletes them from the platform).
|
|
57
|
+
\`\`\`bash
|
|
58
|
+
${run} delete_account_posts '{"accountIds":["id1","id2"]}'
|
|
59
|
+
\`\`\`
|
|
60
|
+
|
|
61
|
+
### reset_warmup
|
|
62
|
+
Reset warmup activity. Default resets counts; \`delete_activity:true\` deletes all warmup tasks.
|
|
63
|
+
\`\`\`bash
|
|
64
|
+
${run} reset_warmup '{"accountId":"id"}'
|
|
65
|
+
${run} reset_warmup '{"accountId":"id","delete_activity":true}'
|
|
66
|
+
\`\`\`
|
|
67
|
+
|
|
68
|
+
### create_accounts
|
|
69
|
+
Create new account seats (updates billing).
|
|
70
|
+
\`\`\`bash
|
|
71
|
+
${run} create_accounts '{"accounts":[{"tier":"basic","platform":"tiktok","keywords":"fitness,gym","description":"Fitness niche"}]}'
|
|
72
|
+
\`\`\`
|
|
73
|
+
|
|
74
|
+
## Workflow tips
|
|
75
|
+
- When the user wants to see their accounts, start with \`list_accounts\` filtered by relevant criteria
|
|
76
|
+
- For large account lists, summarize key info: username, status, tag, follower count
|
|
77
|
+
- When updating multiple accounts, batch them into one \`update_account_info\` call
|
|
78
|
+
- After niche switches, let the user know warmup was automatically reset
|
|
79
|
+
- If $ARGUMENTS is provided, interpret it as a natural language request
|
|
80
|
+
`,
|
|
81
|
+
'posts/SKILL.md': `---
|
|
82
|
+
name: posts
|
|
83
|
+
description: Schedule, update, and manage UGC Inc posts - video and slideshow creation, status checks, retries. Use when the user wants to create, edit, or manage their social media posts.
|
|
84
|
+
allowed-tools: Bash, Read
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
You manage UGC Inc posts through the CLI. Run tools with:
|
|
88
|
+
\`\`\`bash
|
|
89
|
+
${run} <tool_name> '<json_params>'
|
|
90
|
+
\`\`\`
|
|
91
|
+
|
|
92
|
+
Requires \`UGC_API_KEY\` env var. Set \`UGC_ORG_ID\` to scope to a specific organization.
|
|
93
|
+
|
|
94
|
+
## Tools
|
|
95
|
+
|
|
96
|
+
### list_posts
|
|
97
|
+
List posts with optional filters.
|
|
98
|
+
\`\`\`bash
|
|
99
|
+
${run} list_posts
|
|
100
|
+
${run} list_posts '{"accountIds":["id1"]}'
|
|
101
|
+
${run} list_posts '{"startDate":"2024-01-01","endDate":"2024-02-01"}'
|
|
102
|
+
\`\`\`
|
|
103
|
+
|
|
104
|
+
### create_video_post
|
|
105
|
+
Schedule a video post. Set \`accountId\` to \`null\` for auto-selection.
|
|
106
|
+
\`\`\`bash
|
|
107
|
+
${run} create_video_post '{"accountId":"id","videoUrl":"https://...","caption":"My video!"}'
|
|
108
|
+
${run} create_video_post '{"accountId":null,"videoUrl":"https://...","caption":"Auto-select","tag":"fitness"}'
|
|
109
|
+
${run} create_video_post '{"accountId":"id","videoUrl":"https://...","postTime":"2024-01-15T15:00:00Z"}'
|
|
110
|
+
\`\`\`
|
|
111
|
+
Auto-selection: set \`accountId\` to \`null\`, optionally filter by \`tag\`/\`org_group\`/\`user_group\`. Use \`strict:true\` to require exact time.
|
|
112
|
+
|
|
113
|
+
### create_slideshow_post
|
|
114
|
+
Schedule a slideshow/carousel post.
|
|
115
|
+
\`\`\`bash
|
|
116
|
+
${run} create_slideshow_post '{"accountId":"id","imageUrls":["url1","url2","url3"],"caption":"Slideshow!","title":"My Title"}'
|
|
117
|
+
\`\`\`
|
|
118
|
+
|
|
119
|
+
### get_post_status
|
|
120
|
+
Check post status. Returns platform URL when complete.
|
|
121
|
+
\`\`\`bash
|
|
122
|
+
${run} get_post_status '{"postId":"id"}'
|
|
123
|
+
\`\`\`
|
|
124
|
+
|
|
125
|
+
### update_post
|
|
126
|
+
Update a scheduled or failed post. Failed posts reset to "scheduled".
|
|
127
|
+
\`\`\`bash
|
|
128
|
+
${run} update_post '{"postId":"id","caption":"updated caption","postTime":"2024-01-16T12:00:00Z"}'
|
|
129
|
+
\`\`\`
|
|
130
|
+
|
|
131
|
+
### delete_posts
|
|
132
|
+
Delete posts. Unpublished = immediate. Published = triggers platform deletion flow.
|
|
133
|
+
\`\`\`bash
|
|
134
|
+
${run} delete_posts '{"postIds":["id1","id2"]}'
|
|
135
|
+
\`\`\`
|
|
136
|
+
|
|
137
|
+
### retry_posts
|
|
138
|
+
Retry failed posts.
|
|
139
|
+
\`\`\`bash
|
|
140
|
+
${run} retry_posts '{"postIds":["id1"]}'
|
|
141
|
+
\`\`\`
|
|
142
|
+
|
|
143
|
+
## Workflow tips
|
|
144
|
+
- Post times are ISO 8601 (e.g. \`2024-01-15T15:00:00Z\`)
|
|
145
|
+
- When creating posts, if the user doesn't specify an account, use auto-selection (\`accountId: null\`)
|
|
146
|
+
- After creating a post, tell the user the post ID and scheduled time
|
|
147
|
+
- For failed posts, check status first to understand the error before retrying
|
|
148
|
+
- If $ARGUMENTS is provided, interpret it as a natural language request
|
|
149
|
+
`,
|
|
150
|
+
'media/SKILL.md': `---
|
|
151
|
+
name: media
|
|
152
|
+
description: Manage UGC Inc media library - list, import, and organize videos, images, audio, and text. Use when the user wants to upload media, import audio, or manage their library.
|
|
153
|
+
allowed-tools: Bash, Read
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
You manage UGC Inc media through the CLI. Run tools with:
|
|
157
|
+
\`\`\`bash
|
|
158
|
+
${run} <tool_name> '<json_params>'
|
|
159
|
+
\`\`\`
|
|
160
|
+
|
|
161
|
+
Requires \`UGC_API_KEY\` env var. Set \`UGC_ORG_ID\` to scope to a specific organization.
|
|
162
|
+
|
|
163
|
+
## Tools
|
|
164
|
+
|
|
165
|
+
### list_media
|
|
166
|
+
List all media (user media + social audio).
|
|
167
|
+
\`\`\`bash
|
|
168
|
+
${run} list_media
|
|
169
|
+
${run} list_media '{"tag":"campaign-1"}'
|
|
170
|
+
${run} list_media '{"ids":["id1","id2"]}'
|
|
171
|
+
\`\`\`
|
|
172
|
+
|
|
173
|
+
### list_social_audio
|
|
174
|
+
List social audio only.
|
|
175
|
+
\`\`\`bash
|
|
176
|
+
${run} list_social_audio
|
|
177
|
+
${run} list_social_audio '{"tag":"trending"}'
|
|
178
|
+
\`\`\`
|
|
179
|
+
|
|
180
|
+
### create_media_from_urls
|
|
181
|
+
Import media from URLs (videos, images already hosted somewhere).
|
|
182
|
+
\`\`\`bash
|
|
183
|
+
${run} create_media_from_urls '{"urls":["https://example.com/video.mp4"],"tag":"imported"}'
|
|
184
|
+
${run} create_media_from_urls '{"urls":["url1","url2"],"names":["Video 1","Video 2"]}'
|
|
185
|
+
\`\`\`
|
|
186
|
+
|
|
187
|
+
### import_text
|
|
188
|
+
Import text content as media.
|
|
189
|
+
\`\`\`bash
|
|
190
|
+
${run} import_text '{"texts":[{"content":"Hello world","name":"greeting","tag":"captions"}]}'
|
|
191
|
+
\`\`\`
|
|
192
|
+
|
|
193
|
+
### create_social_audio
|
|
194
|
+
Extract audio from a TikTok or Instagram URL.
|
|
195
|
+
\`\`\`bash
|
|
196
|
+
${run} create_social_audio '{"url":"https://www.tiktok.com/@user/video/123","tag":"trending"}'
|
|
197
|
+
\`\`\`
|
|
198
|
+
|
|
199
|
+
### delete_media
|
|
200
|
+
Delete media items (also removes from storage).
|
|
201
|
+
\`\`\`bash
|
|
202
|
+
${run} delete_media '{"ids":["id1","id2"]}'
|
|
203
|
+
\`\`\`
|
|
204
|
+
|
|
205
|
+
## Workflow tips
|
|
206
|
+
- Media types: video, image, audio, text, social_audio
|
|
207
|
+
- When importing audio from TikTok/Instagram, use \`create_social_audio\` not \`create_media_from_urls\`
|
|
208
|
+
- Tags help organize media - suggest tagging when importing
|
|
209
|
+
- If $ARGUMENTS is provided, interpret it as a natural language request
|
|
210
|
+
`,
|
|
211
|
+
'automations/SKILL.md': `---
|
|
212
|
+
name: automations
|
|
213
|
+
description: Run and manage UGC Inc automation workflows - list templates, trigger runs, check status, manage scheduling. Use when the user wants to run, check, or manage their automations.
|
|
214
|
+
allowed-tools: Bash, Read
|
|
215
|
+
---
|
|
216
|
+
|
|
217
|
+
You manage UGC Inc automations through the CLI. Run tools with:
|
|
218
|
+
\`\`\`bash
|
|
219
|
+
${run} <tool_name> '<json_params>'
|
|
220
|
+
\`\`\`
|
|
221
|
+
|
|
222
|
+
Requires \`UGC_API_KEY\` env var. Set \`UGC_ORG_ID\` to scope to a specific organization.
|
|
223
|
+
|
|
224
|
+
## Tools
|
|
225
|
+
|
|
226
|
+
### list_automations
|
|
227
|
+
List all automation templates. Requires orgId.
|
|
228
|
+
\`\`\`bash
|
|
229
|
+
${run} list_automations '{"orgId":"org-id"}'
|
|
230
|
+
\`\`\`
|
|
231
|
+
|
|
232
|
+
### get_automation
|
|
233
|
+
Get a specific template with full workflow definition.
|
|
234
|
+
\`\`\`bash
|
|
235
|
+
${run} get_automation '{"templateId":"id"}'
|
|
236
|
+
\`\`\`
|
|
237
|
+
|
|
238
|
+
### run_automation
|
|
239
|
+
Run an automation. Optionally provide variable inputs.
|
|
240
|
+
\`\`\`bash
|
|
241
|
+
${run} run_automation '{"templateId":"id","orgId":"org-id"}'
|
|
242
|
+
${run} run_automation '{"templateId":"id","orgId":"org-id","variableInputs":{"node-id":"value"}}'
|
|
243
|
+
\`\`\`
|
|
244
|
+
|
|
245
|
+
### get_automation_status
|
|
246
|
+
Get run status with executor nodes and data flow edges.
|
|
247
|
+
\`\`\`bash
|
|
248
|
+
${run} get_automation_status '{"runId":"id"}'
|
|
249
|
+
\`\`\`
|
|
250
|
+
|
|
251
|
+
### list_automation_runs
|
|
252
|
+
List runs for a specific template.
|
|
253
|
+
\`\`\`bash
|
|
254
|
+
${run} list_automation_runs '{"templateId":"id","limit":10}'
|
|
255
|
+
\`\`\`
|
|
256
|
+
|
|
257
|
+
### list_all_automation_runs
|
|
258
|
+
List all runs across all templates.
|
|
259
|
+
\`\`\`bash
|
|
260
|
+
${run} list_all_automation_runs '{"limit":10}'
|
|
261
|
+
${run} list_all_automation_runs '{"reviewStatus":"pending_review"}'
|
|
262
|
+
\`\`\`
|
|
263
|
+
|
|
264
|
+
### stop_automation
|
|
265
|
+
Stop a running automation.
|
|
266
|
+
\`\`\`bash
|
|
267
|
+
${run} stop_automation '{"runId":"id"}'
|
|
268
|
+
\`\`\`
|
|
269
|
+
|
|
270
|
+
### publish_automation
|
|
271
|
+
Enable recurrence scheduling.
|
|
272
|
+
\`\`\`bash
|
|
273
|
+
${run} publish_automation '{"templateId":"id"}'
|
|
274
|
+
\`\`\`
|
|
275
|
+
|
|
276
|
+
### unpublish_automation
|
|
277
|
+
Disable recurrence scheduling.
|
|
278
|
+
\`\`\`bash
|
|
279
|
+
${run} unpublish_automation '{"templateId":"id"}'
|
|
280
|
+
\`\`\`
|
|
281
|
+
|
|
282
|
+
### run_automation_once
|
|
283
|
+
Run once immediately (also updates recurrence schedule if published).
|
|
284
|
+
\`\`\`bash
|
|
285
|
+
${run} run_automation_once '{"templateId":"id"}'
|
|
286
|
+
\`\`\`
|
|
287
|
+
|
|
288
|
+
### get_automation_logs
|
|
289
|
+
Get execution logs for a run.
|
|
290
|
+
\`\`\`bash
|
|
291
|
+
${run} get_automation_logs '{"runId":"id"}'
|
|
292
|
+
\`\`\`
|
|
293
|
+
|
|
294
|
+
## Workflow tips
|
|
295
|
+
- Always list automations first to get template IDs and names
|
|
296
|
+
- After running, use \`get_automation_status\` to monitor progress
|
|
297
|
+
- For recurring automations, check \`publish_automation\` / \`unpublish_automation\`
|
|
298
|
+
- Summarize run status: show completed/total nodes, any failures
|
|
299
|
+
- If $ARGUMENTS is provided, interpret it as a natural language request
|
|
300
|
+
`,
|
|
301
|
+
'stats/SKILL.md': `---
|
|
302
|
+
name: stats
|
|
303
|
+
description: View UGC Inc statistics - account performance, post metrics, top performers, daily trends. Use when the user asks about performance, analytics, growth, or wants to see their numbers.
|
|
304
|
+
allowed-tools: Bash, Read
|
|
305
|
+
---
|
|
306
|
+
|
|
307
|
+
You query UGC Inc statistics through the CLI. Run tools with:
|
|
308
|
+
\`\`\`bash
|
|
309
|
+
${run} <tool_name> '<json_params>'
|
|
310
|
+
\`\`\`
|
|
311
|
+
|
|
312
|
+
Requires \`UGC_API_KEY\` env var. Set \`UGC_ORG_ID\` to scope to a specific organization.
|
|
313
|
+
|
|
314
|
+
## Tools
|
|
315
|
+
|
|
316
|
+
### get_account_stats
|
|
317
|
+
Get account stats (followers, following, views, likes). Without date range = latest per account.
|
|
318
|
+
\`\`\`bash
|
|
319
|
+
${run} get_account_stats
|
|
320
|
+
${run} get_account_stats '{"tag":"fitness"}'
|
|
321
|
+
${run} get_account_stats '{"startDate":"2024-01-01","endDate":"2024-01-31"}'
|
|
322
|
+
\`\`\`
|
|
323
|
+
|
|
324
|
+
### get_post_stats
|
|
325
|
+
Get post stats (views, likes, comments, shares). Without date range = latest per post.
|
|
326
|
+
\`\`\`bash
|
|
327
|
+
${run} get_post_stats
|
|
328
|
+
${run} get_post_stats '{"postIds":["id1","id2"]}'
|
|
329
|
+
\`\`\`
|
|
330
|
+
|
|
331
|
+
### get_daily_stats
|
|
332
|
+
Get daily aggregated dashboard stats. Returns one row per day with all metrics.
|
|
333
|
+
\`\`\`bash
|
|
334
|
+
${run} get_daily_stats '{"startDate":"2024-01-01","endDate":"2024-01-31"}'
|
|
335
|
+
${run} get_daily_stats '{"startDate":"2024-01-01","endDate":"2024-01-31","tag":"fitness"}'
|
|
336
|
+
\`\`\`
|
|
337
|
+
|
|
338
|
+
### get_top_accounts
|
|
339
|
+
Get top N accounts by a metric.
|
|
340
|
+
\`\`\`bash
|
|
341
|
+
${run} get_top_accounts '{"metric":"followers","limit":5}'
|
|
342
|
+
${run} get_top_accounts '{"metric":"views","limit":10,"tag":"fitness"}'
|
|
343
|
+
\`\`\`
|
|
344
|
+
Metrics: \`followers\`, \`following\`, \`views\`, \`likes\`
|
|
345
|
+
|
|
346
|
+
### get_top_posts
|
|
347
|
+
Get top N posts by a metric.
|
|
348
|
+
\`\`\`bash
|
|
349
|
+
${run} get_top_posts '{"metric":"views","limit":5}'
|
|
350
|
+
${run} get_top_posts '{"metric":"likes","limit":10}'
|
|
351
|
+
\`\`\`
|
|
352
|
+
Metrics: \`views\`, \`likes\`, \`comments\`, \`shares\`
|
|
353
|
+
|
|
354
|
+
### refresh_stats
|
|
355
|
+
Refresh live stats from TikTok/Instagram. Rate limited to once per hour.
|
|
356
|
+
\`\`\`bash
|
|
357
|
+
${run} refresh_stats
|
|
358
|
+
${run} refresh_stats '{"org_group":"team-a"}'
|
|
359
|
+
\`\`\`
|
|
360
|
+
|
|
361
|
+
## Additional tools (tasks, comments, org)
|
|
362
|
+
|
|
363
|
+
### list_tasks / retry_tasks / delete_tasks
|
|
364
|
+
\`\`\`bash
|
|
365
|
+
${run} list_tasks '{"accountIds":["id"],"taskType":"warmup_scroll"}'
|
|
366
|
+
${run} retry_tasks '{"taskIds":["id1"]}'
|
|
367
|
+
${run} delete_tasks '{"taskIds":["id1"]}'
|
|
368
|
+
\`\`\`
|
|
369
|
+
|
|
370
|
+
### create_comment / list_comments
|
|
371
|
+
\`\`\`bash
|
|
372
|
+
${run} create_comment '{"accountId":"id","postUrl":"https://tiktok.com/...","commentText":"Great!"}'
|
|
373
|
+
${run} list_comments '{"accountIds":["id"]}'
|
|
374
|
+
\`\`\`
|
|
375
|
+
|
|
376
|
+
### list_api_keys / list_integration_keys / upsert_integration_key
|
|
377
|
+
\`\`\`bash
|
|
378
|
+
${run} list_api_keys
|
|
379
|
+
${run} list_integration_keys
|
|
380
|
+
${run} upsert_integration_key '{"provider":"openai","key":"sk-..."}'
|
|
381
|
+
\`\`\`
|
|
382
|
+
|
|
383
|
+
## Workflow tips
|
|
384
|
+
- When the user asks "how are things going", show top accounts + recent daily stats
|
|
385
|
+
- Default to last 7 days if no date range specified
|
|
386
|
+
- Present stats in a readable table format
|
|
387
|
+
- For top accounts/posts, default to limit 5 unless asked otherwise
|
|
388
|
+
- Mention when stats were last refreshed and offer to refresh if stale
|
|
389
|
+
- If $ARGUMENTS is provided, interpret it as a natural language request
|
|
390
|
+
`,
|
|
391
|
+
};
|