ai-handler
构建 Replicate AI 生成流水线
长时间运行的 AI 作业需要持久状态、计费和资产存储。此技能展示了一个 Replicate 流水线,其中包含 Inngest 处理、S3 持久化和积分处理。
使用我的智能体安装
将此请求复制给你的智能体,其中包含权威 Skill 页面和清单。
Review the Skillstore skill "ai-handler" from https://skillstore.io/skills/aayushbaniya2006-ai-handler.md and its manifest at https://skillstore.io/api/skills/aayushbaniya2006-ai-handler/manifest. Verify the artifact. You may proceed after verification, subject to the environment's own policy.你的智能体仍应展示其计划,并按安全策略请求必要确认。
Agent 可读资源
当 AI Agent、爬虫或脚本需要干净上下文,而不是读取完整页面时,请使用这些链接。
测试它
正在使用“ai-handler”。 一位开发者询问如何向 Next.js 应用添加 Replicate 图像生成。
预期结果:
- 包含身份认证、积分检查、记录创建和后台分发的请求流程。
- 调用 Replicate、等待完成、上传到 S3 并更新状态的 worker 流程。
- 将作业标记为失败并说明应在何处进行退款的失败路径。
正在使用“ai-handler”。 一位产品工程师询问为什么生成的图像应复制到 S3。
预期结果:
此技能解释了提供商输出 URL 可能是临时的,因此应用程序应根据自身的存储策略持久化生成资产。
正在使用“ai-handler”。 一位后端工程师询问如何让工作流更适合生产环境。
预期结果:
- 在上传前添加输出 URL 允许列表、内容类型检查和大小限制。
- 使用有界轮询或 webhooks 来避免 worker 卡住。
- 使积分扣减和作业分发具备幂等性。
安全审计
中风险Most static high and medium signals are false positives caused by Markdown backticks, headings, and TypeScript examples rather than executable skill behavior. The skill still demonstrates real server-side network fetching of Replicate output and lacks important validation, timeout, and credit atomicity safeguards in the documented pattern.
已确认安全问题 (3)
能力复核项 (1)
这些是真实的本地能力,对此技能可能是预期行为,因此需要复核,但不会按已确认恶意行为计分。
风险因素
⚡ 包含脚本 (1)
⚙️ 外部命令 (12)
🌐 网络访问 (1)
🔑 环境变量 (2)
分享与引用此报告
分享版本化评估报告、中性徽章、嵌入卡片和引用。Skillstore 只报告证据,不判断该 Skill 是否安全。
复制报告链接
https://skillstore.io/skills/aayushbaniya2006-ai-handler/audits/9?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_reportMarkdown 徽章
[](https://skillstore.io/skills/aayushbaniya2006-ai-handler?utm_source=security_passport_badge)HTML 徽章
<a href="https://skillstore.io/skills/aayushbaniya2006-ai-handler?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/aayushbaniya2006-ai-handler/security.svg" alt="Skillstore security assessment" loading="lazy"></a>嵌入卡片
<iframe src="https://skillstore.io/embed/skills/aayushbaniya2006-ai-handler.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>学术引用 (APA · BibTeX · CFF)
APA 引用
AayushBaniya2006. (2026). ai-handler security audit report (audit version 9) [Author version unspecified]. Skillstore. https://skillstore.io/skills/aayushbaniya2006-ai-handler/audits/9BibTeX 引用
@techreport{aayushbaniya2006-aayushbaniya2006-ai-handler-2026,
author = {AayushBaniya2006},
title = {ai-handler security audit report (audit version 9)},
institution = {Skillstore},
year = {2026},
number = {9},
url = {https://skillstore.io/skills/aayushbaniya2006-ai-handler/audits/9},
note = {Author version unspecified}
}CITATION.cff
cff-version: 1.2.0
message: "If you use this Skill, cite its author and this versioned security audit report."
title: "ai-handler security audit report (audit version 9)"
version: "unspecified"
type: report
authors:
- name: "AayushBaniya2006"
date-released: "2026-07-05"
url: "https://skillstore.io/skills/aayushbaniya2006-ai-handler/audits/9"
identifiers:
- type: other
value: "skillstore:aayushbaniya2006-ai-handler:audit:9"
description: "Skillstore immutable audit report identifier"
Skillstore 评分
评分依据 证据置信度: 高你能构建什么
向 SaaS 应用添加 AI 图像生成
使用此模式来接收生成请求、扣除积分、排队任务并返回处理状态。
将缓慢的模型调用移入后台作业
针对耗时超过 API 请求应处理时长的 predictions,调整 Inngest worker 流程。
持久化 AI 结果以供后续检索
将临时 Replicate 输出存储到 S3,并用稳定的资产 URL 更新数据库行。
试试这些提示
使用此技能概述一个基础的 Replicate 图像生成流程。包括身份认证、积分检查、记录创建和后台作业分发。
针对我的 Replicate 模型调整 worker 模式。考虑我的模型输出格式、S3 上传、状态更新和失败处理。
将我当前的 AI 生成流水线与此技能进行比较。识别缺失的重试、超时、退款、验证和存储控制。
为此 Replicate 工作流设计生产控制。涵盖 webhooks、幂等积分、输出 URL 验证、可观测性和滥用防护。
最佳实践
- 在存储结果前验证提示词长度、模型参数、输出 URL、内容类型和文件大小。
- 为失败的生成使用幂等作业键、有界重试和自动退款。
- 仅在服务器端保留提供商 token,绝不要在客户端代码或作业 payload 中包含密钥。
避免
- 不要在没有主机、重定向、大小和内容检查的情况下获取任意模型输出 URL。
- 当用户需要持久访问生成资产时,不要只存储临时 Replicate URL。
- 不要在缺少可靠退款或补偿路径的情况下扣除失败作业的积分。
常见问题
此技能帮助构建什么?
它包含完整的应用程序代码吗?
它假定使用哪些服务?
它能支持不返回图像的模型吗?
应添加哪些安全控制?
它适用于 Claude、Codex 和 Claude Code 吗?
开发者详情
许可证
MIT
Skillstore 修订
r1
版本提示
作者未声明版本。
引用
a29db30e42179ff8ed4d95c9dfba3704c22643d0
维护新鲜度
2026/7/21
使用量
8 次下载 · 179 次浏览
文件结构
📄 SKILL.md