[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M77W4RS7K4TD9KTTRNAYTYAA":3,"skill-same:01M77W4RS7K4TD9KTTRNAYTYAA":48},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":28,"repositoryHtmlUrl":29,"repositoryHomepageUrl":30,"ownerHtmlUrl":31,"ownerBlogUrl":6,"ownerDescription":32,"updatedAt":33,"install":34,"resources":47},"01M77W4RS7K4TD9KTTRNAYTYAA","telegram-premium-features",null,"Complete implementation guide for Telegram\u002FTeamgram premium features and monetization (v2.0.0). Use when building membership systems, payment integration, subscription lifecycle, coupons, analytics, and global payment solutions. Covers ten iterations of optimization from basic implementation to production-ready systems.","Lord1Egypt\u002Fawesome-skill-forge","Lord1Egypt","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F99746359?v=4","01M7592YDNT0XK9WJ0T2MQVPDN","Mohamed Mounir Ali AL Keshita","01M75GRFNHC8VZNWEB8DKDE433",3,"MIT","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fcommunity\u002Fclawhub\u002Ft\u002Ftelegram-premium-features\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: telegram-premium-features\ndescription: Complete implementation guide for Telegram\u002FTeamgram premium features and monetization (v2.0.0). Use when building membership systems, payment integration, subscription lifecycle, coupons, analytics, and global payment solutions. Covers ten iterations of optimization from basic implementation to production-ready systems.\nversion: 2.0.0\n---\n\n# Telegram Premium Features Implementation v2.0.0\n\nComplete guide for implementing monetization features in Telegram-compatible backends.\n\n> 📚 **十次版本迭代优化** (v1.0.0 → v2.0.0)\n> \n> 本技能经过十次迭代完善，从基础会员系统到全球化支付解决方案的完整知识体系。\n\n## 版本迭代历程\n\n| 版本 | 主题 | 文档 |\n|------|------|------|\n| v1.0.0 | 基础实现 | 本指南 |\n| v1.1.0 | 支付网关对比 | [查看](references\u002Fv1.1.0-payment-gateways.md) |\n| v1.2.0 | 订阅生命周期 | [查看](references\u002Fv1.2.0-lifecycle.md) |\n| v1.3.0 | 优惠券促销 | [查看](references\u002Fv1.3.0-coupons.md) |\n| v1.4.0 | 税务合规 | [查看](references\u002Fv1.4.0-tax.md) |\n| v1.5.0 | 退款争议 | [查看](references\u002Fv1.5.0-refunds.md) |\n| v1.6.0 | 推荐奖励 | [查看](references\u002Fv1.6.0-referral.md) |\n| v1.7.0 | 数据分析 | [查看](references\u002Fv1.7.0-analytics.md) |\n| v1.8.0 | A\u002FB测试 | [查看](references\u002Fv1.8.0-ab-testing.md) |\n| v1.9.0 | 国际化 | [查看](references\u002Fv1.9.0-i18n.md) |\n| v2.0.0 | 完整总结 | [查看](references\u002Fv2.0.0-final.md) |\n\n## 快速导航\n\n**基础搭建**: 从 [Membership System](#implementation-membership-system) 开始\n\n**支付集成**: 查看 [v1.1.0支付网关](references\u002Fv1.1.0-payment-gateways.md)\n\n**运营优化**: 参考 [v1.3.0优惠券](references\u002Fv1.3.0-coupons.md) 和 [v1.7.0数据分析](references\u002Fv1.7.0-analytics.md)\n\n**全球化**: 查看 [v1.9.0国际化](references\u002Fv1.9.0-i18n.md)\n\n## Overview\n\nThis guide covers common premium features for IM platforms:\n- Membership\u002Fsubscription systems\n- Usage quotas and limits\n- Payment integration\n- Feature gating\n- Admin analytics\n\n## Core Concepts\n\n### Feature Gating Model\n\n```\n┌─────────────────────────────────────────────────────────┐\n│                    Feature Check Flow                    │\n├─────────────────────────────────────────────────────────┤\n│  1. User requests feature (e.g., send large file)       │\n│  2. System checks user tier (free\u002Fpremium)              │\n│  3. If premium → allow                                  │\n│  4. If free → check quota                               │\n│  5. If quota exceeded → show upgrade prompt             │\n└─────────────────────────────────────────────────────────┘\n```\n\n### User Tiers\n\n| Tier | Features | Price |\n|------|----------|-------|\n| **Free** | Basic messaging, 100MB file limit, 1 month history | Free |\n| **Basic** | 500MB file limit, 6 months history, no ads | $4.99\u002Fmo |\n| **Premium** | 2GB file limit, unlimited history, priority support | $9.99\u002Fmo |\n| **Business** | 4GB file limit, unlimited history, custom domains | $19.99\u002Fmo |\n\n## Implementation: Membership System\n\n### Database Schema\n\n```sql\n-- User subscription status\nCREATE TABLE user_subscriptions (\n    id BIGINT PRIMARY KEY AUTO_INCREMENT,\n    user_id BIGINT NOT NULL,\n    tier ENUM('free', 'basic', 'premium', 'business') DEFAULT 'free',\n    status ENUM('active', 'expired', 'cancelled') DEFAULT 'active',\n    started_at BIGINT DEFAULT 0,\n    expires_at BIGINT DEFAULT 0,\n    auto_renew BOOLEAN DEFAULT FALSE,\n    payment_method VARCHAR(50),\n    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,\n    updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,\n    UNIQUE KEY uk_user_id (user_id),\n    INDEX idx_expires (expires_at),\n    INDEX idx_status (status)\n) ENGINE=InnoDB;\n\n-- Subscription plans\nCREATE TABLE subscription_plans (\n    id INT PRIMARY KEY AUTO_INCREMENT,\n    name VARCHAR(50) NOT NULL,\n    tier ENUM('basic', 'premium', 'business') NOT NULL,\n    price_monthly DECIMAL(10,2) NOT NULL,\n    price_yearly DECIMAL(10,2) NOT NULL,\n    features JSON,\n    is_active BOOLEAN DEFAULT TRUE,\n    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP\n) ENGINE=InnoDB;\n\n-- Insert default plans\nINSERT INTO subscription_plans (name, tier, price_monthly, price_yearly, features) VALUES\n('Basic', 'basic', 4.99, 49.99, '{\"file_limit\": 536870912, \"history_months\": 6, \"ads\": false}'),\n('Premium', 'premium', 9.99, 99.99, '{\"file_limit\": 2147483648, \"history_months\": -1, \"priority_support\": true}'),\n('Business', 'business', 19.99, 199.99, '{\"file_limit\": 4294967296, \"history_months\": -1, \"custom_domain\": true}');\n```\n\n### Quota Tracking\n\n```sql\n-- User quotas (daily\u002Fmonthly limits)\nCREATE TABLE user_quotas (\n    id BIGINT PRIMARY KEY AUTO_INCREMENT,\n    user_id BIGINT NOT NULL,\n    quota_type VARCHAR(50) NOT NULL,\n    limit_value BIGINT DEFAULT 0,\n    used_value BIGINT DEFAULT 0,\n    reset_at BIGINT DEFAULT 0,\n    UNIQUE KEY uk_user_type (user_id, quota_type)\n) ENGINE=InnoDB;\n\n-- Quota types: messages_daily, files_daily, storage_used\n```\n\n### Core Implementation\n\n```go\n\u002F\u002F subscription_manager.go\n\ntype SubscriptionManager struct {\n    db    *sqlx.DB\n    redis *redis.Client\n}\n\n\u002F\u002F CheckUserTier 检查用户等级\nfunc (m *SubscriptionManager) CheckUserTier(ctx context.Context, userID int64) (Tier, error) {\n    \u002F\u002F Try cache\n    cacheKey := fmt.Sprintf(\"user:tier:%d\", userID)\n    cached, err := m.redis.Get(ctx, cacheKey).Result()\n    if err == nil {\n        return Tier(cached), nil\n    }\n    \n    \u002F\u002F Query database\n    var sub UserSubscription\n    err = m.db.GetContext(ctx, &sub, \n        \"SELECT * FROM user_subscriptions WHERE user_id = ?\", userID)\n    if err == sql.ErrNoRows {\n        return TierFree, nil\n    }\n    if err != nil {\n        return TierFree, err\n    }\n    \n    \u002F\u002F Check expiration\n    if sub.Status == \"expired\" || (sub.ExpiresAt > 0 && sub.ExpiresAt \u003C time.Now().Unix()) {\n        m.ExpireSubscription(ctx, userID)\n        return TierFree, nil\n    }\n    \n    \u002F\u002F Cache result\n    m.redis.Set(ctx, cacheKey, string(sub.Tier), 5*time.Minute)\n    \n    return Tier(sub.Tier), nil\n}\n\n\u002F\u002F CheckFeatureAccess 检查功能访问权限\nfunc (m *SubscriptionManager) CheckFeatureAccess(ctx context.Context, userID int64, feature string) (bool, error) {\n    tier, err := m.CheckUserTier(ctx, userID)\n    if err != nil {\n        return false, err\n    }\n    \n    \u002F\u002F Feature requirement mapping\n    requirements := map[string]Tier{\n        \"large_files\":     TierBasic,\n        \"unlimited_history\": TierPremium,\n        \"custom_domain\":   TierBusiness,\n        \"priority_support\": TierPremium,\n    }\n    \n    requiredTier, exists := requirements[feature]\n    if !exists {\n        return true, nil \u002F\u002F Feature doesn't require tier\n    }\n    \n    return tier >= requiredTier, nil\n}\n\n\u002F\u002F CheckQuota 检查配额\nfunc (m *SubscriptionManager) CheckQuota(ctx context.Context, userID int64, quotaType string) (bool, int64, error) {\n    tier, _ := m.CheckUserTier(ctx, userID)\n    \n    \u002F\u002F Get tier limits\n    limits := m.getTierLimits(tier)\n    limit := limits[quotaType]\n    \n    if limit \u003C 0 {\n        return true, -1, nil \u002F\u002F Unlimited\n    }\n    \n    \u002F\u002F Get current usage\n    var quota UserQuota\n    err := m.db.GetContext(ctx, &quota,\n        \"SELECT * FROM user_quotas WHERE user_id = ? AND quota_type = ?\",\n        userID, quotaType)\n    \n    if err == sql.ErrNoRows {\n        \u002F\u002F No record yet\n        return true, limit, nil\n    }\n    if err != nil {\n        return false, 0, err\n    }\n    \n    \u002F\u002F Check if need reset\n    if quota.ResetAt \u003C time.Now().Unix() {\n        m.resetQuota(ctx, userID, quotaType)\n        return true, limit, nil\n    }\n    \n    remaining := limit - quota.UsedValue\n    return remaining > 0, remaining, nil\n}\n\n\u002F\u002F UseQuota 使用配额\nfunc (m *SubscriptionManager) UseQuota(ctx context.Context, userID int64, quotaType string, amount int64) error {\n    _, err := m.db.ExecContext(ctx,\n        `INSERT INTO user_quotas (user_id, quota_type, used_value, reset_at) \n         VALUES (?, ?, ?, ?)\n         ON DUPLICATE KEY UPDATE used_value = used_value + VALUES(used_value)`,\n        userID, quotaType, amount, getNextResetTime())\n    return err\n}\n\nfunc (m *SubscriptionManager) getTierLimits(tier Tier) map[string]int64 {\n    limits := map[Tier]map[string]int64{\n        TierFree: {\n            \"messages_daily\": 1000,\n            \"files_daily\":    50,\n            \"file_size\":      100 * 1024 * 1024, \u002F\u002F 100MB\n            \"storage\":        1024 * 1024 * 1024, \u002F\u002F 1GB\n        },\n        TierBasic: {\n            \"messages_daily\": 10000,\n            \"files_daily\":    500,\n            \"file_size\":      500 * 1024 * 1024, \u002F\u002F 500MB\n            \"storage\":        10 * 1024 * 1024 * 1024, \u002F\u002F 10GB\n        },\n        TierPremium: {\n            \"messages_daily\": -1, \u002F\u002F Unlimited\n            \"files_daily\":    -1,\n            \"file_size\":      2 * 1024 * 1024 * 1024, \u002F\u002F 2GB\n            \"storage\":        100 * 1024 * 1024 * 1024, \u002F\u002F 100GB\n        },\n    }\n    return limits[tier]\n}\n```\n\n## Implementation: Payment Integration\n\n### Stripe Integration\n\n```go\n\u002F\u002F stripe_payment.go\n\nimport \"github.com\u002Fstripe\u002Fstripe-go\u002Fv74\"\n\ntype StripePayment struct {\n    client *stripe.Client\n}\n\nfunc (p *StripePayment) CreateCheckoutSession(ctx context.Context, userID int64, planID int) (string, error) {\n    \u002F\u002F Get plan details\n    plan, err := p.getPlan(ctx, planID)\n    if err != nil {\n        return \"\", err\n    }\n    \n    params := &stripe.CheckoutSessionParams{\n        CustomerEmail: stripe.String(getUserEmail(userID)),\n        LineItems: []*stripe.CheckoutSessionLineItemParams{\n            {\n                PriceData: &stripe.CheckoutSessionLineItemPriceDataParams{\n                    Currency: stripe.String(\"usd\"),\n                    ProductData: &stripe.CheckoutSessionLineItemPriceDataProductDataParams{\n                        Name: stripe.String(plan.Name),\n                    },\n                    UnitAmount: stripe.Int64(int64(plan.Price * 100)), \u002F\u002F cents\n                },\n                Quantity: stripe.Int64(1),\n            },\n        },\n        Mode:       stripe.String(string(stripe.CheckoutSessionModeSubscription)),\n        SuccessURL: stripe.String(fmt.Sprintf(\"https:\u002F\u002Fyourapp.com\u002Fsuccess?user=%d\", userID)),\n        CancelURL:  stripe.String(\"https:\u002F\u002Fyourapp.com\u002Fcancel\"),\n        Metadata: map[string]string{\n            \"user_id\": fmt.Sprintf(\"%d\", userID),\n            \"plan_id\": fmt.Sprintf(\"%d\", planID),\n        },\n    }\n    \n    session, err := stripe.CheckoutSession(params)\n    if err != nil {\n        return \"\", err\n    }\n    \n    return session.URL, nil\n}\n\nfunc (p *StripePayment) HandleWebhook(payload []byte, sig string) error {\n    event, err := stripe.Webhook(payload, sig, webhookSecret)\n    if err != nil {\n        return err\n    }\n    \n    switch event.Type {\n    case \"checkout.session.completed\":\n        var session stripe.CheckoutSession\n        err := json.Unmarshal(event.Data.Raw, &session)\n        if err != nil {\n            return err\n        }\n        \n        userID, _ := strconv.ParseInt(session.Metadata[\"user_id\"], 10, 64)\n        planID, _ := strconv.Atoi(session.Metadata[\"plan_id\"])\n        \n        \u002F\u002F Activate subscription\n        p.activateSubscription(userID, planID, session.Subscription.ID)\n        \n    case \"invoice.payment_failed\":\n        \u002F\u002F Handle failed payment\n        p.handlePaymentFailure(event)\n    }\n    \n    return nil\n}\n```\n\n### Webhook Handler\n\n```go\n\u002F\u002F payment_webhook.go\n\nfunc (s *Server) PaymentWebhook(ctx context.Context, req *PaymentWebhookReq) (*Bool, error) {\n    switch req.Provider {\n    case \"stripe\":\n        err := s.stripePayment.HandleWebhook(req.Payload, req.Signature)\n        if err != nil {\n            return BoolFalse, err\n        }\n    case \"alipay\":\n        err := s.alipayPayment.HandleNotify(req.Payload)\n        if err != nil {\n            return BoolFalse, err\n        }\n    }\n    \n    return BoolTrue, nil\n}\n```\n\n## Implementation: Feature Gating\n\n### Middleware Pattern\n\n```go\n\u002F\u002F middleware\u002Fpremium_middleware.go\n\nfunc PremiumMiddleware(next HandlerFunc) HandlerFunc {\n    return func(ctx context.Context, req Request) (Response, error) {\n        userID := getUserIDFromContext(ctx)\n        feature := getFeatureFromRequest(req)\n        \n        \u002F\u002F Check access\n        hasAccess, err := subscriptionManager.CheckFeatureAccess(ctx, userID, feature)\n        if err != nil {\n            return nil, err\n        }\n        \n        if !hasAccess {\n            return nil, status.Error(codes.PermissionDenied, \n                \"This feature requires premium subscription\")\n        }\n        \n        \u002F\u002F Check quota for usage-based features\n        if isQuotaBased(feature) {\n            allowed, remaining, err := subscriptionManager.CheckQuota(ctx, userID, feature)\n            if err != nil {\n                return nil, err\n            }\n            if !allowed {\n                return nil, status.Errorf(codes.ResourceExhausted,\n                    \"Quota exceeded. Upgrade to get more.\")\n            }\n            \u002F\u002F Update context with remaining quota\n            ctx = context.WithValue(ctx, \"remaining_quota\", remaining)\n        }\n        \n        return next(ctx, req)\n    }\n}\n```\n\n### Usage in Handlers\n\n```go\nfunc (s *Server) MessagesSendDocument(ctx context.Context, req *SendDocumentReq) (*Message, error) {\n    userID := getUserIDFromContext(ctx)\n    fileSize := req.File.Size\n    \n    \u002F\u002F Check file size limit\n    tier, _ := s.subManager.CheckUserTier(ctx, userID)\n    limits := s.subManager.getTierLimits(tier)\n    \n    if fileSize > limits[\"file_size\"] {\n        return nil, status.Errorf(codes.FailedPrecondition,\n            \"File too large. Max size for your tier: %d MB\", \n            limits[\"file_size\"]\u002F(1024*1024))\n    }\n    \n    \u002F\u002F Check and use quota\n    allowed, _, err := s.subManager.CheckQuota(ctx, userID, \"files_daily\")\n    if err != nil {\n        return nil, err\n    }\n    if !allowed {\n        return nil, status.Errorf(codes.ResourceExhausted,\n            \"Daily file upload limit reached. Upgrade for unlimited uploads.\")\n    }\n    \n    \u002F\u002F Use quota\n    s.subManager.UseQuota(ctx, userID, \"files_daily\", 1)\n    \n    \u002F\u002F Process document...\n}\n```\n\n## Implementation: Admin Dashboard\n\n### Revenue Analytics\n\n```go\n\u002F\u002F admin\u002Fanalytics.go\n\ntype RevenueAnalytics struct {\n    db *sqlx.DB\n}\n\nfunc (a *RevenueAnalytics) GetRevenueReport(ctx context.Context, start, end time.Time) (*RevenueReport, error) {\n    query := `\n        SELECT \n            DATE(created_at) as date,\n            SUM(amount) as revenue,\n            COUNT(*) as transactions,\n            tier,\n            payment_method\n        FROM premium_transactions\n        WHERE status = 1 \n          AND created_at BETWEEN ? AND ?\n        GROUP BY DATE(created_at), tier, payment_method\n        ORDER BY date DESC\n    `\n    \n    var rows []RevenueRow\n    err := a.db.SelectContext(ctx, &rows, query, start, end)\n    if err != nil {\n        return nil, err\n    }\n    \n    return &RevenueReport{\n        Rows:       rows,\n        Total:      sumRevenue(rows),\n        StartDate:  start,\n        EndDate:    end,\n    }, nil\n}\n\nfunc (a *RevenueAnalytics) GetUserRetention(ctx context.Context) (*RetentionReport, error) {\n    query := `\n        SELECT \n            tier,\n            COUNT(*) as total_users,\n            SUM(CASE WHEN expires_at > NOW() THEN 1 ELSE 0 END) as active_users,\n            SUM(CASE WHEN auto_renew = 1 THEN 1 ELSE 0 END) as auto_renew_users\n        FROM user_subscriptions\n        GROUP BY tier\n    `\n    \n    var rows []RetentionRow\n    err := a.db.SelectContext(ctx, &rows, query)\n    return &RetentionReport{Rows: rows}, err\n}\n```\n\n## Client-Side Integration\n\n### Upgrade Prompt UI\n\n```go\n\u002F\u002F Client receives error and shows upgrade dialog\nfunc handleSendFileError(err error) {\n    if status.Code(err) == codes.FailedPrecondition {\n        \u002F\u002F Show upgrade dialog\n        showUpgradeDialog(\n            title: \"File Too Large\",\n            message: \"Upgrade to Premium to send files up to 2GB\",\n            plans: getAvailablePlans()\n        )\n    } else if status.Code(err) == codes.ResourceExhausted {\n        \u002F\u002F Show quota exceeded dialog\n        showUpgradeDialog(\n            title: \"Daily Limit Reached\",\n            message: \"You've reached your daily upload limit. Upgrade for unlimited uploads.\",\n            plans: getAvailablePlans()\n        )\n    }\n}\n```\n\n## Testing\n\n### Unit Tests\n\n```go\nfunc TestSubscriptionManager(t *testing.T) {\n    ctx := context.Background()\n    manager := NewSubscriptionManager(testDB, testRedis)\n    \n    t.Run(\"CheckUserTier\", func(t *testing.T) {\n        \u002F\u002F Free user\n        tier, err := manager.CheckUserTier(ctx, 1)\n        assert.NoError(t, err)\n        assert.Equal(t, TierFree, tier)\n        \n        \u002F\u002F Premium user\n        tier, err = manager.CheckUserTier(ctx, 2)\n        assert.NoError(t, err)\n        assert.Equal(t, TierPremium, tier)\n    })\n    \n    t.Run(\"CheckFeatureAccess\", func(t *testing.T) {\n        \u002F\u002F Free user can't access premium feature\n        hasAccess, err := manager.CheckFeatureAccess(ctx, 1, \"large_files\")\n        assert.NoError(t, err)\n        assert.False(t, hasAccess)\n        \n        \u002F\u002F Premium user can access\n        hasAccess, err = manager.CheckFeatureAccess(ctx, 2, \"large_files\")\n        assert.NoError(t, err)\n        assert.True(t, hasAccess)\n    })\n    \n    t.Run(\"CheckQuota\", func(t *testing.T) {\n        \u002F\u002F Free user has limited quota\n        allowed, remaining, err := manager.CheckQuota(ctx, 1, \"files_daily\")\n        assert.NoError(t, err)\n        assert.True(t, allowed)\n        assert.Equal(t, int64(50), remaining)\n        \n        \u002F\u002F Premium user has unlimited\n        allowed, remaining, err = manager.CheckQuota(ctx, 2, \"files_daily\")\n        assert.NoError(t, err)\n        assert.True(t, allowed)\n        assert.Equal(t, int64(-1), remaining) \u002F\u002F Unlimited\n    })\n}\n```\n\n## Best Practices\n\n1. **Graceful Degradation**: Free users should still have usable experience\n2. **Clear Communication**: Always tell users why a feature is blocked\n3. **Easy Upgrade**: One-click upgrade flow\n4. **Fair Pricing**: Transparent pricing with clear value proposition\n5. **Analytics**: Track conversion rates and user behavior\n\n## References\n\n- [Stripe Documentation](https:\u002F\u002Fstripe.com\u002Fdocs)\n- [PayPal Developer](https:\u002F\u002Fdeveloper.paypal.com\u002F)\n- [RevenueCat (mobile subscriptions)](https:\u002F\u002Fwww.revenuecat.com\u002F)\n","# Telegram Premium Features Implementation v2.0.0\n\nComplete guide for implementing monetization features in Telegram-compatible backends.\n\n> 📚 **十次版本迭代优化** (v1.0.0 → v2.0.0)\n> \n> 本技能经过十次迭代完善，从基础会员系统到全球化支付解决方案的完整知识体系。\n\n## 版本迭代历程\n\n| 版本 | 主题 | 文档 |\n|------|------|------|\n| v1.0.0 | 基础实现 | 本指南 |\n| v1.1.0 | 支付网关对比 | [查看](references\u002Fv1.1.0-payment-gateways.md) |\n| v1.2.0 | 订阅生命周期 | [查看](references\u002Fv1.2.0-lifecycle.md) |\n| v1.3.0 | 优惠券促销 | [查看](references\u002Fv1.3.0-coupons.md) |\n| v1.4.0 | 税务合规 | [查看](references\u002Fv1.4.0-tax.md) |\n| v1.5.0 | 退款争议 | [查看](references\u002Fv1.5.0-refunds.md) |\n| v1.6.0 | 推荐奖励 | [查看](references\u002Fv1.6.0-referral.md) |\n| v1.7.0 | 数据分析 | [查看](references\u002Fv1.7.0-analytics.md) |\n| v1.8.0 | A\u002FB测试 | [查看](references\u002Fv1.8.0-ab-testing.md) |\n| v1.9.0 | 国际化 | [查看](references\u002Fv1.9.0-i18n.md) |\n| v2.0.0 | 完整总结 | [查看](references\u002Fv2.0.0-final.md) |\n\n## 快速导航\n\n**基础搭建**: 从 [Membership System](#implementation-membership-system) 开始\n\n**支付集成**: 查看 [v1.1.0支付网关](references\u002Fv1.1.0-payment-gateways.md)\n\n**运营优化**: 参考 [v1.3.0优惠券](references\u002Fv1.3.0-coupons.md) 和 [v1.7.0数据分析](references\u002Fv1.7.0-analytics.md)\n\n**全球化**: 查看 [v1.9.0国际化](references\u002Fv1.9.0-i18n.md)\n\n## Overview\n\nThis guide covers common premium features for IM platforms:\n- Membership\u002Fsubscription systems\n- Usage quotas and limits\n- Payment integration\n- Feature gating\n- Admin analytics\n\n## Core Concepts\n\n### Feature Gating Model\n\n```\n┌─────────────────────────────────────────────────────────┐\n│                    Feature Check Flow                    │\n├─────────────────────────────────────────────────────────┤\n│  1. User requests feature (e.g., send large file)       │\n│  2. System checks user tier (free\u002Fpremium)              │\n│  3. If premium → allow                                  │\n│  4. If free → check quota                               │\n│  5. If quota exceeded → show upgrade prompt             │\n└─────────────────────────────────────────────────────────┘\n```\n\n### User Tiers\n\n| Tier | Features | Price |\n|------|----------|-------|\n| **Free** | Basic messaging, 100MB file limit, 1 month history | Free |\n| **Basic** | 500MB file limit, 6 months history, no ads | $4.99\u002Fmo |\n| **Premium** | 2GB file limit, unlimited history, priority support | $9.99\u002Fmo |\n| **Business** | 4GB file limit, unlimited history, custom domains | $19.99\u002Fmo |\n\n## Implementation: Membership System\n\n### Database Schema\n\n```sql\n-- User subscription status\nCREATE TABLE user_subscriptions (\n    id BIGINT PRIMARY KEY AUTO_INCREMENT,\n    user_id BIGINT NOT NULL,\n    tier ENUM('free', 'basic', 'premium', 'business') DEFAULT 'free',\n    status ENUM('active', 'expired', 'cancelled') DEFAULT 'active',\n    started_at BIGINT DEFAULT 0,\n    expires_at BIGINT DEFAULT 0,\n    auto_renew BOOLEAN DEFAULT FALSE,\n    payment_method VARCHAR(50),\n    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,\n    updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,\n    UNIQUE KEY uk_user_id (user_id),\n    INDEX idx_expires (expires_at),\n    INDEX idx_status (status)\n) ENGINE=InnoDB;\n\n-- Subscription plans\nCREATE TABLE subscription_plans (\n    id INT PRIMARY KEY AUTO_INCREMENT,\n    name VARCHAR(50) NOT NULL,\n    tier ENUM('basic', 'premium', 'business') NOT NULL,\n    price_monthly DECIMAL(10,2) NOT NULL,\n    price_yearly DECIMAL(10,2) NOT NULL,\n    features JSON,\n    is_active BOOLEAN DEFAULT TRUE,\n    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP\n) ENGINE=InnoDB;\n\n-- Insert default plans\nINSERT INTO subscription_plans (name, tier, price_monthly, price_yearly, features) VALUES\n('Basic', 'basic', 4.99, 49.99, '{\"file_limit\": 536870912, \"history_months\": 6, \"ads\": false}'),\n('Premium', 'premium', 9.99, 99.99, '{\"file_limit\": 2147483648, \"history_months\": -1, \"priority_support\": true}'),\n('Business', 'business', 19.99, 199.99, '{\"file_limit\": 4294967296, \"history_months\": -1, \"custom_domain\": true}');\n```\n\n### Quota Tracking\n\n```sql\n-- User quotas (daily\u002Fmonthly limits)\nCREATE TABLE user_quotas (\n    id BIGINT PRIMARY KEY AUTO_INCREMENT,\n    user_id BIGINT NOT NULL,\n    quota_type VARCHAR(50) NOT NULL,\n    limit_value BIGINT DEFAULT 0,\n    used_value BIGINT DEFAULT 0,\n    reset_at BIGINT DEFAULT 0,\n    UNIQUE KEY uk_user_type (user_id, quota_type)\n) ENGINE=InnoDB;\n\n-- Quota types: messages_daily, files_daily, storage_used\n```\n\n### Core Implementation\n\n```go\n\u002F\u002F subscription_manager.go\n\ntype SubscriptionManager struct {\n    db    *sqlx.DB\n    redis *redis.Client\n}\n\n\u002F\u002F CheckUserTier 检查用户等级\nfunc (m *SubscriptionManager) CheckUserTier(ctx context.Context, userID int64) (Tier, error) {\n    \u002F\u002F Try cache\n    cacheKey := fmt.Sprintf(\"user:tier:%d\", userID)\n    cached, err := m.redis.Get(ctx, cacheKey).Result()\n    if err == nil {\n        return Tier(cached), nil\n    }\n    \n    \u002F\u002F Query database\n    var sub UserSubscription\n    err = m.db.GetContext(ctx, &sub, \n        \"SELECT * FROM user_subscriptions WHERE user_id = ?\", userID)\n    if err == sql.ErrNoRows {\n        return TierFree, nil\n    }\n    if err != nil {\n        return TierFree, err\n    }\n    \n    \u002F\u002F Check expiration\n    if sub.Status == \"expired\" || (sub.ExpiresAt > 0 && sub.ExpiresAt \u003C time.Now().Unix()) {\n        m.ExpireSubscription(ctx, userID)\n        return TierFree, nil\n    }\n    \n    \u002F\u002F Cache result\n    m.redis.Set(ctx, cacheKey, string(sub.Tier), 5*time.Minute)\n    \n    return Tier(sub.Tier), nil\n}\n\n\u002F\u002F CheckFeatureAccess 检查功能访问权限\nfunc (m *SubscriptionManager) CheckFeatureAccess(ctx context.Context, userID int64, feature string) (bool, error) {\n    tier, err := m.CheckUserTier(ctx, userID)\n    if err != nil {\n        return false, err\n    }\n    \n    \u002F\u002F Feature requirement mapping\n    requirements := map[string]Tier{\n        \"large_files\":     TierBasic,\n        \"unlimited_history\": TierPremium,\n        \"custom_domain\":   TierBusiness,\n        \"priority_support\": TierPremium,\n    }\n    \n    requiredTier, exists := requirements[feature]\n    if !exists {\n        return true, nil \u002F\u002F Feature doesn't require tier\n    }\n    \n    return tier >= requiredTier, nil\n}\n\n\u002F\u002F CheckQuota 检查配额\nfunc (m *SubscriptionManager) CheckQuota(ctx context.Context, userID int64, quotaType string) (bool, int64, error) {\n    tier, _ := m.CheckUserTier(ctx, userID)\n    \n    \u002F\u002F Get tier limits\n    limits := m.getTierLimits(tier)\n    limit := limits[quotaType]\n    \n    if limit \u003C 0 {\n        return true, -1, nil \u002F\u002F Unlimited\n    }\n    \n    \u002F\u002F Get current usage\n    var quota UserQuota\n    err := m.db.GetContext(ctx, &quota,\n        \"SELECT * FROM user_quotas WHERE user_id = ? AND quota_type = ?\",\n        userID, quotaType)\n    \n    if err == sql.ErrNoRows {\n        \u002F\u002F No record yet\n        return true, limit, nil\n    }\n    if err != nil {\n        return false, 0, err\n    }\n    \n    \u002F\u002F Check if need reset\n    if quota.ResetAt \u003C time.Now().Unix() {\n        m.resetQuota(ctx, userID, quotaType)\n        return true, limit, nil\n    }\n    \n    remaining := limit - quota.UsedValue\n    return remaining > 0, remaining, nil\n}\n\n\u002F\u002F UseQuota 使用配额\nfunc (m *SubscriptionManager) UseQuota(ctx context.Context, userID int64, quotaType string, amount int64) error {\n    _, err := m.db.ExecContext(ctx,\n        `INSERT INTO user_quotas (user_id, quota_type, used_value, reset_at) \n         VALUES (?, ?, ?, ?)\n         ON DUPLICATE KEY UPDATE used_value = used_value + VALUES(used_value)`,\n        userID, quotaType, amount, getNextResetTime())\n    return err\n}\n\nfunc (m *SubscriptionManager) getTierLimits(tier Tier) map[string]int64 {\n    limits := map[Tier]map[string]int64{\n        TierFree: {\n            \"messages_daily\": 1000,\n            \"files_daily\":    50,\n            \"file_size\":      100 * 1024 * 1024, \u002F\u002F 100MB\n            \"storage\":        1024 * 1024 * 1024, \u002F\u002F 1GB\n        },\n        TierBasic: {\n            \"messages_daily\": 10000,\n            \"files_daily\":    500,\n            \"file_size\":      500 * 1024 * 1024, \u002F\u002F 500MB\n            \"storage\":        10 * 1024 * 1024 * 1024, \u002F\u002F 10GB\n        },\n        TierPremium: {\n            \"messages_daily\": -1, \u002F\u002F Unlimited\n            \"files_daily\":    -1,\n            \"file_size\":      2 * 1024 * 1024 * 1024, \u002F\u002F 2GB\n            \"storage\":        100 * 1024 * 1024 * 1024, \u002F\u002F 100GB\n        },\n    }\n    return limits[tier]\n}\n```\n\n## Implementation: Payment Integration\n\n### Stripe Integration\n\n```go\n\u002F\u002F stripe_payment.go\n\nimport \"github.com\u002Fstripe\u002Fstripe-go\u002Fv74\"\n\ntype StripePayment struct {\n    client *stripe.Client\n}\n\nfunc (p *StripePayment) CreateCheckoutSession(ctx context.Context, userID int64, planID int) (string, error) {\n    \u002F\u002F Get plan details\n    plan, err := p.getPlan(ctx, planID)\n    if err != nil {\n        return \"\", err\n    }\n    \n    params := &stripe.CheckoutSessionParams{\n        CustomerEmail: stripe.String(getUserEmail(userID)),\n        LineItems: []*stripe.CheckoutSessionLineItemParams{\n            {\n                PriceData: &stripe.CheckoutSessionLineItemPriceDataParams{\n                    Currency: stripe.String(\"usd\"),\n                    ProductData: &stripe.CheckoutSessionLineItemPriceDataProductDataParams{\n                        Name: stripe.String(plan.Name),\n                    },\n                    UnitAmount: stripe.Int64(int64(plan.Price * 100)), \u002F\u002F cents\n                },\n                Quantity: stripe.Int64(1),\n            },\n        },\n        Mode:       stripe.String(string(stripe.CheckoutSessionModeSubscription)),\n        SuccessURL: stripe.String(fmt.Sprintf(\"https:\u002F\u002Fyourapp.com\u002Fsuccess?user=%d\", userID)),\n        CancelURL:  stripe.String(\"https:\u002F\u002Fyourapp.com\u002Fcancel\"),\n        Metadata: map[string]string{\n            \"user_id\": fmt.Sprintf(\"%d\", userID),\n            \"plan_id\": fmt.Sprintf(\"%d\", planID),\n        },\n    }\n    \n    session, err := stripe.CheckoutSession(params)\n    if err != nil {\n        return \"\", err\n    }\n    \n    return session.URL, nil\n}\n\nfunc (p *StripePayment) HandleWebhook(payload []byte, sig string) error {\n    event, err := stripe.Webhook(payload, sig, webhookSecret)\n    if err != nil {\n        return err\n    }\n    \n    switch event.Type {\n    case \"checkout.session.completed\":\n        var session stripe.CheckoutSession\n        err := json.Unmarshal(event.Data.Raw, &session)\n        if err != nil {\n            return err\n        }\n        \n        userID, _ := strconv.ParseInt(session.Metadata[\"user_id\"], 10, 64)\n        planID, _ := strconv.Atoi(session.Metadata[\"plan_id\"])\n        \n        \u002F\u002F Activate subscription\n        p.activateSubscription(userID, planID, session.Subscription.ID)\n        \n    case \"invoice.payment_failed\":\n        \u002F\u002F Handle failed payment\n        p.handlePaymentFailure(event)\n    }\n    \n    return nil\n}\n```\n\n### Webhook Handler\n\n```go\n\u002F\u002F payment_webhook.go\n\nfunc (s *Server) PaymentWebhook(ctx context.Context, req *PaymentWebhookReq) (*Bool, error) {\n    switch req.Provider {\n    case \"stripe\":\n        err := s.stripePayment.HandleWebhook(req.Payload, req.Signature)\n        if err != nil {\n            return BoolFalse, err\n        }\n    case \"alipay\":\n        err := s.alipayPayment.HandleNotify(req.Payload)\n        if err != nil {\n            return BoolFalse, err\n        }\n    }\n    \n    return BoolTrue, nil\n}\n```\n\n## Implementation: Feature Gating\n\n### Middleware Pattern\n\n```go\n\u002F\u002F middleware\u002Fpremium_middleware.go\n\nfunc PremiumMiddleware(next HandlerFunc) HandlerFunc {\n    return func(ctx context.Context, req Request) (Response, error) {\n        userID := getUserIDFromContext(ctx)\n        feature := getFeatureFromRequest(req)\n        \n        \u002F\u002F Check access\n        hasAccess, err := subscriptionManager.CheckFeatureAccess(ctx, userID, feature)\n        if err != nil {\n            return nil, err\n        }\n        \n        if !hasAccess {\n            return nil, status.Error(codes.PermissionDenied, \n                \"This feature requires premium subscription\")\n        }\n        \n        \u002F\u002F Check quota for usage-based features\n        if isQuotaBased(feature) {\n            allowed, remaining, err := subscriptionManager.CheckQuota(ctx, userID, feature)\n            if err != nil {\n                return nil, err\n            }\n            if !allowed {\n                return nil, status.Errorf(codes.ResourceExhausted,\n                    \"Quota exceeded. Upgrade to get more.\")\n            }\n            \u002F\u002F Update context with remaining quota\n            ctx = context.WithValue(ctx, \"remaining_quota\", remaining)\n        }\n        \n        return next(ctx, req)\n    }\n}\n```\n\n### Usage in Handlers\n\n```go\nfunc (s *Server) MessagesSendDocument(ctx context.Context, req *SendDocumentReq) (*Message, error) {\n    userID := getUserIDFromContext(ctx)\n    fileSize := req.File.Size\n    \n    \u002F\u002F Check file size limit\n    tier, _ := s.subManager.CheckUserTier(ctx, userID)\n    limits := s.subManager.getTierLimits(tier)\n    \n    if fileSize > limits[\"file_size\"] {\n        return nil, status.Errorf(codes.FailedPrecondition,\n            \"File too large. Max size for your tier: %d MB\", \n            limits[\"file_size\"]\u002F(1024*1024))\n    }\n    \n    \u002F\u002F Check and use quota\n    allowed, _, err := s.subManager.CheckQuota(ctx, userID, \"files_daily\")\n    if err != nil {\n        return nil, err\n    }\n    if !allowed {\n        return nil, status.Errorf(codes.ResourceExhausted,\n            \"Daily file upload limit reached. Upgrade for unlimited uploads.\")\n    }\n    \n    \u002F\u002F Use quota\n    s.subManager.UseQuota(ctx, userID, \"files_daily\", 1)\n    \n    \u002F\u002F Process document...\n}\n```\n\n## Implementation: Admin Dashboard\n\n### Revenue Analytics\n\n```go\n\u002F\u002F admin\u002Fanalytics.go\n\ntype RevenueAnalytics struct {\n    db *sqlx.DB\n}\n\nfunc (a *RevenueAnalytics) GetRevenueReport(ctx context.Context, start, end time.Time) (*RevenueReport, error) {\n    query := `\n        SELECT \n            DATE(created_at) as date,\n            SUM(amount) as revenue,\n            COUNT(*) as transactions,\n            tier,\n            payment_method\n        FROM premium_transactions\n        WHERE status = 1 \n          AND created_at BETWEEN ? AND ?\n        GROUP BY DATE(created_at), tier, payment_method\n        ORDER BY date DESC\n    `\n    \n    var rows []RevenueRow\n    err := a.db.SelectContext(ctx, &rows, query, start, end)\n    if err != nil {\n        return nil, err\n    }\n    \n    return &RevenueReport{\n        Rows:       rows,\n        Total:      sumRevenue(rows),\n        StartDate:  start,\n        EndDate:    end,\n    }, nil\n}\n\nfunc (a *RevenueAnalytics) GetUserRetention(ctx context.Context) (*RetentionReport, error) {\n    query := `\n        SELECT \n            tier,\n            COUNT(*) as total_users,\n            SUM(CASE WHEN expires_at > NOW() THEN 1 ELSE 0 END) as active_users,\n            SUM(CASE WHEN auto_renew = 1 THEN 1 ELSE 0 END) as auto_renew_users\n        FROM user_subscriptions\n        GROUP BY tier\n    `\n    \n    var rows []RetentionRow\n    err := a.db.SelectContext(ctx, &rows, query)\n    return &RetentionReport{Rows: rows}, err\n}\n```\n\n## Client-Side Integration\n\n### Upgrade Prompt UI\n\n```go\n\u002F\u002F Client receives error and shows upgrade dialog\nfunc handleSendFileError(err error) {\n    if status.Code(err) == codes.FailedPrecondition {\n        \u002F\u002F Show upgrade dialog\n        showUpgradeDialog(\n            title: \"File Too Large\",\n            message: \"Upgrade to Premium to send files up to 2GB\",\n            plans: getAvailablePlans()\n        )\n    } else if status.Code(err) == codes.ResourceExhausted {\n        \u002F\u002F Show quota exceeded dialog\n        showUpgradeDialog(\n            title: \"Daily Limit Reached\",\n            message: \"You've reached your daily upload limit. Upgrade for unlimited uploads.\",\n            plans: getAvailablePlans()\n        )\n    }\n}\n```\n\n## Testing\n\n### Unit Tests\n\n```go\nfunc TestSubscriptionManager(t *testing.T) {\n    ctx := context.Background()\n    manager := NewSubscriptionManager(testDB, testRedis)\n    \n    t.Run(\"CheckUserTier\", func(t *testing.T) {\n        \u002F\u002F Free user\n        tier, err := manager.CheckUserTier(ctx, 1)\n        assert.NoError(t, err)\n        assert.Equal(t, TierFree, tier)\n        \n        \u002F\u002F Premium user\n        tier, err = manager.CheckUserTier(ctx, 2)\n        assert.NoError(t, err)\n        assert.Equal(t, TierPremium, tier)\n    })\n    \n    t.Run(\"CheckFeatureAccess\", func(t *testing.T) {\n        \u002F\u002F Free user can't access premium feature\n        hasAccess, err := manager.CheckFeatureAccess(ctx, 1, \"large_files\")\n        assert.NoError(t, err)\n        assert.False(t, hasAccess)\n        \n        \u002F\u002F Premium user can access\n        hasAccess, err = manager.CheckFeatureAccess(ctx, 2, \"large_files\")\n        assert.NoError(t, err)\n        assert.True(t, hasAccess)\n    })\n    \n    t.Run(\"CheckQuota\", func(t *testing.T) {\n        \u002F\u002F Free user has limited quota\n        allowed, remaining, err := manager.CheckQuota(ctx, 1, \"files_daily\")\n        assert.NoError(t, err)\n        assert.True(t, allowed)\n        assert.Equal(t, int64(50), remaining)\n        \n        \u002F\u002F Premium user has unlimited\n        allowed, remaining, err = manager.CheckQuota(ctx, 2, \"files_daily\")\n        assert.NoError(t, err)\n        assert.True(t, allowed)\n        assert.Equal(t, int64(-1), remaining) \u002F\u002F Unlimited\n    })\n}\n```\n\n## Best Practices\n\n1. **Graceful Degradation**: Free users should still have usable experience\n2. **Clear Communication**: Always tell users why a feature is blocked\n3. **Easy Upgrade**: One-click upgrade flow\n4. **Fair Pricing**: Transparent pricing with clear value proposition\n5. **Analytics**: Track conversion rates and user behavior\n\n## References\n\n- [Stripe Documentation](https:\u002F\u002Fstripe.com\u002Fdocs)\n- [PayPal Developer](https:\u002F\u002Fdeveloper.paypal.com\u002F)\n- [RevenueCat (mobile subscriptions)](https:\u002F\u002Fwww.revenuecat.com\u002F)\n",{"name":5,"version":24,"description":7},"2.0.0","master","4aa004da461d820f4ea5499e58eb8d196cf99016","community\u002Fclawhub\u002Ft\u002Ftelegram-premium-features",0,"https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge","https:\u002F\u002Fskill-explorer-rho.vercel.app","https:\u002F\u002Fgithub.com\u002FLord1Egypt","Unbreakable. Unstoppable. Unmatched⚡.\r\n Speaker of machine tongues 🤖  | World-builder of decentralized dreams 🌐 | Defender of the digital realm🛡️.","2026-06-10 08:21:01",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add Lord1Egypt\u002Fawesome-skill-forge --skill telegram-premium-features",{"tool":40,"command":41},"bunx","bunx skills add Lord1Egypt\u002Fawesome-skill-forge --skill telegram-premium-features",{"tool":43,"command":44},"pnpm","pnpm dlx skills add Lord1Egypt\u002Fawesome-skill-forge --skill telegram-premium-features","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fcommunity\u002Fclawhub\u002Ft\u002Ftelegram-premium-features\u002FSKILL.md",true,[],[49,56,63,70,77,84],{"skillNo":50,"name":51,"nameZh":6,"description":52,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":53,"categories":54,"keywords":55,"publishedAt":19},"01M785WKJB99G3STR1NF9NRTJW","youtube-content","YouTube transcripts to summaries, threads, blogs.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fyoutube-content\u002FSKILL.md",[],[],{"skillNo":57,"name":58,"nameZh":6,"description":59,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":19},"01M785WEFHB0G2S9YA6EPR3H0E","xurl","X\u002FTwitter via xurl CLI: post, search, DM, media, v2 API.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fxurl\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M785W98EDN4EFJXJPMQEHCRC","touchdesigner-mcp","Control a running TouchDesigner instance via twozero MCP — create operators, set parameters, wire connections, execute Python, build real-time visuals. 36 native tools.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Ftouchdesigner-mcp\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M785W5S9FP3QBH2V191E025P","test-driven-development","TDD: enforce RED-GREEN-REFACTOR, tests before code.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Ftest-driven-development\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M785W2AS08NSSH9YATCV6FJB","teams-meeting-pipeline","Operate the Teams meeting summary pipeline via Hermes CLI — summarize meetings, inspect pipeline status, replay jobs, manage Microsoft Graph subscriptions.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fteams-meeting-pipeline\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M785VXKW4T34BTP1SCHW1R7F","systematic-debugging","4-phase root cause debugging: understand bugs before fixing.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fsystematic-debugging\u002FSKILL.md",[],[]]