viral-app
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseviral-app
viral-app
Use this skill when you need to read or manage data through the viral.app API.
当你需要通过viral.app API读取或管理数据时,请使用此Skill。
When to use
使用场景
- Query analytics (accounts, videos, KPIs, exports).
- Manage tracked entities (accounts, videos, exclusions, refresh runs).
- Manage projects and creator hub resources.
- Pull live platform data (Facebook, TikTok, Instagram, YouTube).
- 查询分析数据(账户、视频、关键绩效指标、导出数据)。
- 管理已追踪实体(账户、视频、排除项、刷新任务)。
- 管理项目和创作者中心资源。
- 获取各平台实时数据(Facebook、TikTok、Instagram、YouTube)。
Quick start
快速开始
- Ensure CLI is installed and available in
viral-app.PATH
bash
viral-app --help- Set API key:
bash
export VIRAL_API_KEY="..."Get this key from viral.app dashboard at .
Settings -> API Keys- Verify access:
bash
viral-app accounts-list --per-page 1The wrapper injects automatically from unless a header is already passed.
x-api-keyVIRAL_API_KEY- 确保CLI已安装且可在
viral-app中访问。PATH
bash
viral-app --help- 设置API密钥:
bash
export VIRAL_API_KEY="..."该密钥可从viral.app控制台的获取。
Settings -> API Keys- 验证访问权限:
bash
viral-app accounts-list --per-page 1除非已传入自定义请求头,否则包装器会自动从注入请求头。
VIRAL_API_KEYx-api-keyInputs to collect first
需先收集的输入信息
- Task type: read/report or mutate/manage resources.
- Org-scoped IDs: ,
orgacc_*, creator/campaign/payout IDs when relevant.orgproj_* - Platform and entity identifiers (, platform account/video IDs).
facebook|tiktok|instagram|youtube - Time bounds (,
--date-range[from]) for analytics tasks.--date-range[to] - Pagination/scope (, filters) to keep output focused.
--per-page
- 任务类型:读取/报告 或 修改/管理资源。
- 组织范围ID:、
orgacc_*,以及相关的创作者/活动/付款ID。orgproj_* - 平台和实体标识符(,平台账户/视频ID)。
facebook|tiktok|instagram|youtube - 分析任务的时间范围(、
--date-range[from])。--date-range[to] - 分页/范围参数(、筛选条件)以聚焦输出内容。
--per-page
Command cookbook
命令手册
Discover available operations:
bash
viral-app --help
viral-app <command> --helpCommon reads:
bash
viral-app accounts-list --per-page 10
viral-app videos-list --per-page 10
viral-app analytics-get-kpis
viral-app analytics-top-videos --per-page 10
viral-app integrations-apps-listCommon mutations:
bash
viral-app projects-create --body '{"name":"My Project"}'
viral-app accounts-tracked-refresh --body '{"accounts":["orgacc_..."]}'
viral-app projects-add-to-account --body '{"projectId":"orgproj_...","accountId":"orgacc_..."}'Payout mutation flow:
bash
viral-app payouts-calculate --body '{"campaignId":"orgcamp_...","creatorId":"orgcre_...","billingPeriodStart":"2026-03-01T00:00:00.000Z","billingPeriodEnd":"2026-03-31T00:00:00.000Z"}'
viral-app payouts-initiate --body '{"campaignId":"orgcamp_...","creatorId":"orgcre_...","billingPeriodStart":"2026-03-01T00:00:00.000Z","billingPeriodEnd":"2026-03-31T00:00:00.000Z","lineItems":[{"title":"Creator payout","amount":1496.62}],"calculation":{...},"integrityToken":"..."}'Rules for payout mutations:
- Always call immediately before
payouts-calculate.payouts-initiate - Pass the returned payload and
calculationintointegrityTokenunchanged.payouts-initiate - Do not invent or recompute .
integrityToken - If using , also set
autoApproveTalentir=trueand explain the risk before executing.acknowledgeFullPayoutLiability=true - Prefer review-first behavior for payout mutations unless the user explicitly asks to initiate or approve payouts.
查看可用操作:
bash
viral-app --help
viral-app <command> --help常见读取操作:
bash
viral-app accounts-list --per-page 10
viral-app videos-list --per-page 10
viral-app analytics-get-kpis
viral-app analytics-top-videos --per-page 10
viral-app integrations-apps-list常见修改操作:
bash
viral-app projects-create --body '{"name":"My Project"}'
viral-app accounts-tracked-refresh --body '{"accounts":["orgacc_..."]}'
viral-app projects-add-to-account --body '{"projectId":"orgproj_...","accountId":"orgacc_..."}'付款修改流程:
bash
viral-app payouts-calculate --body '{"campaignId":"orgcamp_...","creatorId":"orgcre_...","billingPeriodStart":"2026-03-01T00:00:00.000Z","billingPeriodEnd":"2026-03-31T00:00:00.000Z"}'
viral-app payouts-initiate --body '{"campaignId":"orgcamp_...","creatorId":"orgcre_...","billingPeriodStart":"2026-03-01T00:00:00.000Z","billingPeriodEnd":"2026-03-31T00:00:00.000Z","lineItems":[{"title":"Creator payout","amount":1496.62}],"calculation":{...},"integrityToken":"..."}'付款修改规则:
- 调用前必须先调用
payouts-initiate。payouts-calculate - 将返回的payload和
calculation原封不动传入integrityToken。payouts-initiate - 不要自行生成或重新计算。
integrityToken - 如果使用,需同时设置
autoApproveTalentir=true,并在执行前说明相关风险。acknowledgeFullPayoutLiability=true - 除非用户明确要求发起或批准付款,否则付款修改操作优先采用“先审核”模式。
Report templates
报告模板
Use the bundled report templates when the user asks for Slack-ready summaries or ranking reports:
- Leaderboard template: assets/templates/leaderboard.md
- Leaderboard example: assets/examples/leaderboard-sample.md
- Viral Video Library template: assets/templates/viral-video-library-report.md
- Viral Video Library example: assets/examples/viral-video-library-report-sample.md
- Creator payments + CPM template: assets/templates/creator-payments-cpm-report.md
- Creator payments + CPM example: assets/examples/creator-payments-cpm-report-sample.md
Rules for leaderboard-style outputs:
- Follow the template structure unless the user explicitly asks for a different format.
- Use analytics account links for account-level leaderboard sections.
- Use tracked video detail links for video leaderboard sections.
- Keep numbers compact, for example or
1.4M.180K - Use period-over-period trend markers where the comparison window is available.
- Prefer returning the rendered report plus the source viral.app links when useful.
Rules for Viral Video Library reports:
- Use linked titles that point to the Viral Video Library detail page.
- Use abbreviated metrics, for example or
473K.18.2% - Include a hashtags line for every entry.
- Use a single hook line in the form .
Hook (<archetype>): text + visual + audio - Do not use "Audio not surfaced" phrasing.
- Do not invent fields when insights are missing; use .
not confidently detected
Rules for creator payments + CPM reports:
- Use current in-progress upcoming payouts from Creator Hub for the ranking section.
- Use Creator Hub payout links filtered by both and
creatorIds.campaigns - Compare each payout row against the most recent completed payout window for the same creator and campaign when available.
- Use current vs previous equal-length periods for org-wide KPI deltas.
- Keep payout amounts exact, view totals compact, Effective CPM to 4 decimals, and spend per video to 2 decimals.
当用户需要适用于Slack的摘要或排名报告时,使用内置的报告模板:
- 排行榜模板:assets/templates/leaderboard.md
- 排行榜示例:assets/examples/leaderboard-sample.md
- 热门视频库模板:assets/templates/viral-video-library-report.md
- 热门视频库示例:assets/examples/viral-video-library-report-sample.md
- 创作者付款+CPM模板:assets/templates/creator-payments-cpm-report.md
- 创作者付款+CPM示例:assets/examples/creator-payments-cpm-report-sample.md
排行榜类输出规则:
- 除非用户明确要求其他格式,否则遵循模板结构。
- 账户级排行榜部分使用分析账户链接。
- 视频排行榜部分使用已追踪视频详情链接。
- 数字格式保持简洁,例如或
1.4M。180K - 当有对比窗口时,使用同期环比趋势标记。
- 如有帮助,优先返回渲染后的报告及对应的viral.app链接。
热门视频库报告规则:
- 使用指向热门视频库详情页的链接标题。
- 使用简化指标,例如或
473K。18.2% - 每个条目都包含标签行。
- 使用统一的钩子格式:。
Hook (<archetype>): text + visual + audio - 不要使用“未识别音频”表述。
- 当缺少洞察信息时,不要自行添加字段,使用。
not confidently detected
创作者付款+CPM报告规则:
- 排名部分使用创作者中心当前待处理的即将付款数据。
- 使用按和
creatorIds筛选的创作者中心付款链接。campaigns - 当有可用数据时,将每一行付款数据与同一创作者和活动的最近完成付款周期进行对比。
- 组织级关键绩效指标差值使用当前周期与之前等长周期进行对比。
- 付款金额保持精确,总计金额格式简洁,有效CPM保留4位小数,单视频支出保留2位小数。
Linking Back Into viral.app
跳转至viral.app
When a user would benefit from opening the data in the product UI, include a direct viral.app app link in your response.
Default production base:
text
https://viral.app/appRules:
- Prefer linking to the most specific page the app actually supports.
- For tracked videos and library videos, use dedicated detail pages.
- For accounts and creators, prefer filtered list/dashboard views. The app does not currently expose a dedicated account detail page or creator detail page route.
- For multi-value filters, use comma-separated values in a single query param.
- For date ranges on analytics and creator-hub overview pages, use and
dfwithdt.YYYY-MM-DD - Preserve when linking account or creator-related analytics:
viewModeinternalcompetitorsall
Common routes:
- Analytics overview filtered by tracked account:
text
https://viral.app/app/analytics/overview?accounts=<orgAccountId>&viewMode=internal- Analytics accounts filtered by tracked account:
text
https://viral.app/app/analytics/accounts?accounts=<orgAccountId>&viewMode=internal- Analytics videos filtered by tracked account:
text
https://viral.app/app/analytics/videos?accounts=<orgAccountId>&viewMode=internal- Analytics videos filtered by tracked account and date range:
text
https://viral.app/app/analytics/videos?accounts=<orgAccountId>&viewMode=internal&df=2026-03-01&dt=2026-03-18- Tracked video detail page:
text
https://viral.app/app/analytics/videos/tiktok/7491234567890123456- Analytics overview filtered by creator-owned tracked accounts:
text
https://viral.app/app/analytics/overview?accounts=<orgAccountId1>,<orgAccountId2>&viewMode=all- Creator Hub creators filtered by campaign:
text
https://viral.app/app/creator-hub/creators?campaigns=<campaignId>- Creator Hub creators filtered by search and include archived/inactive creators:
text
https://viral.app/app/creator-hub/creators?search=alex%40example.com&status=all- Creator Hub campaigns filtered by creator:
text
https://viral.app/app/creator-hub/campaigns?creatorIds=<orgCreatorId>- Creator Hub campaign detail page:
text
https://viral.app/app/creator-hub/campaigns/<campaignId>- Creator Hub payouts filtered by creator:
text
https://viral.app/app/creator-hub/payouts/due?creatorIds=<orgCreatorId>- Creator Hub payouts filtered by campaign:
text
https://viral.app/app/creator-hub/payouts/due?campaigns=<campaignId>- Creator Hub upcoming payouts filtered by creator and campaign:
text
https://viral.app/app/creator-hub/payouts/upcoming?creatorIds=<orgCreatorId>&campaigns=<campaignId>- Other payout tabs preserve the same filters:
text
https://viral.app/app/creator-hub/payouts/upcoming?creatorIds=<orgCreatorId>
https://viral.app/app/creator-hub/payouts/canceled?campaigns=<campaignId>
https://viral.app/app/creator-hub/payouts/paid?creatorIds=<orgCreatorId>- Viral video library filtered list:
text
https://viral.app/app/library/viral-videos?search=notion&dateRange=30d&sort=views- Viral video library filtered by brand/region/minimum views:
text
https://viral.app/app/library/viral-videos?brandId=<brandId>®ions=US,GB&minViews=100000&sort=outlier- Viral video library detail page:
text
https://viral.app/app/library/viral-videos/tiktok/7491234567890123456Supported filter keys you can safely use:
- Analytics overview/accounts/videos:
accountsplatformsprojectscontentTypesviewModedfdt
- Analytics overview only:
publicationModetopVideosBytopAccountsBytopCreatorsBytopEntitytopListsPerPage
- Creator Hub creators:
searchcampaignsstatus
- Creator Hub campaigns:
searchstatuscreatorIds
- Creator Hub overview / campaign overview:
campaignscreatorIdsscopepublicationModedfdt
- Creator Hub payouts:
creatorIdscampaigns
- Viral video library:
searchbrandIddateRangesortminViewsminOutlierFactorregionsproductTypesverticalsformatshookArchetypesproductDetectedbrandDetectedmatchedTerms
If you do not know the correct org-scoped IDs yet:
- link to the closest filtered list you can build confidently
- say what the link shows
- avoid inventing unknown IDs or unsupported paths
当用户需要在产品UI中查看数据时,请在回复中包含直接的viral.app应用链接。
默认生产环境基础地址:
text
https://viral.app/app规则:
- 优先链接到应用实际支持的最具体页面。
- 对于已追踪视频和库视频,使用专属详情页。
- 对于账户和创作者,优先使用筛选后的列表/仪表盘视图。目前应用暂未提供专属的账户详情页或创作者详情页路由。
- 多值筛选条件使用单个查询参数,值用逗号分隔。
- 分析页面和创作者中心概览页面的日期范围使用和
df参数,格式为dt。YYYY-MM-DD - 链接账户或创作者相关分析页面时保留参数:
viewModeinternalcompetitorsall
常见路由:
- 按已追踪账户筛选的分析概览:
text
https://viral.app/app/analytics/overview?accounts=<orgAccountId>&viewMode=internal- 按已追踪账户筛选的分析账户页面:
text
https://viral.app/app/analytics/accounts?accounts=<orgAccountId>&viewMode=internal- 按已追踪账户筛选的分析视频页面:
text
https://viral.app/app/analytics/videos?accounts=<orgAccountId>&viewMode=internal- 按已追踪账户和日期范围筛选的分析视频页面:
text
https://viral.app/app/analytics/videos?accounts=<orgAccountId>&viewMode=internal&df=2026-03-01&dt=2026-03-18- 已追踪视频详情页:
text
https://viral.app/app/analytics/videos/tiktok/7491234567890123456- 按创作者拥有的已追踪账户筛选的分析概览:
text
https://viral.app/app/analytics/overview?accounts=<orgAccountId1>,<orgAccountId2>&viewMode=all- 按活动筛选的创作者中心创作者页面:
text
https://viral.app/app/creator-hub/creators?campaigns=<campaignId>- 按搜索关键词筛选并包含已归档/非活跃创作者的创作者中心创作者页面:
text
https://viral.app/app/creator-hub/creators?search=alex%40example.com&status=all- 按创作者筛选的创作者中心活动页面:
text
https://viral.app/app/creator-hub/campaigns?creatorIds=<orgCreatorId>- 创作者中心活动详情页:
text
https://viral.app/app/creator-hub/campaigns/<campaignId>- 按创作者筛选的创作者中心待付款页面:
text
https://viral.app/app/creator-hub/payouts/due?creatorIds=<orgCreatorId>- 按活动筛选的创作者中心待付款页面:
text
https://viral.app/app/creator-hub/payouts/due?campaigns=<campaignId>- 按创作者和活动筛选的创作者中心即将付款页面:
text
https://viral.app/app/creator-hub/payouts/upcoming?creatorIds=<orgCreatorId>&campaigns=<campaignId>- 其他付款标签页保留相同筛选条件:
text
https://viral.app/app/creator-hub/payouts/upcoming?creatorIds=<orgCreatorId>
https://viral.app/app/creator-hub/payouts/canceled?campaigns=<campaignId>
https://viral.app/app/creator-hub/payouts/paid?creatorIds=<orgCreatorId>- 筛选后的热门视频库列表:
text
https://viral.app/app/library/viral-videos?search=notion&dateRange=30d&sort=views- 按品牌/地区/最低播放量筛选的热门视频库:
text
https://viral.app/app/library/viral-videos?brandId=<brandId>®ions=US,GB&minViews=100000&sort=outlier- 热门视频库详情页:
text
https://viral.app/app/library/viral-videos/tiktok/7491234567890123456可安全使用的筛选键:
- 分析概览/账户/视频:
accountsplatformsprojectscontentTypesviewModedfdt
- 仅分析概览:
publicationModetopVideosBytopAccountsBytopCreatorsBytopEntitytopListsPerPage
- 创作者中心创作者:
searchcampaignsstatus
- 创作者中心活动:
searchstatuscreatorIds
- 创作者中心概览/活动概览:
campaignscreatorIdsscopepublicationModedfdt
- 创作者中心付款:
creatorIdscampaigns
- 热门视频库:
searchbrandIddateRangesortminViewsminOutlierFactorregionsproductTypesverticalsformatshookArchetypesproductDetectedbrandDetectedmatchedTerms
如果不知道正确的组织范围ID:
- 链接到你能确定构建的最接近的筛选列表页面
- 说明该链接展示的内容
- 不要编造未知ID或使用不支持的路径
Safety rules
安全规则
- Confirm intent before ,
POST,PUT, orPATCHunless the user explicitly asked for that mutation.DELETE - Run before mutations to verify required flags and body schema.
<command> --help - Prefer narrow queries first (, filters, date ranges) before broad exports.
--per-page - Keep output machine-readable by default; only switch format when requested.
- 执行、
POST、PUT或PATCH操作前需确认用户意图,除非用户明确要求执行该修改操作。DELETE - 执行修改操作前运行以验证所需参数和请求体结构。
<command> --help - 优先执行范围较窄的查询(、筛选条件、日期范围),再进行大范围导出。
--per-page - 默认输出机器可读格式;仅在用户要求时切换格式。
Troubleshooting
故障排除
- : missing/invalid API key; verify
401 UNAUTHORIZEDorVIRAL_API_KEYvalue.-H "x-api-key: ..." - can also happen with expired/revoked keys or wrong org context.
401 - or retry hints: back off and retry later; inspect response headers such as
429.Retry-After - Empty arrays: validate filters, project/account IDs, and date range constraints.
data - Never expose API keys in commits; rotate keys after sharing for tests.
- :缺少/无效API密钥;验证
401 UNAUTHORIZED或VIRAL_API_KEY的值。-H "x-api-key: ..." - 错误也可能由密钥过期/撤销或组织上下文错误导致。
401 - 或重试提示:暂停后重试;查看响应头如
429。Retry-After - 空数组:验证筛选条件、项目/账户ID以及日期范围约束。
data - 切勿在提交的代码中暴露API密钥;测试分享后需轮换密钥。
Agent defaults
Agent默认设置
- Output defaults to JSON (unless overridden).
RSH_OUTPUT_FORMAT=json - Auto-pagination defaults to disabled () for predictable scripted behavior.
RSH_NO_PAGINATE=true - Summarize key metrics after reads and explicitly call out write-side effects after mutations.
- 输出默认为JSON格式(,除非被覆盖)。
RSH_OUTPUT_FORMAT=json - 默认禁用自动分页()以实现可预测的脚本行为。
RSH_NO_PAGINATE=true - 读取操作后汇总关键指标,修改操作后明确说明写入侧影响。