Token导航 LogoToken导航TokenDH.com
研究检索敏感数据unknown未标认证来源可访问许可证需确认审计通过

dypai-sdkdypai SDK 搜索

Agent Skill

dypai-sdk 用于查找、检索和筛选相关信息,适合在 Local Agent 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

218

周安装

9

下载量

71
Local Agent

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:dypai-sdk(dypai SDK 搜索)
来源仓库:https://dypai.ai
仓库路径:dypai-sdk
安装命令:
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。当前暂无明确安装命令,请以来源页面说明为准。

简介

DYPAI Client SDK 技能聚焦 @dypai-ai/client-sdk 的实际调用规范与认证流程。

  • 强调优先查阅项目文档与现有代码,不臆造端点行为或授权机制。
  • 适用于 SDK 代码审查与实现指导,保持与真实项目状态一致。
  • 若 auth 模式不明,应提示用户先 inspect 项目源码或联系维护者澄清细节。
  • dypai-sdk 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

DYPAI Client SDK

Purpose

Use this skill when implementing or reviewing app code that calls DYPAI through @dypai-ai/client-sdk.

This skill is intentionally short:

  • Keep core SDK guidance here.
  • Treat dypai-mcp/docs and live project state as the source of truth for endpoint/auth behavior.
  • Do not invent auth or endpoint flows if the project can be inspected first.

First Principles

Before proposing or writing SDK code:

  1. Inspect the project with DYPAI tools/docs first.
  2. Prefer existing endpoint names, auth modes, and workflow patterns over assumptions.
  3. If auth or endpoint behavior is unclear, inspect before coding.

Prefer this order:

  1. Project state via DYPAI MCP tools
  2. dypai-mcp/docs
  3. This skill

If they conflict, trust the real project state first.

Recommended Agent Workflow

When implementing DYPAI SDK logic, do this in order:

  1. Inspect DYPAI project state first via MCP tools.
  2. Check the app codebase for an existing DYPAI client, auth routes, and env usage before creating new files or helpers.
  3. Verify whether @dypai-ai/client-sdk is already installed in package.json before suggesting imports or installation.
  4. If the SDK is missing, add it with the project's actual package manager (npm, pnpm, yarn, or bun) instead of inventing commands.
  5. Reuse existing endpoint names, auth modes, and callback routes when they already exist.

Minimum things to inspect before implementing:

  • dependency entry for @dypai-ai/client-sdk
  • existing createClient(...) helper or shared SDK module
  • auth pages/routes such as login, register, auth/callback, forgot-password, reset-password, set-password
  • current env variable conventions for browser vs server-only code
  • DYPAI endpoint auth mode (jwt vs api_key)

Mandatory Tool Usage

Do not rely only on this skill from memory.

Before proposing SDK architecture, auth flows, endpoint names, or setup steps:

  1. Use DYPAI MCP tools to inspect the real project state when available.
  2. Search dypai-mcp/docs for the relevant topic instead of guessing from prior patterns.
  3. Prefer tool-based discovery over assumptions, especially for:

- endpoint existence - endpoint auth_mode - available workflow nodes - auth flow expectations - SDK setup details already documented

If the project can be inspected, inspect first. Do not invent the answer when DYPAI tools or docs can confirm it.

Auth Rules

There are only two application-facing auth modes for HTTP endpoints:

  • jwt: user session required
  • api_key: project API key required

Important:

  • Do not design or suggest public unauthenticated endpoints.
  • Do not suggest service_role for app developers, frontend flows, or MCP-created endpoints.
  • Treat api_key as server-only unless the project explicitly documents otherwise.

Use jwt when:

  • The request is tied to a signed-in user
  • The workflow uses current_user, current_user_id, or role-based access
  • The request originates from browser/client UI

Use api_key when:

  • The call is server-to-server
  • The request comes from a Server Component, Route Handler, Server Action, backend, worker, or cron
  • No user context is needed

Never recommend:

  • putting project API keys in browser code
  • using NEXT_PUBLIC_*, VITE_*, or similar public env vars for server-only keys
  • sending user_id manually in request bodies when JWT context should provide it

Setup

Install:

npm install @dypai-ai/client-sdk

Minimal client with user auth:

import { createClient } from '@dypai-ai/client-sdk';

export const dypai = createClient('https://your-project.dypai.app');

Client that also targets api_key endpoints:

export const dypai = createClient(
  process.env.DYPAI_URL!,
  process.env.DYPAI_API_KEY
);

Use server-only env vars for api_key where possible.

With options:

const dypai = createClient(url, key, {
  auth: {
    storage: customMemoryStorage, // SSR/Node.js: custom storage adapter
    autoRefreshToken: true,       // default: true
    persistSession: true,         // default: true
    storageKey: 'my-app'          // isolate localStorage between clients
  },
  global: {
    fetch: customFetch,           // custom fetch implementation
    headers: { 'X-Custom': 'val' }
  },
  storageKey: 'my-app'            // shortcut for auth.storageKey
});

With TypeScript generics:

