技能 bodhi-sdk-react-integration
📦

bodhi-sdk-react-integration

中風險 ⚙️ 外部命令🌐 網路存取🔑 環境變數📁 檔案系統存取

將 Bodhi SDK 整合到 React 應用程式

React 開發者通常需要一條清楚的路徑,從 Vite 應用程式走到具備 OAuth 的本機 LLM 聊天。此技能提供 bodhi-js-sdk 的設定步驟、程式碼模式、部署指引與疑難排解。

支援: Claude Codex Code(CC)
⚠️ 50
1

下載技能 ZIP

2

在 Claude 中上傳

前往 設定 → 功能 → 技能 → 上傳技能

3

開啟並開始使用

測試它

正在使用「bodhi-sdk-react-integration」。 將 Bodhi 加到我的 Vite React 專案。

預期結果:

一份精簡的整合計畫,包含 package installation、provider placement、chat component changes 與 verification steps。

正在使用「bodhi-sdk-react-integration」。 我的 GitHub Pages callback 回傳 404。

預期結果:

一份部署檢查清單,涵蓋 Vite base path、callback path、redirect URI registration 與 static routing behavior。

正在使用「bodhi-sdk-react-integration」。 Login 成功一次後,應用程式就失去 authentication。

預期結果:

一套針對 browser storage access、base path mismatches、token refresh 與 safe log redaction 的疑難排解流程。

安全審計

中風險
v6 • 6/28/2026

Static analysis heavily overcounted Markdown code fences as Ruby backtick execution and marked documentation URLs as risky network behavior. Human review found no prompt injection or confirmed malicious intent, but the skill can run npm/npx commands and includes troubleshooting guidance that may expose OAuth token state in browser storage or console logs.

6
已掃描檔案
2,475
分析行數
9
發現
6
審計總數
中風險問題 (2)
OAuth Token State May Be Exposed During Troubleshooting
The troubleshooting guide recommends logging authentication state and reading localStorage values that may contain access tokens. This is legitimate debugging guidance, but users could accidentally share sensitive token data in logs or issue reports.
Permitted npm and npx Command Execution
The skill allows Bash execution for npm and npx and instructs users to install packages, run dev servers, build apps, and preview deployments. These commands are expected for a React integration skill, but they execute project scripts and dependency lifecycle hooks.
低風險問題 (3)
Static Command Findings Are Markdown False Positives
The analyzer reported many Ruby backtick executions, but reviewed locations are Markdown fenced code blocks containing TypeScript, TSX, shell snippets, or prose. No Ruby backtick execution pattern was confirmed in executable skill code.
Hardcoded URLs Point to Expected Services
The hardcoded URLs identify Bodhi developer, OAuth, GitHub Pages, Vite, and localhost endpoints needed for setup and troubleshooting. They are not evidence of covert network exfiltration, but users should verify service domains before entering credentials.
Environment Variable Examples Are Public Client Configuration
The skill documents Vite environment variables and GitHub Actions secrets for OAuth client IDs and redirect URIs. These examples do not contain real secrets, but users should avoid committing production-specific values when their policy treats client IDs as sensitive.

偵測到的模式

Bash Tool Access for Package CommandsBrowser Storage Token InspectionLocalhost Network Diagnostics
審計單位: codex 檢視審計紀錄 →

品質評分

55
架構
100
可維護性
87
內容
74
社群
49
安全
83
規範符合度

你可以打造什麼

將本機 LLM 聊天加入 React 應用程式

在 Vite 應用程式中設定 Bodhi provider、建立聊天元件、載入模型並串流回應。

為生產部署準備 OAuth

分離開發與生產 client IDs、設定 redirect URIs,並透過部署工作流程傳遞 Vite environment variables。

偵錯 Bodhi 整合失敗

透過針對性的疑難排解步驟,檢查 extension 狀態、backend 可連線性、authentication state、模型載入與串流行為。

試試這些提示

開始基本整合
將 bodhi-js-sdk 整合到我的 React 和 Vite 應用程式。加入 provider、一個簡單的聊天元件,以及清楚的設定說明。
設定 OAuth 環境
協助我設定 dev 和 production 的 Bodhi OAuth。包含 redirect URI 檢查、Vite environment variables,以及安全部署注意事項。
部署到 GitHub Pages
為 GitHub Pages 準備我的 Bodhi React 應用程式。修正 base path 處理、callback routing 與 build workflow。
排解損壞的整合
診斷為什麼我的 Bodhi React 整合無法 authentication 或載入模型。安全地檢查 provider configuration、backend reachability 與 browser storage。

最佳實務

  • 為開發與生產環境使用不同的 OAuth clients。
  • 在分享 console logs 前,遮蔽 token values 和 auth state。
  • 執行 npm 或 npx commands 前,先驗證 package scripts 和 dependency changes。

避免

  • 如果你的團隊將 client IDs 視為敏感資訊,請勿提交真實的 deployment configuration。
  • 請勿將 localStorage auth values 貼到公開 issues 或 support channels。
  • 請勿將 localhost redirect URIs 重複用於 production OAuth clients。

常見問題

此技能支援哪些專案?
它支援使用 Vite 和 @bodhiapp/bodhi-js-react package 建置的 React applications。
它需要 Bodhi Browser extension 嗎?
建議使用 extension,但當本機 backend 可用時,SDK 可以使用 direct mode。
它可以將我的應用程式部署到 GitHub Pages 嗎?
它提供 GitHub Pages 的設定指引,包含 base paths、callback handling 與 workflow notes。
它會管理 OAuth client registration 嗎?
不會。它會引導你完成註冊,但 clients 需要由你在 Bodhi developer portal 中建立。
為什麼 security risk 是 medium?
此技能是合法的,但它可以執行 npm commands,並包含可能暴露 token state 的偵錯步驟。
我該如何安全地使用 troubleshooting logs?
只分享已遮蔽的 logs。請先移除 access tokens、client identifiers、user data 與 localStorage values。