一键导入
feed
Create and manage Swarm feeds for stable, updateable URLs using bee-js or swarm-cli, including manifest creation and feed updates.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Create and manage Swarm feeds for stable, updateable URLs using bee-js or swarm-cli, including manifest creation and feed updates.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | feed |
| description | Create and manage Swarm feeds for stable, updateable URLs using bee-js or swarm-cli, including manifest creation and feed updates. |
| user-invocable | true |
Guide a developer through creating and using feeds on Swarm. Feeds provide a stable address that always points to the latest content — the URL never changes even when content is updated.
When presenting to the user, use consistent labels before each code block:
filename: — file contents the user should write to diskAdd a --- horizontal rule before each labeled code block to visually separate it from surrounding text.
Silently check node status (curl -s http://localhost:1633/node) and stamp availability (swarm-cli stamp list). If the node is down, offer to walk through /setup-bee-interactive. If no usable stamp exists, route to /stamps.
Also check for existing identities (swarm-cli identity list 2>/dev/null on Linux/macOS/WSL, or swarm-cli identity list 2>$null in PowerShell). If the developer already has an identity and feed, skip to Update the feed.
npm install @ethersphere/bee-jsnpm install -g @ethersphere/swarm-cliA feed combines an owner (Ethereum address) and a topic (human-readable string) into a predictable address. Anyone can read, only the owner can update.
GET /bzz/MANIFEST_HASH/
→ resolve manifest → extract topic + owner
→ look up latest feed entry
→ read content reference
→ serve content
Old content stays on Swarm but the feed always resolves to the latest version.
import crypto from "crypto";
import { PrivateKey } from "@ethersphere/bee-js";
const hex = "0x" + crypto.randomBytes(32).toString("hex");
const pk = new PrivateKey(hex);
console.log("Private key:", pk.toHex());
console.log("Address:", pk.publicKey().address().toHex());
Security: Store this private key securely (e.g., environment variable or encrypted keyfile). Never commit it to version control. Losing this key means losing the ability to update this feed.
import { Bee, Topic, PrivateKey } from "@ethersphere/bee-js";
const bee = new Bee("http://localhost:1633");
const pk = new PrivateKey("YOUR_PRIVATE_KEY");
const owner = pk.publicKey().address();
const topic = Topic.fromString("my-topic");
// Upload content
const upload = await bee.uploadFile(batchId, "My content", "note.txt");
// Write to feed
const writer = bee.makeFeedWriter(topic, pk);
await writer.uploadReference(batchId, upload.reference);
import { Bee, Topic, EthAddress } from "@ethersphere/bee-js";
const bee = new Bee("http://localhost:1633");
const topic = Topic.fromString("my-topic");
const owner = new EthAddress("OWNER_ADDRESS");
const reader = bee.makeFeedReader(topic, owner);
const result = await reader.downloadReference();
console.log("Latest reference:", result.reference.toHex());
console.log("Feed index:", result.feedIndex.toBigInt());
const manifest = await bee.createFeedManifest(batchId, topic, owner);
console.log("Feed manifest:", manifest.toHex());
// Access at: http://localhost:1633/bzz/<manifest>/
The manifest hash never changes. Use it for ENS registration or as a permanent link.
Upload new content, then write the new reference to the same feed:
const newUpload = await bee.uploadFile(batchId, "Updated content", "note.txt");
await writer.uploadReference(batchId, newUpload.reference);
// Same manifest URL now serves the updated content
swarm-cli identity create publisher --password <SECURE_PASSWORD>
Save output securely. Export later with: swarm-cli identity export publisher --password <SECURE_PASSWORD>
swarm-cli feed upload ./my-content \
--identity publisher \
--topic-string my-topic \
--stamp <BATCH_ID> \
--password <SECURE_PASSWORD>
Returns the feed manifest URL. Save the manifest hash.
Same command with new content — same identity + topic = same manifest URL:
swarm-cli feed upload ./updated-content \
--identity publisher \
--topic-string my-topic \
--stamp <BATCH_ID>
swarm-cli feed print \
--identity publisher \
--topic-string my-topic \
--password <SECURE_PASSWORD>
/host-website)| Error | Fix |
|---|---|
| "stamp not usable" | Wait 2-3 minutes after buying |
| "insufficient funds" | Wallet needs xBZZ — see /setup-bee-interactive |
| "feed not found" | Wrong identity/topic combination, or feed hasn't been written to yet |
| Connection refused | Node isn't running — route to /setup-bee-interactive |
| Other errors | Route to /troubleshoot |
For any conceptual or technical question not covered by the steps above, invoke /docs to find the relevant authoritative source rather than answering from prior knowledge.
Guide to Swarm ACT encryption and access control: create grantees, upload protected data, grant/revoke access, and troubleshoot not-found/history issues.
Build and publish a Swarm blog with a permanent feed-manifest URL, post management workflow, and optional ENS domain mapping.
Scaffold a Swarm app or add bee-js to an existing project, with core upload/download patterns and node-compatibility guidance.
Answer Swarm conceptual questions from official docs with source links; use for APIs, behavior, configuration, and architecture clarifications.
Deploy and update static websites on Swarm via one-off or feed-based publishing, with optional ENS integration and stamp lifecycle notes.
Show all Swarm skills, check node status, and route developers to setup, storage, website, app, security, messaging, or troubleshooting flows.