Token导航 LogoToken导航TokenDH.com
研究检索操作浏览器github未标认证来源可访问clear审计提醒

federationfederation 搜索

Agent Skill

federation 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

1,497

周安装

63

GitHub Stars

567

下载量

524
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/automattic/wordpress-activitypub --skill federation

简介

federation 提供 ActivityPub 协议理解和联邦通信机制说明,支持跨平台互操作。

  • 适用于 Codex、Claude、Cursor、Gemini CLI,适合实现社交网络或去中心化应用时使用。
  • 涵盖 Actors、Activities、Inbox/Outbox 三大核心概念和 PHP 实现模式。
  • 安装前需确认权限范围和维护状态,注意可能触发网络请求和协议解析操作。
  • federation 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

ActivityPub Federation Protocol

This skill provides understanding of the ActivityPub protocol specification and how federation works.

For supported features and compatibility: See FEDERATION.md for the complete list of implemented FEPs, supported standards, and federation compatibility details.

For implementation details: See AGENTS.md for transformers, handlers, and PHP code patterns.

Core Concepts

Three Building Blocks

  1. Actors - Users/accounts in the system

- Each actor has a unique URI - Required: inbox, outbox - Optional: followers, following, liked

  1. Activities - Actions taken by actors

- Create, Update, Delete, Follow, Like, Announce, Undo - Wrap objects to describe how they're shared

  1. Objects - Content being acted upon

- Notes, Articles, Images, Videos, etc. - Can be embedded or referenced by URI

Actor Structure

{
  "@context": "https://www.w3.org/ns/activitystreams",
  "type": "Person",
  "id": "https://example.com/@alice",
  "inbox": "https://example.com/@alice/inbox",
  "outbox": "https://example.com/@alice/outbox",
  "followers": "https://example.com/@alice/followers",
  "following": "https://example.com/@alice/following",
  "preferredUsername": "alice",
  "name": "Alice Example",
  "summary": "Bio text here"
}

Collections

Standard Collections

Inbox - Receives incoming activities

  • De-duplicate by activity ID
  • Filter based on permissions
  • Process activities for side effects

Outbox - Publishes actor's activities

  • Public record of what actor has posted
  • Filtered based on viewer permissions
  • Used for profile activity displays

Followers - Actors following this actor

  • Updated when Follow activities are Accepted
  • Used for delivery targeting

Following - Actors this actor follows

  • Tracks subscriptions
  • Used for timeline building

Public Addressing

Special collection: https://www.w3.org/ns/activitystreams#Public

  • Makes content publicly accessible
  • Do not deliver to this URI - it's a marker, not a real inbox
  • Used in to, cc, bto, bcc fields for visibility

Activity Types

Create

Wraps newly published content:

{
  "type": "Create",
  "actor": "https://example.com/@alice",
  "object": {
    "type": "Note",
    "content": "Hello, Fediverse!"
  }
}

Follow

Initiates subscription:

{
  "type": "Follow",
  "actor": "https://example.com/@alice",
  "object": "https://other.example/@bob"
}
  • Recipient should respond with Accept or Reject
  • Only add to followers upon Accept

Like

Indicates appreciation:

{
  "type": "Like",
  "actor": "https://example.com/@alice",
  "object": "https://other.example/@bob/post/123"
}

Announce

Reshares/boosts content:

{
  "type": "Announce",
  "actor": "https://example.com/@alice",
  "object": "https://other.example/@bob/post/123"
}

Update

Modifies existing content:

  • Supplied properties replace existing
  • null values remove fields
  • Must include original object ID

Delete

Removes content:

  • May replace with Tombstone for referential integrity
  • Should cascade to related activities

Undo

Reverses previous activities:

{
  "type": "Undo",
  "actor": "https://example.com/@alice",
  "object": {
    "type": "Follow",
    "id": "https://example.com/@alice/follow/123"
  }
}

Server-to-Server Federation

Activity Delivery Process

  1. Resolve Recipients

- Check to, bto, cc, bcc, audience fields - Dereference collections to find individual actors - De-duplicate recipient list - Exclude activity's own actor

  1. Discover Inboxes

- Fetch actor profiles - Extract inbox property - Use sharedInbox if available for efficiency

  1. Deliver via HTTP POST

- Content-Type: application/ld+json; profile="https://www.w3.org/ns/activitystreams" - Include HTTP Signatures for authentication - Handle delivery failures gracefully

Inbox Forwarding

Ghost Replies Problem: When Alice replies to Bob's post that Carol follows, Carol might not see the reply if she doesn't follow Alice.

Solution: Inbox forwarding

  • When receiving activity addressing a local collection
  • If activity references local objects
  • Forward to collection members
  • Ensures conversation participants see replies

