Token导航 LogoToken导航

Agent Skill · 开发

community-feed(社区提要)

community-feed 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

community-feed 是开发类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描已通过,按安装量在开发类的 21,746 个 Skill 里排第 16,066。

总安装 539周安装 22GitHub Stars 777下载 174核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:community-feed(社区提要)
来源仓库:https://github.com/dadbodgeoff/drift
仓库路径:skills/community-feed
安装命令:
npx skills add https://github.com/dadbodgeoff/drift --skill community-feed
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/dadbodgeoff/drift --skill community-feed

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

community-feed 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。适用于构建具有无限滚动功能的社交信息流,实现热门内容算法和参与度追踪系统。

推荐使用游标分页处理大数据集,批量加载关联数据以避免 N+1 查询问题。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/community-feed

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/dadbodgeoff/drift --skill community-feed;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

community-feed 怎么安装?

在终端执行 npx skills add https://github.com/dadbodgeoff/drift --skill community-feed。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

community-feed 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

community-feed 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

community-feed 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

community-feed 用的人多吗?

公开数据是累计安装 539 次,近一周安装 22 次,下载 174 次,GitHub 777 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

community-feed 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
skill-vetter

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
community-feed

社区提要 · 本页

539777需要联网未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Community Feed

Social feed with trending algorithms, cursor pagination, and engagement tracking.

When to Use This Skill

  • Building social feeds with infinite scroll
  • Need trending/hot content algorithms
  • Implementing like/engagement systems
  • Want efficient pagination for large datasets

Core Concepts

Cursor pagination beats offset for large datasets. Batch-load relationships to avoid N+1. Store trending scores as computed columns for efficient sorting.

Implementation

Python

from dataclasses import dataclass
from datetime import datetime, timezone
from typing import Optional, List, Dict
import base64
import json

@dataclass
class PaginatedPosts:
    posts: List[Dict]
    total_count: int
    has_more: bool
    next_cursor: Optional[str]

class CommunityFeedService:
    """Service for community feed with cursor pagination."""

    def __init__(self, db):
        self.db = db

    async def get_feed(
        self,
        feed_type: str = "trending",
        viewer_id: Optional[str] = None,
        cursor: Optional[str] = None,
        limit: int = 20,
        tags: Optional[List[str]] = None,
    ) -> PaginatedPosts:
        cursor_data = self._parse_cursor(cursor) if cursor else None

        query = self.db.table("community_posts").select(
            "*",
            "assets!inner(url, asset_type)",
            "users!inner(id, display_name, avatar_url)",
        )

        if tags:
            query = query.contains("tags", tags)

        # Feed-specific ordering
        if feed_type == "following" and viewer_id:
            following = await self._get_following_ids(viewer_id)
            if not following:
                return PaginatedPosts(posts=[], total_count=0, has_more=False, next_cursor=None)
            query = query.in_("user_id", following)

        if feed_type == "trending":
            query = query.order("trending_score", desc=True)
            if cursor_data:
                query = query.lt("trending_score", cursor_data["score"])
        else:
            query = query.order("created_at", desc=True)
            if cursor_data:
                query = query.lt("created_at", cursor_data["created_at"])

        # Fetch one extra to check has_more
        query = query.limit(limit + 1)
        result = query.execute()
        posts = result.data or []

        has_more = len(posts) > limit
        if has_more:
            posts = posts[:limit]

        # Batch load viewer's likes
        if viewer_id and posts:
            liked_ids = await self._get_liked_post_ids(viewer_id, [p["id"] for p in posts])
            for post in posts:
                post["is_liked_by_viewer"] = post["id"] in liked_ids

        next_cursor = None
        if has_more and posts:
            next_cursor = self._generate_cursor(posts[-1], feed_type)

        return PaginatedPosts(
            posts=posts,
            total_count=await self._get_total_count(tags),
            has_more=has_more,
            next_cursor=next_cursor,
        )

    async def _get_following_ids(self, user_id: str) -> List[str]:
        result = self.db.table("user_follows").select("following_id").eq("follower_id", user_id).execute()
        return [r["following_id"] for r in (result.data or [])]

    async def _get_liked_post_ids(self, user_id: str, post_ids: List[str]) -> set:
        result = self.db.table("post_likes").select("post_id").eq("user_id", user_id).in_("post_id", post_ids).execute()
        return {r["post_id"] for r in (result.data or [])}

    def _parse_cursor(self, cursor: str) -> dict:
        try:
            return json.loads(base64.b64decode(cursor).decode())
        except:
            return {}

    def _generate_cursor(self, post: dict, feed_type: str) -> str:
        if feed_type == "trending":
            data = {"score": post.get("trending_score", 0)}
        else:
            data = {"created_at": post["created_at"]}
        return base64.b64encode(json.dumps(data).encode()).decode()
