获取指定 Skill 的详细信息。可获取用户自己的 Skill 或系统预置 Skill。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
rdsai:GetSkill |
none |
*全部资源
|
无 | 无 |
请求语法
GET HTTP/1.1
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| SkillId |
string |
是 |
Skill 唯一标识符. |
550e8400-e29b-41d4-a716-44665544**** |
| Language |
string |
否 |
支持的语言:
|
zh-CN |
| WorkspaceId |
string |
否 |
ContextDB 工作空间 ID |
00000000-0000-4000-8000-000000000001 |
| VersionId |
string |
否 |
版本 UUID(Versions[].Id),不是 1.0.0 等版本号;省略时读取当前生效版本。 |
00000000-0000-4000-8000-000000000002 |
| Path |
string |
否 |
包内文件路径,例如 SKILL.md;正文见 File.text,完整 Markdown 见 SkillMarkdown。 |
SKILL.md |
| Download |
boolean |
否 |
是否获取指定版本的临时下载地址;默认 false。 |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
Schema of Response |
||
| ActiveVersionId |
string |
当前激活版本 ID |
version-example |
| BundleHash |
string |
当前 Skill 包的内容摘要 |
0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef |
| BundleSizeBytes |
integer |
当前 Skill 包大小,单位为字节 |
1024 |
| Capabilities |
object |
当前用户可执行的 Skill 操作 |
|
| Delete |
boolean |
是否可以删除 Skill |
|
| Download |
boolean |
是否可以下载 Skill 包 |
|
| Edit |
boolean |
是否可以编辑 Skill |
|
| Rollback |
boolean |
是否可以回滚 Skill 版本 |
|
| Share |
boolean |
是否可以共享 Skill |
|
| Upload |
boolean |
是否可以上传新版本 |
|
| Category |
string |
Skill 分类 |
productivity |
| Content |
object |
内容。 |
{"MySQL": "MySQL 优化指南...","PostgreSQL": "PostgreSQL 优化指南..."} |
| CreatedAt |
string |
创建时间。 |
2025-06-04T02:25:43Z |
| Dbtypes |
array |
数据库类型列表。 |
|
|
string |
数据库类型。 |
MySQL |
|
| Description |
string |
Skill 描述,最多 1000 个字符。 |
SQL审查专家:全面审核SQL的安全性、性能与规范性,识别风险并提供优化建议。用户提交SQL或询问“SQL审核”“SQL Review”“有风险吗”“如何优化”时,立即启用。 |
| DisplayName |
string |
Skill 展示名称 |
Example Skill |
| DownloadUrl |
string |
临时 Skill 包下载地址 |
https://example.com/skill-package.zip |
| ExpiresAt |
string |
临时下载地址的过期时间 |
2026-09-15T11:00:00Z |
| File |
object |
按 Path 指定读取的包内文件 |
|
| Files |
array<object> |
当前 Skill 包内的文件列表 |
|
|
object |
|||
| Frontmatter |
object |
SKILL.md 的元数据字段 |
|
| Icon |
string |
当前图标的公网 HTTPS URL;未配置时为空 |
https://example.com/skill-icon.png |
| Id |
string |
Skill 唯一标识。 |
d1b7d639-f34e-44c7-8231-987da14d**** |
| IsDeleted |
boolean |
Skill 是否已删除 |
|
| Name |
string |
Skill 名称,只能包含小写字母、数字和连字符。 |
sql-optimization |
| RequestId |
string |
请求唯一标识符。 |
FE9C65D7-930F-57A5-A207-8C396329**** |
| Scope |
string |
Skill 的可见范围 |
PRIVATE |
| SkillId |
string |
当前 Skill ID |
skill-example |
| SkillMarkdown |
string |
完整 SKILL.md Markdown 内容 |
# Example Skill |
| SkillType |
string |
Skill 类型 |
user |
| Slug |
string |
私有 Skill 的稳定标识 |
example-skill |
| UpdatedAt |
string |
更新时间 |
2026-02-04T21:14:45Z |
| Version |
string |
当前 Skill 版本号 |
1.0.0 |
| VersionId |
string |
当前 Skill 版本 ID |
version-example |
| Versions |
array<object> |
当前主体可见的版本列表 |
|
|
object |
|||
| ActivatedAt |
string |
Skill 版本激活时间 |
2026-09-15T10:00:00Z |
| CreatedAt |
string |
Skill 版本创建时间 |
2026-09-15T10:00:00Z |
| CredentialRequired |
boolean |
Skill 是否需要凭证 |
|
| FileCount |
integer |
Skill 包内文件数量 |
1 |
| Id |
string |
Skill 版本 ID |
version-example |
| PackageSize |
integer |
Skill 包大小,单位为字节 |
1024 |
| RevokeReason |
string |
Skill 版本撤销原因 |
Replaced by a newer version |
| RevokedAt |
string |
Skill 版本撤销时间 |
2026-09-15T11:00:00Z |
| Sha256 |
string |
Skill 包 SHA-256 摘要 |
0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef |
| SkillId |
string |
所属 Skill ID |
skill-example |
| SkillMarkdown |
string |
Skill Markdown 内容 |
# Example Skill |
| Source |
string |
Skill 版本的创建来源 |
UPLOAD |
| Status |
string |
Skill 版本状态 |
ACTIVE |
| UpdateNote |
string |
该版本的更新说明 |
Update Skill documentation |
| Version |
string |
Skill 版本号 |
1.0.0 |
| Visibility |
string |
Skill 对当前用户的可见性 |
PRIVATE |
示例
正常返回示例
JSON格式
{
"ActiveVersionId": "version-example",
"BundleHash": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
"BundleSizeBytes": 1024,
"Capabilities": {
"Delete": true,
"Download": true,
"Edit": true,
"Rollback": true,
"Share": true,
"Upload": true
},
"Category": "productivity",
"Content": {
"MySQL": "MySQL 优化指南...",
"PostgreSQL": "PostgreSQL 优化指南..."
},
"CreatedAt": "2025-06-04T02:25:43Z",
"Dbtypes": [
"MySQL"
],
"Description": "SQL审查专家:全面审核SQL的安全性、性能与规范性,识别风险并提供优化建议。用户提交SQL或询问“SQL审核”“SQL Review”“有风险吗”“如何优化”时,立即启用。",
"DisplayName": "Example Skill",
"DownloadUrl": "https://example.com/skill-package.zip",
"ExpiresAt": "2026-09-15T11:00:00Z",
"File": {
"test": "test",
"test2": 1
},
"Files": [
{
"test": "test",
"test2": 1
}
],
"Frontmatter": {
"test": "test",
"test2": 1
},
"Icon": "https://example.com/skill-icon.png",
"Id": "d1b7d639-f34e-44c7-8231-987da14d****",
"IsDeleted": true,
"Name": "sql-optimization",
"RequestId": "FE9C65D7-930F-57A5-A207-8C396329****",
"Scope": "PRIVATE",
"SkillId": "skill-example",
"SkillMarkdown": "# Example Skill",
"SkillType": "user",
"Slug": "example-skill",
"UpdatedAt": "2026-02-04T21:14:45Z",
"Version": "1.0.0",
"VersionId": "version-example",
"Versions": [
{
"ActivatedAt": "2026-09-15T10:00:00Z",
"CreatedAt": "2026-09-15T10:00:00Z",
"CredentialRequired": true,
"FileCount": 1,
"Id": "version-example",
"PackageSize": 1024,
"RevokeReason": "Replaced by a newer version",
"RevokedAt": "2026-09-15T11:00:00Z",
"Sha256": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
"SkillId": "skill-example",
"SkillMarkdown": "# Example Skill",
"Source": "UPLOAD",
"Status": "ACTIVE",
"UpdateNote": "Update Skill documentation",
"Version": "1.0.0"
}
],
"Visibility": "PRIVATE"
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | InvalidRequest | %s. | |
| 400 | InvalidWorkspaceId.Missing | WorkspaceId is required for the ContextDB management App. | 使用 ContextDB 管理应用时必须提供 WorkspaceId。请指定本次请求所属的 ContextDB 工作空间后重试。 |
| 400 | InvalidWorkspaceId.Conflict | The request contains conflicting WorkspaceId values. | 请求中提供的 WorkspaceId 相互冲突。请确保请求中各位置的工作空间标识一致后重试。 |
| 400 | InvalidWorkspaceId.Value | WorkspaceId is invalid. | WorkspaceId 无效。请检查工作空间标识,指定有效的 ContextDB WorkspaceId 后重试。 |
| 422 | UnprocessableEntity | %s. | |
| 401 | Unauthorized | %s. | |
| 413 | RequestEntityTooLarge | %s. | |
| 403 | Forbidden | %s. | |
| 404 | NotFound | %s. | |
| 404 | SkillNotFound | Skill not found. | 技能不存在。 |
| 503 | ServiceUnavailable | %s. | |
| 409 | Conflict | %s. |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。