Shared Inbox Optimization

For public posts with many recipients on same server:

  • Use sharedInbox endpoint instead of individual inboxes
  • Reduces number of HTTP requests
  • Server distributes internally

Addressing and Visibility

To/CC Fields

  • to - Primary recipients (public in UI)
  • cc - Secondary recipients (copied/mentioned)
  • bto - Blind primary (hidden in delivery)
  • bcc - Blind secondary (hidden in delivery)

Important: Remove bto and bcc before delivery to preserve privacy

Visibility Patterns

Public Post:

{
  "to": ["https://www.w3.org/ns/activitystreams#Public"],
  "cc": ["https://example.com/@alice/followers"]
}

Followers-Only:

{
  "to": ["https://example.com/@alice/followers"]
}

Direct Message:

{
  "to": ["https://other.example/@bob"],
  "cc": []
}

Content Verification

Security Considerations

  1. Verify Origins

- Don't trust claimed sources without verification - Check HTTP Signatures - Validate actor owns referenced objects

  1. Prevent Spoofing

- Mallory could claim Alice posted something - Always verify before processing side effects

  1. Rate Limiting

- Limit recursive dereferencing - Protect against denial-of-service - Implement spam filtering

  1. Content Sanitization

- Clean HTML before browser rendering - Validate media types - Check for malicious payloads

Protocol Extensions

Supported Standards

See FEDERATION.md for the complete list of implemented standards and FEPs, including:

  • WebFinger - Actor discovery.
  • HTTP Signatures - Request authentication.
  • NodeInfo - Server metadata.
  • Various FEPs (Fediverse Enhancement Proposals).

FEPs (Fediverse Enhancement Proposals)

FEPs extend ActivityPub with additional features. Common FEP categories include:

  • Long-form text support.
  • Quote posts.
  • Activity intents.
  • Follower synchronization.
  • Actor metadata extensions.

For supported FEPs in this plugin: See FEDERATION.md for the authoritative list of implemented FEPs.

OAuth 2.0 Client-to-Server

When the ActivityPub API option is enabled, third-party clients can authenticate via OAuth 2.0 under activitypub/1.0/oauth/. The plugin supports RFC 7591 dynamic registration, RFC 7636 PKCE (S256 only, required by default for public clients), and the CIMD draft (URL-form client_id, HTTPS required).

RFC 8252 — Loopback Redirect URIs

Native apps receive the OAuth callback on a loopback port they opened locally. Per RFC 8252 §7.3 / §8.3, redirect URIs of the form http://127.0.0.1:{port}/{path} and http://[::1]:{port}/{path} are accepted with port flexibility (any port may be used at request time). localhost is also accepted for compatibility, although §8.3 marks it "NOT RECOMMENDED".

The loopback allowance applies *only* to redirect URI matching. Reserved-but-not-loopback addresses — 0.0.0.0, link-local 169.254.0.0/16, RFC1918 private ranges (10/8, 172.16/12, 192.168/16), and similar — are not treated as loopback and never bypass wp_safe_remote_get(). CIMD metadata URLs must use https://, and the metadata host is resolved and validated against private/reserved ranges before any fetch — loopback CIMD origins are not supported, even on dev installs.

For implementation details: See includes/oauth/class-client.php (especially the class docblock and is_loopback()) and the OAuth section of FEDERATION.md.

Implementation Notes

WordPress Plugin Specifics

This plugin implements:

  • Actor Types: User, Blog, Application
  • Transformers: Convert WordPress content to ActivityPub objects
  • Handlers: Process incoming activities

For implementation details, see:

Testing Federation

# Test actor endpoint
curl -H "Accept: application/activity+json" \
  https://site.com/@username

# Test WebFinger
curl https://site.com/.well-known/webfinger?resource=acct:user@site.com

# Test NodeInfo
curl https://site.com/.well-known/nodeinfo

Common Issues

Activities Not Received

  • Check inbox URL is accessible
  • Verify HTTP signature validation
  • Ensure content-type headers correct
  • Check for firewall/security blocks

Replies Not Federated

  • Verify inbox forwarding enabled
  • Check addressing includes relevant actors
  • Ensure inReplyTo properly set

Follower Sync Issues

  • Check Accept activities sent for Follow
  • Verify followers collection updates
  • Ensure shared inbox used when available

Resources

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

28.16%
按下载量换算148

Antigravity

19.7%
按下载量换算103

Gemini CLI

17.83%
按下载量换算93

windsurf

12.04%
按下载量换算63

Cursor

7.19%
按下载量换算38

Codex

3.55%
按下载量换算19

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。

来源信息

继续浏览同类 Skills