跳到主内容
智客 ZICQ

技能库 智客分类:Agent 工作流 docyrus-api-dev

Docyrus Api Dev

使用 Docyrus API 开发应用程序,其中包含 @docyrus/ api- client 和 @docyrus/ signin 库. 在构建以多西鲁斯 OAuth2 (PKCE, iframe, 客户端证书, 设备代码)认证的应用时使用, 使 REST API 呼叫多西鲁斯数据源端点, 构建带有过滤器, 聚合, 公式, pivots, 和儿童查询的查询, 或与外部连接器( 发现连接器, 通过提供者认证发送请求, 运行动作) 集成时使用. 触发任务涉及多西鲁斯API集成,@docyrus/api-client用法,@docyrus/sigin认证,数据源查询架构,多西鲁斯REST端点消耗,连接器发现,或外部提供者请求.

804 安装量

官方网址:skills.sh

技能介绍

先看中文介绍;官方 description 原文单独保留,不改写 SKILL.md。

做什么

使用 Docyrus API 开发应用程序, 包含 @ docyrus/ api- client 和 @ docyrus/ signin 库

何时用

构建以 Docyrus OAuth2 (PKCE, iframe, 客户资格, 设备代码)认证的应用软件, 使 REST API 呼叫 Docyrus 数据源端点, 构建带过滤器、 聚合器、 公式、 pivots 和 儿童查询的查询有效载荷, 或与外部连接器整合

代理如何加载

按 Agent Skills 渐进披露:启动时只加载 name 与 description(约 100 token);任务匹配后才读入整份 SKILL.md 正文;scripts/、references/、assets/ 仅在需要时再读。 本文件正文结构:Docyrus API Developer、Authentication Quick Start、React Apps — Use @docyrus/signin、Non-React / Server — Use OAuth2Client Directly、API Endpoints、Data Source Items (Dynamic per tenant)。

文件分析

文件分析:除 SKILL.md 外,正文引用了 references/data-source-query-guide.md、references/formula-design-guide-llm.md、references/api-client.md、references/authentication.md,属于带资源的技能包,这些文件按需再读。

官方 description(原文)

Develop applications using the Docyrus API with @docyrus/api-client and @docyrus/signin libraries. Use when building apps that authenticate with Docyrus OAuth2 (PKCE, iframe, client credentials, device code), make REST API calls to Docyrus data source endpoints, construct query payloads with filters, aggregations, formulas, pivots, and child queries, or integrate with external connectors (discover connectors, send requests through provider auth, run actions). Triggers on tasks involving Docyrus API integration, @docyrus/api-client usage, @docyrus/signin authentication, data source query building, Docyrus REST endpoint consumption, connector discovery, or external provider requests.

Docyrus API DeveloperAuthentication Quick StartReact Apps — Use @docyrus/signinNon-React / Server — Use OAuth2Client DirectlyAPI EndpointsData Source Items (Dynamic per tenant)System Endpoints (Always Available)Connector Discovery & External Request EndpointsAction Run EndpointsACL / Role Management EndpointsMaking API CallsQuery Payload Summary

来源分类:skills.sh agent-skill

SKILL.md 与 Agent 调用

官方规范 ↗
name
docyrus-api-dev
description
Develop applications using the Docyrus API with @docyrus/api-client and @docyrus/signin libraries. Use when building apps that authenticate with Docyrus OAuth2 (PKCE, iframe, client credentials, device code), make REST API calls to Docyrus data source endpoints, construct query payloads with filters, aggregations, formulas, pivots, and child queries, or integrate with external connectors (discover connectors, send requests through provider auth, run actions). Triggers on tasks involving Docyrus API integration, @docyrus/api-client usage, @docyrus/signin authentication, data source query building, Docyrus REST endpoint consumption, connector discovery, or external provider requests.
  1. 发现技能客户端向 Agent 提供名称与描述目录。
  2. 匹配与调用用户指定或任务匹配后,载入 SKILL.md 指令。
  3. 按需加载按步骤读取参考文档、使用脚本与素材。
指令中引用的文件 · 4
  • references/data-source-query-guide.md
  • references/formula-design-guide-llm.md
  • references/api-client.md
  • references/authentication.md

以下路径提取自原文;文件是否齐全请以来源仓库中的完整目录为准。

具体调用语法与可用工具以目标 Agent 客户端为准。 查看调用机制说明 ↗

安装这个技能

Skills CLI ↗

先选择目标 Agent 和安装范围,保留技能包的附属文件,安装后检查客户端能否发现该技能。

该技能引用了附属文件,请从来源获取完整目录;仅复制 SKILL.md 可能缺少依赖。

交给 Agent 安装

复制安装指令给支持 Agent Skills 的代理,确认其中的目标目录与客户端匹配。

把 Agent Skill「docyrus-api-dev」安装到我的项目:SKILL.md 原文与官方 description 见 https://zicq.com/zh/skills/skl-792bb8b6ed7acab7-%E5%A4%9A%E8%A5%BF%E9%B2%81%E6%96%AF%C2%B7%E9%98%BF%E7%9A%AE%C2%B7%E5%BE%B7%E5%A4%AB.html
请存为 .cursor/skills/docyrus-api-dev/SKILL.md 或 .claude/skills/docyrus-api-dev/SKILL.md,frontmatter 的 name 与 description 保持原样,不要改写。
该技能还带 scripts/、references/、assets/ 等文件,请从 https://github.com/docyrus/agent-skills 取完整目录,不要只建一个 SKILL.md。

GitHub 完整包 ↗

终端安装 · Skills CLI

需要 Node.js 与 npx。先查看仓库技能列表,确认实际名称。

npx skills add 'https://github.com/docyrus/agent-skills' --list

npx skills add 'https://github.com/docyrus/agent-skills' --skill 'docyrus-api-dev'

CLI 会交互选择目标 Agent,默认安装到项目;用户级安装使用 -g。先通过查看命令核对仓库内容,再用 npx skills list 检查已安装技能。

