federation
БесплатноБез исполняемых скриптовНе проверенActivityPub protocol specification and federation concepts. Use when working with ActivityPub activities, understanding federation mechanics, implementing…
от Automattic★ 583 звезды на GitHubОб этом скилле
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
Actors - Users/accounts in the system
- Each actor has a unique URI
- Required:
inbox,outbox - Optional:
followers,following,liked
Activities - Actions taken by actors
- Create, Update, Delete, Follow, Like, Announce, Undo
- Wrap objects to describe how they're shared
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,bccfields 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
nullvalues 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
Resolve Recipients
- Check
to,bto,cc,bcc,audiencefields - Dereference collections to find individual actors
- De-duplicate recipient list
- Exclude activity's own actor
- Check
Discover Inboxes
- Fetch actor profiles
- Extract
inboxproperty - Use
sharedInboxif available for efficiency
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
- Content-Type:
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
sharedInboxendpoint 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/activitystr
Установить federation в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл federation?
ActivityPub protocol specification and federation concepts. Use when working with ActivityPub activities, understanding federation mechanics, implementing protocol features, or debugging federation issues.
Как установить скилл federation?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл federation запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic