用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/majiayu000/claude-skill-registry --skill connection-schema-design命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
LLM token logprobs and calibration. Per-decision confidence, ECE, Brier, reliability diagrams, low-confidence triage.
Analyze LLM token logprobs and calibration. Use for per-decision confidence, ECE, Brier scores, reliability diagrams, and low-confidence triage.
回顾最近 N 天的 Claude Code 使用记录——扫描原始会话数据,按主题分组汇总"我都做了什么",并从个人操作系统视角输出模式、风险与增删建议。当用户说 /recap、"看看我这几天做了什么"、"回顾一下我最近的会话"、"这两天我用 claude 干了啥"、"活动回顾" 时使用。
基于 SOC 职业分类
正在显示 SKILL.md
| name | connection-schema-design |
| description | Connection profile and state schema design rules and core profile selection |
Rules for designing connectionProfile.yml and connectionState.yml schemas
NEVER create custom profiles from scratch - ALWAYS extend core profiles
# ❌ WRONG - Custom profile
type: object
properties:
apiKey:
type: string
# ✅ CORRECT - Extend core profile
$ref: './node_modules/@zerobias-org/types-core/schema/tokenProfile.yml'
🚨 MANDATORY: connectionState.yml MUST extend baseConnectionState.yml for expiresIn
# ✅ CORRECT - Extends base with expiresIn
allOf:
- $ref: './node_modules/@zerobias-org/types-core/schema/baseConnectionState.yml'
- type: object
properties:
accessToken:
type: string
# ❌ WRONG - Missing baseConnectionState
type: object
properties:
accessToken:
type: string
# Missing expiresIn!
WHY: Server uses expiresIn to schedule automatic token refresh cronjobs
# ✅ CORRECT
expiresIn:
type: integer
description: Token expiry time in SECONDS from now
# ❌ WRONG
expiresAt:
type: string # Don't use expiresAt, convert to expiresIn
Calculation: expiresIn = Math.floor((expiresAt - now) / 1000)
| Profile | When to Use | Contains |
|---|---|---|
| tokenProfile.yml | API Key, Bearer Token, PAT | token |
| oauthClientProfile.yml | OAuth2 Client Credentials | clientId, clientSecret |
| oauthTokenProfile.yml | OAuth2 with Refresh | clientId, clientSecret |
| basicConnection.yml | Username/Password, Email/Password | username, password |
Path: ./node_modules/@zerobias-org/types-core/schema/{profileName}.yml
@credential-manager provides authMethodType:
IF authMethodType == "bearer-token" OR "api-key"
→ EXTEND tokenProfile.yml
IF authMethodType == "oauth2-client-credentials"
→ EXTEND oauthClientProfile.yml
IF authMethodType == "oauth2-authorization-code"
→ EXTEND oauthTokenProfile.yml
IF authMethodType == "basic-auth"
→ EXTEND basicConnection.yml
| State | When to Use | Contains |
|---|---|---|
| tokenConnectionState.yml | Simple token auth | accessToken + expiresIn |
| oauthTokenState.yml | OAuth with refresh | accessToken + refreshToken + expiresIn |
IF requiresRefresh == false
→ EXTEND tokenConnectionState.yml
IF requiresRefresh == true
→ EXTEND oauthTokenState.yml
# connectionProfile.yml
$ref: './node_modules/@zerobias-org/types-core/schema/tokenProfile.yml'
# connectionState.yml
$ref: './node_modules/@zerobias-org/types-core/schema/tokenConnectionState.yml'
# connectionProfile.yml
$ref: './node_modules/@zerobias-org/types-core/schema/oauthClientProfile.yml'
# connectionState.yml (no refresh)
$ref: './node_modules/@zerobias-org/types-core/schema/tokenConnectionState.yml'
# connectionProfile.yml
$ref: './node_modules/@zerobias-org/types-core/schema/oauthTokenProfile.yml'
# connectionState.yml
$ref: './node_modules/@zerobias-org/types-core/schema/oauthTokenState.yml'
# connectionProfile.yml - Add organizationId
allOf:
- $ref: './node_modules/@zerobias-org/types-core/schema/tokenProfile.yml'
- type: object
required: [organizationId]
properties:
organizationId:
type: string
description: Organization identifier for API access
# connectionState.yml - Add extra state
allOf:
- $ref: './node_modules/@zerobias-org/types-core/schema/tokenConnectionState.yml'
- type: object
properties:
organizationName:
type: string
description: Cached organization name
ONLY connection parameters - minimal set needed to CONNECT
# ✅ GOOD - Connection parameters
- token / apiKey / clientId / clientSecret
- baseUrl (if API has multiple environments)
- organizationId (if required to authenticate)
# ❌ BAD - Operation parameters
- limit (pagination parameter)
- projectId (operation scope, not connection scope)
- fields (query parameter)
Rule: If you can connect WITHOUT it, it's an operation parameter (not profile)
Always review API docs for environment-specific optional parameters:
# Example: Service has optional region parameter
allOf:
- $ref: './node_modules/@zerobias-org/types-core/schema/tokenProfile.yml'
- type: object
properties:
region:
type: string
description: Optional region for multi-region deployments
enum: [us-east-1, eu-west-1, ap-southeast-1]
# region is optional, but include it if API docs mention it
Don't omit parameters that some environments might need!
Before adding ANY property, check what the parent schema provides:
# Check what tokenProfile.yml provides
cat node_modules/@zerobias-org/types-core/schema/tokenProfile.yml
# Check what basicConnection.yml provides
cat node_modules/@zerobias-org/types-core/schema/basicConnection.yml
# Check what baseConnectionState.yml provides
cat node_modules/@zerobias-org/types-core/schema/baseConnectionState.yml
# ❌ WRONG - basicConnection already has uri
allOf:
- $ref: './node_modules/@zerobias-org/types-core/schema/basicConnection.yml'
- type: object
properties:
url: # Duplicate! basicConnection has uri
type: string
# ✅ CORRECT - Use parent's uri, or extend if truly different
allOf:
- $ref: './node_modules/@zerobias-org/types-core/schema/basicConnection.yml'
# uri is already provided by basicConnection
Semantic duplicates to avoid:
Before finalizing connectionProfile, check product docs for ALL auth parameters:
# Example: Missing mfaCode from product docs
allOf:
- $ref: './node_modules/@zerobias-org/types-core/schema/basicConnection.yml'
- type: object
properties:
mfaCode: # Found in product docs!
type: string
description: Multi-factor authentication code (optional)
Don't assume - verify:
NEVER add organization/project/workspace IDs to connection:
# ❌ WRONG - Limits connection to single organization
connectionState:
allOf:
- $ref: './node_modules/@zerobias-org/types-core/schema/baseConnectionState.yml'
- type: object
properties:
accessToken:
type: string
organizationId: # NO! Limits scope
type: string
# ✅ CORRECT - Connection works across all organizations
connectionState:
allOf:
- $ref: './node_modules/@zerobias-org/types-core/schema/baseConnectionState.yml'
- type: object
properties:
accessToken:
type: string
# organizationId is operation parameter, NOT connection parameter
WHY: Connection should be reusable across all scopes. Use operation parameters for scope.
Scope identifiers belong in operation parameters, NOT connection:
For connectionState - don't add fields "just in case" - only add what's actually USED:
# ❌ WRONG - identityId not used anywhere
connectionState:
properties:
accessToken: string
identityId: string # Where is this used? Nowhere!
# ✅ CORRECT - Only fields that are actually used
connectionState:
properties:
accessToken: string
# If connect() doesn't return identityId, don't add it
Ask:
For connectionProfile - include environment-optional fields:
# ✅ CORRECT - Include optional fields that some environments need
allOf:
- $ref: './node_modules/@zerobias-org/types-core/schema/tokenProfile.yml'
- type: object
properties:
region:
type: string
description: Optional region (needed in some deployments)
mfaCode:
type: string
description: Multi-factor authentication code (optional)
# These aren't required, but include them if product docs mention them
connectionProfile vs connectionState:
Before finalizing connection schemas:
# DON'T DO THIS
type: object
properties:
apiKey: string
baseUrl: string
Fix: Extend tokenProfile.yml
# DON'T DO THIS
type: object
properties:
accessToken: string
Fix: Extend baseConnectionState or tokenConnectionState
# DON'T DO THIS
expiresAt:
type: string
format: date-time
Fix: Convert to expiresIn (seconds) in connect() method
# DON'T DO THIS
properties:
accessToken: string
refreshToken: string
# Missing expiresIn!
Fix: MUST extend baseConnectionState for expiresIn
Connection schemas are YAML schemas - design them like api.yml schemas!