阅读排版
--- name: docyrus-api-dev description: Develop applications using the Docyrus API with @docyrus/api-client and @docyrus/signin libraries. Use when building apps that authenticate with Docyrus OAuth2 (PKCE, iframe, client credentials, device code), make REST API calls to Docyrus data source endpoints, construct query payloads with filters, aggregations, formulas, pivots, and child queries, or integrate with external connectors (discover connectors, send requests through provider auth, run actions). Triggers on tasks involving Docyrus API integration, @docyrus/api-client usage, @docyrus/signin authentication, data source query building, Docyrus REST endpoint consumption, connector discovery, or external provider requests. --- # Docyrus API Developer Integrate with the Docyrus API using `@docyrus/api-client` (REST client) and `@docyrus/signin` (React auth provider). Authenticate via OAuth2 PKCE, query data sources with powerful filtering/aggregation, and consume REST endpoints. ## Authentication Quick Start ### React Apps — Use @docyrus/signin ```tsx import { DocyrusAuthProvider, useDocyrusAuth, useDocyrusClient, SignInButton } from '@docyrus/signin' // 1. Wrap root // 2. Use hooks function App() { const { status, signOut } = useDocyrusAuth() const client = useDocyrusClient() // RestApiClient | null if (status === 'loading') return if (status === 'unauthenticated') return // client is ready — make API calls const user = await client!.get('/v1/users/me') } ``` ### Non-React / Server — Use OAuth2Client Directly ```typescript import { RestApiClient, OAuth2Client, OAuth2TokenManagerAdapter, BrowserOAuth2TokenStorage } from '@docyrus/api-client' const tokenStorage = new BrowserOAuth2TokenStorage(localStorage) const oauth2 = new OAuth2Client({ baseURL: 'https://api.docyrus.com', clientId: 'your-client-id', redirectUri: 'http://localhost:3000/callback', usePKCE: true, tokenStorage, }) // Auth Code flow const { url } = await oauth2.getAuthorizationUrl({ scope: 'openid offline_access Users.Read' }) window.location.href = url // After redirect: const tokens = await oauth2.handleCallback(window.location.href) // Create API client with auto-refresh const client = new RestApiClient({ baseURL: 'https://api.docyrus.com', tokenManager: new OAuth2TokenManagerAdapter(tokenStorage, async () => { return (await oauth2.refreshAccessToken()).accessToken }), }) ``` ## API Endpoints ### Data Source Items (Dynamic per tenant) ``` GET /v1/apps/{appSlug}/data-sources/{slug}/items — List with query payload GET /v1/apps/{appSlug}/data-sources/{slug}/items/{id} — Get one POST /v1/apps/{appSlug}/data-sources/{slug}/items — Create PATCH /v1/apps/{appSlug}/data-sources/{slug}/items/{id} — Update DELETE /v1/apps/{appSlug}/data-sources/{slug}/items/{id} — Delete one DELETE /v1/apps/{appSlug}/data-sources/{slug}/items — Delete many (body: { recordIds }) ``` Endpoints exist only if the data source is defined in the tenant. Check the tenant's OpenAPI spec at `GET /v1/api/openapi.json`. ### System Endpoints (Always Available) ``` GET /v1/users — List users POST /v1/users — Create user GET /v1/users/me — Current user profile PATCH /v1/users/me — Update current user ``` ### Connector Discovery & External Request Endpoints ``` GET /v1/connectors?q=&limit=&offset= — List connectors with keyword search GET /v1/connectors/{dataProviderSlug} — Get connector detail (dataSources + actions) GET /v1/connectors/{dataProviderSlug}/actions/{actionKey} — Get action detail (input/output schemas, API endpoint) GET /v1/connectors/{dataProviderSlug}/connections — Get tenant connections + user connection status PUT /v1/connectors/{dataProviderSlug} — Send HTTP request through connector provider auth ``` Scopes: `Read.All`, `ReadWrite.All`, or `Connectors.Read.All`. The `PUT` endpoint requires `ReadWrite.All`. **PUT request body** for sending requests through a connector: ```json { "endpoint": "relative/path/or/absolute-url", "requestMethod": "GET", "data": { "fields": "id,name", "limit": 20 }, "contentType": "application/json", "headers": { "Authorization": "Bearer " }, "connectionId": "optional-tenant-connection-uuid", "connectionAccountId": "optional-connection-account-uuid" } ``` The connector resolves auth credentials (OAuth tokens, base URL) from the provider configuration and stored connections. Custom `headers.Authorization` overrides the stored token. ### Action Run Endpoints ``` GET /v1/apps/base/actions — List base actions GET /v1/apps/{appSlug}/actions/{actionSlug} — Get action metadata POST /v1/apps/{appSlug}/actions/{actionSlug}/run — Run action directly ``` Action run accepts arbitrary JSON body as input. Optional headers: `x-connection-id`, `x-connection-account-id`. ### ACL / Role Management Endpoints ``` GET /v1/users/acl?dataSourceId={uuid}&recordId={uuid} — Read record ACL rows POST /v1/users/acl/share — Upsert record shares DELETE /v1/users/acl/share — Revoke record shares PUT /v1/users/acl/owner — Transfer record ownership GET /v1/users/acl/roles — List roles GET /v1/users/acl/roles/{roleId} — Get one role POST /v1/users/acl/roles — Create role PATCH /v1/users/acl/roles/{roleId} — Update role DELETE /v1/users/acl/roles/{roleId} — Delete role GET /v1/users/acl/user-roles — List user-role assignments GET /v1/users/acl/users/{userId}/roles — List one user's roles POST /v1/users/acl/users/{userId}/roles — Add roles to a user PUT /v1/users/acl/users/{userId}/roles — Replace a user's full role set DELETE /v1/users/acl/users/{userId}/roles/{roleId} — Remove one role assignment GET /v1/users/acl/role-queries — List role queries GET /v1/users/acl/role-queries/{roleQueryId} — Get one role query POST /v1/users/acl/role-queries — Create role query PATCH /v1/users/acl/role-queries/{roleQueryId} — Update role query DELETE /v1/users/acl/role-queries/{roleQueryId} — Delete role query ``` ACL routes require the normal authenticated API session, but they may not appear in generated Swagger/OpenAPI output because the backend currently excludes them from public docs. Integrate them with direct `RestApiClient` calls when you need record sharing, role CRUD, user-role assignment management, or role-query management. For all ACL role operations, prefer using role `uid` values returned by the API. Nested role objects expose both `id` and `uid`, and both map to the role UID value. > To **configure** ACL (create roles, assign operation-level permissions, build role queries and an org hierarchy) use the **docyrus-acl-design** skill (`docyrus acl …`). The endpoints above are the runtime REST surface for app/frontend integration. ### Making API Calls ```typescript // List items with query payload const items = await client.get('/v1/apps/base/data-sources/project/items', { columns: 'name, status, record_owner(firstname,lastname)', filters: { rules: [{ field: 'status', operator: '!=', value: 'archived' }] }, orderBy: 'created_on DESC', limit: 50, }) // Get single item const item = await client.get('/v1/apps/base/data-sources/project/items/uuid-here', { columns: 'name, description, status', }) // Create const newItem = await client.post('/v1/apps/base/data-sources/project/items', { name: 'New Project', status: 'status-enum-id', }) // Update await client.patch('/v1/apps/base/data-sources/project/items/uuid-here', { name: 'Updated Name', }) // Delete await client.delete('/v1/apps/base/data-sources/project/items/uuid-here') ``` ## Query Payload Summary The GET items endpoint accepts a powerful query payload: | Feature | Purpose | |---------|---------| | `columns` | Select fields, expand relations `field(subfields)`, alias `alias:field`, spread `...field()` | | `filters` | Nested AND/OR groups with 50+ operators (comparison, date shortcuts, user-related) | | `filterKeyword` | Full-text search across all searchable fields | | `orderBy` | Sort by fields with direction, including related fields | | `limit`/`offset` | Pagination (default limit: 100) | | `fullCount` | Return total matching count alongside results | | `calculations` | Aggregations: count, sum, avg, min, max with grouping | | `formulas` | Computed virtual columns (simple functions, block AST, correlated subqueries) | | `childQueries` | Fetch related child records as nested JSON arrays | | `pivot` | Cross-tab matrix queries with date range series | | `expand` | Return full objects for relation/user/enum fields instead of IDs | **For full query and formula references, read**: - `references/data-source-query-guide.md` - `references/formula-design-guide-llm.md` ## Critical Rules 1. **Always send `columns`** in list/get calls. Without it, only `id` is returned. 2. **Data source endpoints are dynamic** — they exist only for data sources defined in the tenant. 3. **Use `id` field** for `count` calculations. Use the actual field slug for `sum`, `avg`, `min`, `max`. 4. **Child query keys must appear in `columns`** — if childQuery key is `orders`, include `orders` in columns. 5. **Formula keys must appear in `columns`** — if formula key is `total`, include `total` in columns. 6. **Filter by related field** using `rel_{{relation_field}}/{{field}}` syntax. 7. **ACL routes may be hidden from generated OpenAPI** — call them directly via `RestApiClient` instead of expecting generated collection support. 8. **Prefer role `uid` values** for ACL role writes, user-role `roleIds`, and role-query `roleIds`. 9. **Treat `PUT /v1/users/acl/users/:userId/roles` as full replacement** and `POST /v1/users/acl/users/:userId/roles` as additive. 10. **Send role-query `query` as raw JSON** and let backend derive `tenantAppId` from `dataSourceId` when applicable. 11. **After deleting a role, refresh dependent ACL state** — role lists, user-role lists, role-query lists, and any UI showing primary-role labels. ## References Read these files when you need detailed information: - **`references/api-client.md`** — Full RestApiClient API, OAuth2Client (all flows: PKCE, client credentials, device code), token managers, interceptors, error classes, SSE/streaming, file upload/download, HTML to PDF, retry logic - **`references/authentication.md`** — @docyrus/signin React provider, useDocyrusAuth/useDocyrusClient hooks, hasRole/hasPermission authorization helpers, SignInButton, standalone vs iframe auth modes, env vars, API client access pattern - **`references/data-source-query-guide.md`** — Up-to-date query payload guide: columns, filters, orderBy, pagination, calculations, formulas, child queries, pivots, and operator reference - **`references/formula-design-guide-llm.md`** — Up-to-date formula design guide for building and validating `formulas` payloads

相关技能

Agent 工作流

Skill Creator

创造有效技能指南。 当用户想创造出新的技能(或更新现有的技能),以专业知识,工作流程,或工具集成来扩展克洛德的能力时,应该使用这种技能.

Agent 工作流

Clawdhub

使用ClawdHub CLI搜索,安装,更新并发布从taladhub.com的代理技能. 需要获取苍蝇上的新技能时使用,将安装的技能同步到最新版本或特定版本,或者发布 npm-instainddhub CLI 的新/更新的技能文件夹.

Agent 工作流

Agent Team Orchestration

管弦乐团多代理团队,任务设定周期,交接协议,审查工作流程. 使用时间: (1)建立2+特派员队伍,具有不同专业,(2)确定任务路线和生命周期(收录框_ spec_建设_审查_完成),(3)在特派员之间制定交接协议,(4)建立审查和质量关口,(5)管理特派员之间的交流和文物共享.

Agent 工作流

Superpowers

Spec-first,TDD,子代理驱动的软件开发工作流程. 当:(1)构建任何新功能或应用——触发脑暴_计划_子代理执行回路,(2)调试出一个bug或测试失败——触发系统性的根起过程,(3)用户说"让我们构建","帮助我计划","我想添加X",或"这个被打破",(4)完成一个功…