interface MyDB {
  productos: { id: string; nombre: string; precio: number };
}

interface MyApi extends EndpointMap {
  'listar_productos': { response: Product[]; params: { limit?: number } };
  'crear_pedido': { body: CreateOrderInput; response: Order };
}

const dypai = createClient<MyDB, MyApi>(url, key);

Core SDK Surface

Use these as the default primitives:

  • Auth:

- dypai.auth.signInWithPassword(...) - dypai.auth.signInWithOtp(...) - dypai.auth.verifyOtp(...) - dypai.auth.signInWithOAuth(...) - dypai.auth.signOut() - dypai.auth.getSession() - dypai.auth.getUser() / dypai.me() - dypai.auth.onAuthStateChange(...)

  • API:

- dypai.api.get(name, {params}) - dypai.api.post(name, body) - dypai.api.put(name, body) - dypai.api.patch(name, body) - dypai.api.delete(name)

  • Files via endpoints:

- dypai.api.upload(name, file, {params, onProgress}) - dypai.api.download(name, body?, {fileName, params}) - dypai.api.post(name, body) for signed URLs or file actions - dypai.api.delete(name, {params})

  • Users:

- dypai.users.list(...) - create(...) - update(...) - delete(...)

Response Pattern

Every method returns {data, error} — never throws.

const { data, error } = await dypai.api.post('create_task', { title: 'New' });

if (error) {
  // error.message, error.status, error.code, error.details
  console.error(`[${error.status}] ${error.message}`);
  return;
}

// data is typed and safe to use
console.log(data);

Mandatory Discovery Before Auth Or Endpoint Design

If the task touches endpoint auth, API flows, or SDK integration:

  1. Check DYPAI MCP tools first for existing endpoints and node capabilities.
  2. Read the relevant docs in dypai-mcp/docs.
  3. Reuse existing endpoint names and auth modes when possible.

Do this before proposing:

  • signup/login flows
  • route protection strategy
  • server-vs-client API calling patterns
  • storage endpoint design
  • workflow endpoint conventions

Fundamental Gotchas

  1. No public endpoints. Do not assume unauthenticated endpoint access exists.
  2. api_key is not the default browser path. Prefer jwt for client UI.
  3. Do not expose privileged keys. Never suggest service_role in app code.
  4. Do not send user_id in the request body. The backend should derive user context from JWT.
  5. There are no automatic CRUD REST endpoints. Endpoints must exist first in API Builder or MCP.
  6. Endpoint names are logical names, not full URLs.
  7. Use getSession() for reliable startup auth checks. isLoggedIn() is sync and can be false during init.
  8. File handling is endpoint-based. Do not suggest dypai.storage; use dypai.api.upload() / dypai.api.download() or endpoint calls instead.

Recommended Patterns

Browser / authenticated app:

const dypai = createClient(process.env.NEXT_PUBLIC_DYPAI_URL!);
const { data: session } = await dypai.auth.getSession();
const { data, error } = await dypai.api.get('get_profile');

Server / api_key endpoint:

const dypai = createClient(
  process.env.DYPAI_URL!,
  process.env.DYPAI_API_KEY
);

const { data, error } = await dypai.api.post('sync_data', payload);

Files via endpoints:

const { data, error } = await dypai.api.upload('storage_files', file, {
  params: { operation: 'upload', file_path: `invoices/${file.name}` }
});

API Endpoints

Endpoint names use snake_case.

const { data } = await dypai.api.get('search_products', {
  params: { category: 'food', limit: 20 }
});

const { data: created } = await dypai.api.post('create_invoice', {
  client_id: 'uuid',
  items: [{ product_id: 'uuid', qty: 2 }]
});

SDK-Specific Must-Knows

  • signInWithOAuth() redirects the browser and the session is recovered on return.
  • signUp() may return confirmationRequired instead of an immediate session.
  • OTP verification requires the correct type.
  • dypai.users.* is admin-oriented and should not be treated as normal browser-safe user functionality.

File Upload Pattern

Use workflow endpoints that call dypai_storage on the backend.

Common patterns:

  • Generic file endpoint such as storage_files for upload/list/delete
  • Dedicated download endpoint when access must be validated with SQL first
  • dypai.api.upload() for browser uploads
  • dypai.api.download() or dypai.api.post() for downloads / signed URLs

Recommended endpoint node:

{
  "node_type": "dypai_storage",
  "parameters": {
    "operation": "${input.operation}",
    "bucket": "documents"
  }
}

Then call it from the SDK:

await dypai.api.upload('storage_files', file, {
  params: { operation: 'upload', file_path: `documents/${file.name}` }
});

For user-facing downloads, prefer a dedicated endpoint that validates ownership before generating the signed URL.

Extra References

Use these for detailed guidance when needed:

  • dypai-mcp/docs/trigger-model.md
  • dypai-mcp/docs/workflow-patterns.md
  • dypai-mcp/docs/sdk-reference.md
  • dypai-mcp/docs/credentials-reference.md

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Local Agent

88.46%
按下载量换算63

安全审计

Socket

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills