ipfs
安装方式
先用 Prompt 核对来源与依赖。也可下载安装包。
用 AI 助手安装
复制提示词,让助手先核对固定版本和依赖。
查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "ipfs":https://skillpi.com/zh/skills/deepskill-edf5b9c7c02f58fdb790c39438556961f5086068996b2718f90adf8099575a90。安装前核对上游来源和版本:https://github.com/TerminalSkills/skills。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。
来源与配置
github.com
配置方式待核实
请查看原始来源中的适用工具、依赖和权限要求。
安装实测待补充
IPFS 存储与检索:用于在 IPFS(星际文件系统)上存储与检索文件,包括以去中心化方式存储、在 IPFS 上固定内容、上传 NFT 元数据和使用内容寻址存储的场景。
介绍来源: third_party · TerminalSkills · 1.0.0 参考来源
SkillPi 解读
- 实测状态
- 未测试
文件浏览
Frontmatter
name: ipfs
description: >-
Store and retrieve files on IPFS (InterPlanetary File System). Use when a
user asks to store files in a decentralized way, pin content on IPFS, upload
NFT metadata, or use content-addressed storage.
license: Apache-2.0
compatibility: 'Any platform via HTTP API'
metadata:
author: terminal-skills
version: 1.0.0
category: development
tags:
- ipfs
- decentralized
- storage
- nft
- pinningIPFS
Overview
IPFS is a decentralized file storage protocol. Files are content-addressed (identified by hash, not location). Used for NFT metadata, dApp assets, and censorship-resistant content. Pinning services (Pinata, web3.storage) ensure files stay available.
Instructions
Step 1: Upload via Pinata
// lib/ipfs.ts — Upload files to IPFS via Pinata
const PINATA_JWT = process.env.PINATA_JWT!
export async function uploadToIPFS(file: Buffer, name: string): Promise<string> {
const formData = new FormData()
formData.append('file', new Blob([file]), name)
formData.append('pinataMetadata', JSON.stringify({ name }))
const res = await fetch('https://api.pinata.cloud/pinning/pinFileToIPFS', {
method: 'POST',
headers: { Authorization: `Bearer ${PINATA_JWT}` },
body: formData,
})
const { IpfsHash } = await res.json()
return `ipfs://${IpfsHash}`
}
export async function uploadJSON(data: object): Promise<string> {
const res = await fetch('https://api.pinata.cloud/pinning/pinJSONToIPFS', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer ${PINATA_JWT}`,
},
body: JSON.stringify({ pinataContent: data }),
})
const { IpfsHash } = await res.json()
return `ipfs://${IpfsHash}`
}
Step 2: NFT Metadata
// Upload NFT image and metadata
const imageHash = await uploadToIPFS(imageBuffer, 'nft-image.png')
const metadata = {
name: 'Cool NFT #1',
description: 'A very cool NFT',
image: imageHash,
attributes: [
{ trait_type: 'Background', value: 'Blue' },
{ trait_type: 'Rarity', value: 'Rare' },
],
}
const metadataHash = await uploadJSON(metadata)
// Use metadataHash as tokenURI in your NFT contract
Step 3: Retrieve Content
// Read from IPFS via gateway
const GATEWAY = 'https://gateway.pinata.cloud/ipfs'
async function getFromIPFS(cid: string) {
const res = await fetch(`${GATEWAY}/${cid}`)
return res.json()
}
Guidelines
- Content on IPFS is not automatically permanent — it needs to be "pinned" by at least one node.
- Pinata free tier: 500MB storage, 100 pins. web3.storage: 5GB free.
- Use IPFS gateways (ipfs.io, pinata, cloudflare-ipfs) for HTTP access to IPFS content.
- For mutable content, use IPNS (IPFS Name System) or ENS domains.
当前收录版本
1.0.0
质量评测
满分100 · 来自 SkillPi LAB 实验室的评测报告。
亮点
- 提供去中心化文件存储和 NFT 元数据上传等实用功能
- 适用于区块链开发和 NFT 项目等明确场景
亮点
- 触发词覆盖去中心化存储、固定内容、NFT 元数据等关键场景
- 边界清晰,不易误触
亮点
- 文档结构清晰,分步骤说明上传、NFT 元数据和检索流程
- 包含完整的代码示例和端到端使用指南
待提升项
-
缺少错误处理机制 原报告严重程度:重大
上传和检索函数未处理网络请求失败、认证错误等异常情况
改进建议:添加 try-catch 块处理 fetch 请求异常,验证响应状态码,提供有意义的错误信息
取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。
正文静态检测
100 / 100 · skillpi-20261123-no-r3-v1
正文未命中当前规则。
分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。
权限与使用前检查
根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。
未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。
文档引用的域名或地址
这些地址可能用于文档链接或示例,不是已批准的联网清单。使用前核对实际目的地及发送的数据。
- api.pinata.cloud
- gateway.pinata.cloud
安全评级与访问范围
safe · 静态证据核验,不代表运行安全保证。
使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。
用户讨论
还没有已核实的点评。