Yida logout

From openyida/openyida · View interactive version

Yida logout is an AI agent skill from the GitHub repository openyida/openyida. 退出宜搭登录或解绑当前项目登录态。默认只解绑当前项目 profile pointer;显式传 --profile 或 --all 才删除共享登录 profile。

How to use this skill

Skill file

退出登录

严格禁止 (NEVER DO)

严格要求 (MUST DO)

适用场景

| 用户意图 | 触发条件 |

|---------|---------|

| 解绑当前项目 | "退出登录"、当前项目绑定了错误 profile |

| 切换账号 | "切换账号"、"换个账号登录",且已有目标 profile 可切换 |

| 切换组织 | "切换组织"、当前 token 绑定了错误组织,且已有目标 profile 可切换 |

| 重置登录态 | refresh token 缺失、过期或服务端拒绝刷新 |

| 删除共享 profile | 用户明确要求删除某个 profile 或清空全部本地共享登录态 |

触发条件

正向触发:

不适用场景(不要触发):


命令

openyida logout
openyida auth profiles
openyida auth profile switch <auth_profile>
openyida auth logout --profile <auth_profile>
openyida auth logout --all

openyida logout / openyida auth logout 默认只解绑当前项目的 profile pointer,并清当前项目 legacy token;不会删除用户级共享 profile。

适用场景:解绑当前项目、切换到已有 profile、显式删除共享 profile、refresh token 失效无法自动刷新。

异常处理

| 异常场景 | 处理方式 |

|---------|----------|

| logout 后仍需继续操作 | 执行 openyida auth profiles,优先 openyida auth profile switch <auth_profile> |

| 目标 profile 不存在 | 执行 openyida login 新增登录态,再切到新增 profile |

| 手动删除了 auth-token 文件 | 执行 openyida auth status 检查状态,不要继续手动删 profile |

| logout 后立即执行需要登录的命令 | 先确认 openyida auth status 返回可用登录态 |

Agent 错误处理策略

当 Agent 执行本技能遇到错误时,必须遵循以下默认行为:

| 错误类型 | 默认处理策略 |

|---------|-------------|

| 命令执行失败 | 停止执行,向用户展示错误信息,询问是否重试 |

| auth-token 文件不存在 | 无需处理;默认 logout 仍会尝试解绑 project pointer |

| 文件权限不足 | 提示用户检查 .cache/ 目录权限 |

| logout 后需要继续操作 | 提示用户先 openyida auth profiles 并切换已有 profile;目标不存在时再 openyida login |

| 未知错误 | 停止执行,完整展示错误信息,建议用户反馈问题 |

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.