installskill

Skills / neondatabase/agent-skills

neon-ai-gateway

通过 Neon AI Gateway 的统一 API 调用多家厂商的 LLM 和嵌入模型。

钉定的 commit
d3601d9e1f93提交时间 2026-11-18
文件数
124 KB
许可证
Apache-2.0
快照时间
2026-11-28
Skill 自带的描述
One API and one credential for frontier and open-source LLMs and embedding models, built into your Neon branch and powered by Databricks. Use when a user wants to call an LLM, generate embeddings, add AI/chat/an agent to their app, route between model providers (OpenAI, Anthropic, Google/Gemini, Meta, Alibaba, and more), or avoid juggling separate provider API keys and accounts — especially when they already use Neon and want AI requests to branch with their project. Works with the OpenAI SDK, Anthropic SDK, google-genai, the Vercel AI SDK, and Mastra by changing only the base URL. Triggers include "call an LLM", "add AI to my app", "chat completion", "model routing", "LLM proxy/gateway", "one API for all models", "use Claude/GPT/Gemini", "AI SDK", "Mastra agent", "Neon AI Gateway", "generate embeddings", "generate images", and "log/rate-limit AI calls".

Agent 就是根据这段文字决定何时使用这个 skill。

安装

先选你的 agent。标有“已钉定”的命令,装到的就是本页描述的这个 commit。

Skill 目录 .claude/skills/Claude Code · 官方文档

不读取通用的 .agents/skills 目录。skill 必须放进 .claude/skills,或者随 plugin 一起安装。

GitHub CLI已钉定

$ gh skill install neondatabase/agent-skills skills/neon-ai-gateway --agent claude-code --pin d3601d9e1f9398b96a1ee25047bafba5f04199eb

gh 会按 agent 自行决定安装目录,文件夹沿用源目录名(neon-ai-gateway),并在 SKILL.md 的 frontmatter 里写入来源信息,所以下方的内容哈希对不上。请改为核对它写入的 github-tree-sha,应当是 2441f0961546d83b3f3458f877db2147cc7f1c8e。

skills CLI已钉定

$ npx skills add neondatabase/agent-skills@d3601d9e1f9398b96a1ee25047bafba5f04199eb --skill neon-ai-gateway -a claude-code --copy

会从 npm 下载并运行 skills 包。--copy 表示写入真实文件而不是符号链接。该 CLI 默认发送匿名遥测,设置 DISABLE_TELEMETRY=1 可关闭,但同时也会关闭它的安全审计查询。

纯 git已钉定

$ tmp=$(mktemp -d)
$ git clone --quiet https://github.com/neondatabase/agent-skills.git "$tmp"
$ git -C "$tmp" checkout --quiet d3601d9e1f9398b96a1ee25047bafba5f04199eb
$ mkdir -p .claude/skills
$ cp -R "$tmp/skills/neon-ai-gateway" .claude/skills/neon-ai-gateway

不依赖额外工具。文件与上游逐字节一致,安装到 .claude/skills/neon-ai-gateway,可以直接用下方的内容哈希核对。

核对装到的内容

装完后运行这条命令,它会为整个目录输出一个 SHA-256。如果安装器报告的目录与这里不同,请 cd 到那个目录。

$ cd .claude/skills/neon-ai-gateway && find . -type f -print0 | LC_ALL=C sort -z | xargs -0 shasum -a 256 | shasum -a 256

预期结果723e1dfdb54cf305e14097b5a1bcdadf328d8145c2f08fee6551e3a65335309f

只有文件与上游逐字节一致时才会相同。不一致说明有东西变了:可能是安装器改的、你自己改的,或者上游改的。

里面有什么

在文件里匹配到的模式,每条都链接到所在的行。匹配到只表示这里值得读一读,不是结论;没匹配到也不代表不存在。

SKILL.md · 1

执行命令4

会启动其他进程的代码,或说明文档里的 shell 代码块。

脚本中 0 处 · 文档及其他文本文件中 4 处

访问网络1

从远程主机获取数据或向其发送数据的调用。

脚本中 0 处 · 文档及其他文本文件中 1 处

安装依赖包1

在使用时拉取并运行第三方包的命令。

脚本中 0 处 · 文档及其他文本文件中 1 处

读取环境变量或凭证12

引用了环境变量、token、密钥或凭证文件。

脚本中 0 处 · 文档及其他文本文件中 12 处

提权或破坏性操作未匹配

sudo、递归删除、修改权限等命令。

动态或编码后的代码未匹配

eval、exec、base64 解码、管道执行远程脚本等,会掩盖实际运行的内容。

提到的外部域名

文本文件中所有 URL 的域名。

  • neon.com×16
  • models.dev×3
  • ai-sdk.dev×1
  • console.neon.tech×1
  • github.com×1
  • mastra.ai×1

值得多看一眼的条目

没有符号链接、子模块、隐藏文件、压缩包、已编译文件,也没有未扫描的文件。

文件清单

钉定 commit 上该 skill 目录里的全部文件。

内容哈希
723e1dfdb54cf305e14097b5a1bcdadf328d8145c2f08fee6551e3a65335309f
Git tree SHA
2441f0961546d83b3f3458f877db2147cc7f1c8e
路径类型大小SHA-256
SKILL.mdSKILL.md24 KBaf782bf0c85fa3df…

规范与可移植性

对照 Agent Skills 规范检查。

Frontmatter
可解析为 YAML
名称与目录名一致
是
名称只含小写字母、数字和连字符
是
描述长度
866上限 1,024 个字符
SKILL.md 正文
356 行规范建议不超过 500 行
规范之外的字段
无
许可证字段
未声明
许可证文件
未声明
仓库许可证
LICENSE (Apache-2.0)

变更记录

自首次快照以来没有记录到变更,首次快照时间 2026-11-28。

用订阅工具跟踪这个 skill 的变更: Atom 订阅源 · 全部 skill

这个 skill 变更时邮件通知我

邮件提醒还没有做好。留下邮箱,功能上线时我们会写信告诉你一次。上面的订阅源现在就能用。

我们只保存你的邮箱、这个 skill 的名称和日期,不作其他用途。