# Engagement operations
async def like_post(self, post_id: str, user_id: str) -> bool:
    existing = self.db.table("post_likes").select("id").eq("post_id", post_id).eq("user_id", user_id).execute()
    if existing.data:
        return False  # Already liked

    self.db.table("post_likes").insert({
        "post_id": post_id,
        "user_id": user_id,
        "created_at": datetime.now(timezone.utc).isoformat(),
    }).execute()

    # Atomic increment
    self.db.rpc("increment_like_count", {"post_id": post_id}).execute()
    return True

async def unlike_post(self, post_id: str, user_id: str) -> bool:
    result = self.db.table("post_likes").delete().eq("post_id", post_id).eq("user_id", user_id).execute()
    if not result.data:
        return False

    self.db.rpc("decrement_like_count", {"post_id": post_id}).execute()
    return True

# Trending algorithm
def calculate_trending_score(
    like_count: int,
    comment_count: int,
    view_count: int,
    created_at: datetime,
    is_featured: bool = False,
) -> float:
    """
    Trending score = engagement / age^decay
    Higher engagement + newer = higher score
    """
    engagement = like_count * 1.0 + comment_count * 2.0 + view_count * 0.1
    age_hours = max((datetime.now(timezone.utc) - created_at).total_seconds() / 3600, 0.1)
    score = engagement / (age_hours ** 1.5)
    return score * 1.5 if is_featured else score

SQL Schema

CREATE TABLE community_posts (
    id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
    user_id UUID NOT NULL REFERENCES users(id),
    title VARCHAR(200) NOT NULL,
    like_count INTEGER DEFAULT 0,
    comment_count INTEGER DEFAULT 0,
    view_count INTEGER DEFAULT 0,
    is_featured BOOLEAN DEFAULT FALSE,
    tags TEXT[] DEFAULT '{}',
    created_at TIMESTAMPTZ DEFAULT NOW(),
    -- Computed trending score
    trending_score FLOAT GENERATED ALWAYS AS (
        (like_count + comment_count * 2 + view_count * 0.1) /
        POWER(GREATEST(EXTRACT(EPOCH FROM (NOW() - created_at)) / 3600, 0.1), 1.5)
    ) STORED
);

CREATE INDEX idx_posts_trending ON community_posts(trending_score DESC);
CREATE INDEX idx_posts_created ON community_posts(created_at DESC);

-- Atomic increment functions
CREATE FUNCTION increment_like_count(post_id UUID) RETURNS VOID AS $$
BEGIN UPDATE community_posts SET like_count = like_count + 1 WHERE id = post_id; END;
$$ LANGUAGE plpgsql;

Usage Examples

feed_service = CommunityFeedService(db)

# Get trending feed
result = await feed_service.get_feed(feed_type="trending", viewer_id="user_123", limit=20)
for post in result.posts:
    print(f"{post['title']} - {post['like_count']} likes")

# Load next page
if result.has_more:
    next_page = await feed_service.get_feed(feed_type="trending", cursor=result.next_cursor)

# Like a post
await feed_service.like_post("post_456", "user_123")

Best Practices

  1. Use cursor pagination over offset for large datasets
  2. Batch-load relationships to avoid N+1 queries
  3. Store trending score as computed column for efficient sorting
  4. Use atomic database functions for counter updates
  5. Cache total counts (expensive to compute)

Common Mistakes

  • Using offset pagination (slow for large offsets)
  • N+1 queries for author/like data
  • Computing trending score on every query
  • Non-atomic counter updates (race conditions)

Related Patterns

  • analytics-pipeline (event tracking)
  • intelligent-cache (caching feeds)

平台分布

Codex

33.35%
按下载量换算58

Claude

32.18%
按下载量换算56

Cursor

17.38%
按下载量换算30

Gemini CLI

8.64%
按下载量换算15

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills