fix-virality
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese/fix-virality
/fix-virality
Fix the highest priority viral growth gap.
修复优先级最高的病毒式增长短板。
What This Does
功能说明
- Invoke to audit shareability
/check-virality - Identify highest priority gap
- Fix that one issue
- Verify the fix
- Report what was done
This is a fixer. It fixes one issue at a time. Run again for next issue. Use for full setup.
/virality- 调用审核可分享性
/check-virality - 识别优先级最高的短板
- 修复该问题
- 验证修复效果
- 报告处理内容
这是一个修复工具,每次仅修复一个问题。如需处理下一个问题,请再次运行。使用进行完整的病毒式增长设置。
/viralityProcess
操作流程
1. Run Primitive
1. 运行基础技能
Invoke skill to get prioritized findings.
/check-virality调用技能获取按优先级排序的问题结果。
/check-virality2. Fix Priority Order
2. 修复优先级顺序
Fix in this order:
- P0: No OG tags, no root metadata
- P1: Dynamic OG images, share mechanics, Twitter cards
- P2: Referral system, UTM tracking, share prompts
- P3: Launch assets, changelog
按照以下顺序修复:
- P0:无OG标签、无基础元数据
- P1:动态OG图片、分享机制、Twitter卡片
- P2:推荐系统、UTM追踪、分享提示
- P3:上线素材、更新日志
3. Execute Fix
3. 执行修复
No OG tags (P0):
Add to :
app/layout.tsxtypescript
import type { Metadata } from 'next';
export const metadata: Metadata = {
metadataBase: new URL(process.env.NEXT_PUBLIC_APP_URL!),
title: {
default: 'Your Product - Tagline',
template: '%s | Your Product',
},
description: 'One sentence that makes people want to try it.',
openGraph: {
type: 'website',
locale: 'en_US',
siteName: 'Your Product',
images: ['/og-default.png'],
},
twitter: {
card: 'summary_large_image',
creator: '@yourhandle',
},
};No dynamic OG images (P1):
bash
pnpm add @vercel/ogCreate :
app/api/og/route.tsxtypescript
import { ImageResponse } from 'next/og';
export const runtime = 'edge';
export async function GET(request: Request) {
const { searchParams } = new URL(request.url);
const title = searchParams.get('title') ?? 'Your Product';
return new ImageResponse(
(
<div style={{
height: '100%',
width: '100%',
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
backgroundColor: '#000',
color: '#fff',
}}>
<div style={{ fontSize: 60, fontWeight: 'bold' }}>{title}</div>
</div>
),
{ width: 1200, height: 630 }
);
}No share button (P1):
Create :
components/share-button.tsxtypescript
'use client';
import { useState } from 'react';
export function ShareButton({ url, title }: { url: string; title: string }) {
const [copied, setCopied] = useState(false);
const share = async () => {
if (navigator.share) {
await navigator.share({ url, title });
} else {
await navigator.clipboard.writeText(url);
setCopied(true);
setTimeout(() => setCopied(false), 2000);
}
};
return <button onClick={share}>{copied ? 'Copied!' : 'Share'}</button>;
}No referral system (P2):
Add referral tracking to database schema and implement referral code generation.
无OG标签(P0):
在中添加以下代码:
app/layout.tsxtypescript
import type { Metadata } from 'next';
export const metadata: Metadata = {
metadataBase: new URL(process.env.NEXT_PUBLIC_APP_URL!),
title: {
default: 'Your Product - Tagline',
template: '%s | Your Product',
},
description: 'One sentence that makes people want to try it.',
openGraph: {
type: 'website',
locale: 'en_US',
siteName: 'Your Product',
images: ['/og-default.png'],
},
twitter: {
card: 'summary_large_image',
creator: '@yourhandle',
},
};无动态OG图片(P1):
bash
pnpm add @vercel/og创建:
app/api/og/route.tsxtypescript
import { ImageResponse } from 'next/og';
export const runtime = 'edge';
export async function GET(request: Request) {
const { searchParams } = new URL(request.url);
const title = searchParams.get('title') ?? 'Your Product';
return new ImageResponse(
(
<div style={{
height: '100%',
width: '100%',
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
backgroundColor: '#000',
color: '#fff',
}}>
<div style={{ fontSize: 60, fontWeight: 'bold' }}>{title}</div>
</div>
),
{ width: 1200, height: 630 }
);
}无分享按钮(P1):
创建:
components/share-button.tsxtypescript
'use client';
import { useState } from 'react';
export function ShareButton({ url, title }: { url: string; title: string }) {
const [copied, setCopied] = useState(false);
const share = async () => {
if (navigator.share) {
await navigator.share({ url, title });
} else {
await navigator.clipboard.writeText(url);
setCopied(true);
setTimeout(() => setCopied(false), 2000);
}
};
return <button onClick={share}>{copied ? 'Copied!' : 'Share'}</button>;
}无推荐系统(P2):
在数据库 schema 中添加推荐追踪功能,并实现推荐码生成逻辑。
4. Verify
4. 验证修复
After fix:
bash
undefined修复完成后:
bash
undefinedTest OG tags
测试OG标签
curl -s https://yoursite.com | grep -E "og:|twitter:" | head -10
curl -s https://yoursite.com | grep -E "og:|twitter:" | head -10
Test OG image endpoint
测试OG图片接口
curl -I "http://localhost:3000/api/og?title=Test"
Or use OG validators:
- https://www.opengraph.xyz/
- https://cards-dev.twitter.com/validatorcurl -I "http://localhost:3000/api/og?title=Test"
或使用OG验证工具:
- https://www.opengraph.xyz/
- https://cards-dev.twitter.com/validator5. Report
5. 提交报告
Fixed: [P0] No OG tags configured
Updated: app/layout.tsx
- Added metadataBase
- Added openGraph configuration
- Added Twitter card configuration
Verified: curl shows og:title, og:image, twitter:card
Next highest priority: [P1] No dynamic OG images
Run /fix-virality again to continue.已修复:[P0] 未配置OG标签
更新文件:app/layout.tsx
- 添加了metadataBase
- 配置了openGraph
- 配置了Twitter卡片
验证结果:curl命令返回了og:title、og:image、twitter:card
下一个最高优先级问题:[P1] 无动态OG图片
再次运行/fix-virality继续修复。Branching
分支管理
Before making changes:
bash
git checkout -b feat/virality-$(date +%Y%m%d)修改前先创建分支:
bash
git checkout -b feat/virality-$(date +%Y%m%d)Single-Issue Focus
单问题聚焦
Each viral feature should be tested independently. Fix one at a time:
- Verify share previews look correct
- Test on actual social platforms
- Measure impact
Run repeatedly to build shareability.
/fix-virality每个病毒式传播功能应独立测试,一次修复一个:
- 验证分享预览显示正确
- 在真实社交平台测试
- 衡量影响效果
重复运行/fix-virality逐步提升产品的可分享性。
Related
相关技能
- - The primitive (audit only)
/check-virality - - Create issues without fixing
/log-virality-issues - - Full viral growth setup
/virality - - Launch planning
/launch-strategy
- - 基础技能(仅审核)
/check-virality - - 仅记录问题不修复
/log-virality-issues - - 完整病毒式增长设置
/virality - - 上线规划
/launch-strategy