Yida Login logo

Yida Login

Organization
openyida
yida-login

宜搭登录态管理。以 OpenYida auth snapshot 为准;默认 OAuth token,snapshot 返回 env 注入状态时使用运行环境注入 token。

Overview

Publisheropenyida
Repositoryopenyida
Skill nameyida-login
Stars
228
Forks
50
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by openyida on GitHub. Read the source before you install it.

Installation

Install the Yida Login AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/openyida/openyida/tree/main/yida-skills/skills/yida-login
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/openyida/openyida.git /tmp/openyida
mkdir -p .claude/skills
cp -r /tmp/openyida/yida-skills/skills/yida-login .claude/skills/yida-login
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Yida Login in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Yida Login on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Yida Login is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

yida-login

模式

  • Codex、yida-agent 等宿主都使用同一套 OpenYida auth snapshot 规则。
  • 不要根据 agent 名称、宿主产品、workspace 路径或猜测的环境变量推断认证模式。
  • 先读 openyida agent-capabilities --summary-json;只有需要更多信息时,才降级执行 openyida login --check-only --json。
  • snapshot 返回 login.auth_source=env 或 failure_reason=env_token_missing 时,进入运行环境注入 token 模式。凭证只来自运行环境注入的 OPENYIDA_ACCESS_TOKEN、OPENYIDA_REFRESH_TOKEN 等环境变量。
  • 其他 auth_mode=token 场景使用默认 OAuth token session。
  • 不要从 .cache/cookies*.json 推断登录态。
  • 浏览器归属以 builder_path.interactive_login.mode 为准:not_required 不触发 OAuth;cli_auto_open 执行 openyida login 并等待;caller_open_url 执行 openyida login --no-browser,由 Agent 优先调用沙箱浏览器 / 内置 Browser 打开 CLI 输出的授权 URL 一次;unsupported 停止并说明没有可用浏览器能力,不要默认安装 Playwright。
  • caller_open_url 模式下,Agent 不要只把 URL 贴给用户然后等待。只有当前宿主没有浏览器工具,或浏览器工具调用失败时,才退回让用户手动打开 URL。

前置检查

先执行:

bash
openyida agent-capabilities --summary-json

必要时降级:

bash
openyida env --json
openyida login --check-only --json

判断表

状态动作
auth_mode=token 且 status=ok 或 can_auto_use=true继续执行业务命令
status=profile_required 且返回 candidates / next_step不猜组织;先执行 openyida auth profiles,再用 openyida auth profile switch <auth_profile> 切到用户确认或目标匹配的已有 profile
auth_source=env / failure_reason=env_token_missing进入运行环境注入 token 模式;缺 token 时停止,让 Codex、yida-agent 等宿主注入 OPENYIDA_ACCESS_TOKEN 或 OPENYIDA_REFRESH_TOKEN;不要执行 OAuth
auth_mode=token,未登录,且 interactive_login.mode=cli_auto_open只执行一次 openyida login,等待该命令结束,并使用其最终 JSON 判断结果
auth_mode=token,未登录,且 interactive_login.mode=caller_open_url只执行一次 openyida login --no-browser,由 Agent 优先调用沙箱浏览器 / 内置 Browser 打开输出 URL 一次,并等待原命令结束;无浏览器工具或调用失败时才让用户手动打开
auth_mode=token,未登录,且 interactive_login.mode=unsupported停止并向用户说明当前运行环境没有桌面浏览器或 Agent 浏览器能力

Token 模式命令

只有 auth snapshot 未返回 env 注入模式时,才使用 OAuth 登录。

bash
openyida login
openyida login --check-only --json
openyida auth status
openyida auth profiles
openyida auth profile switch <auth_profile>
openyida auth refresh
openyida auth logout

生成新命令统一使用 openyida auth profiles --json。CLI 同时兼容旧写法 openyida auth profile list --json,两者都只查询,不切换组织或登录态。

Profile 选择原则

  • 当前已有多个 profile 且 snapshot 返回 profile_required 时,不要根据目录、组织名片段或最近操作猜测组织。
  • 先执行 openyida auth profiles 查看 corp_name、corp_id、user_id、auth_profile、last_used_at 和 auth_store。
  • 目标 profile 已存在时,执行 openyida auth profile switch <auth_profile>;这是非破坏性切换,只更新当前项目 pointer。
  • 目标 profile 不存在时,再执行 openyida login 新增登录态;登录完成后重新执行 openyida auth profiles 并切到新增 profile。
  • 运行环境注入 token 模式下,不要切换或删除本地 profile,让宿主注入目标组织的 token。

Agent OAuth 登录编排

interactive_login.mode=cli_auto_open 的默认流程:

  1. 只执行一次 openyida login,并持续等待同一个命令。
  2. CLI 默认自动打开系统浏览器;Agent 禁止提取授权 URL 后再次打开。
  3. 用户授权可能需要较长时间,登录进程默认可等待约 5 分钟。
  4. 只有原命令成功退出,且最终 JSON 返回 ok=true 与 can_auto_use=true,才能判定登录成功。
  5. 用户未授权就关闭浏览器时,CLI 无法可靠感知窗口关闭。继续等待原命令,直到用户停止或命令超时;不要自动发起第二次登录。

interactive_login.mode=caller_open_url 或调用方必须接管浏览器时,显式关闭 CLI 自动打开:

bash
openyida login --no-browser
# 兼容写法:
OPENYIDA_NO_BROWSER=1 openyida login

只有这种模式下,Agent 才能打开输出的授权 URL,并且只能打开一次。若当前宿主提供沙箱浏览器 / 内置 Browser,必须优先调用该工具打开 URL,不要把 URL 只作为聊天文本交给用户;无浏览器工具或工具失败时才提示用户手动打开。--quiet 只控制文本输出,不决定浏览器归属。

openyida login --check-only --json 仅用于恢复或防御性验证。不要把固定 sleep 或重复执行 check-only 当作默认完成机制。

用户给出宜搭入口 URL 时,原样传入:

bash
openyida login https://yida-group.alibaba-inc.com/
openyida login --alibaba
openyida login --intl

海外 / international / global / Japan / Global YiDA 使用 --intl 或等价入口。

运行环境注入 Token 模式命令

只有 auth snapshot 返回 auth_source=env 或 failure_reason=env_token_missing 后,才进入本模式。

bash
openyida agent-capabilities --summary-json
openyida env --json
openyida login --check-only --json
openyida auth status
openyida auth refresh

可继续执行的结果:

json
{
  "auth_mode": "token",
  "auth_source": "env",
  "status": "ok",
  "can_auto_use": true
}

如果运行环境没有注入 token,auth snapshot 会返回 failure_reason=env_token_missing;停止任务,让 Codex、yida-agent 等宿主补齐 token 注入,不要触发 OAuth。

禁止

  • 不要硬编码或打印 access_token、refresh_token、Cookie 或 CSRF。
  • 不要手动读写 .env、token 文件或 Cookie 文件。
  • 运行环境注入 token 模式下,不要再执行 openyida login 触发 OAuth。
  • 运行环境注入 token 模式下,缺 token 时让 Codex、yida-agent 等宿主修复注入,不要查找本地 .cache/cookies*.json。
  • 不要在业务命令里手动传 Cookie、_csrf_token 或 Bearer token。
  • 默认模式下,不要后台执行 openyida login、提取 URL 后再次执行 open。
  • 不要固定 sleep 后再检查登录态。
  • 不要仅凭浏览器关闭或 OAuth 回调到达就判定最终登录成功。

完成条件

  • Login/auth snapshot 返回可用登录态;或
  • 运行环境注入 token 模式返回明确停止原因,交由宿主修复。

Frequently asked questions

What does the Yida Login AI skill do?

宜搭登录态管理。以 OpenYida auth snapshot 为准;默认 OAuth token,snapshot 返回 env 注入状态时使用运行环境注入 token。

Why use Yida Login on TypingMind?

Because you install it once and use it with any model. Yida Login is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Yida Login in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/openyida/openyida/tree/main/yida-skills/skills/yida-login. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Yida Login?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Yida Login?

As many as you like. As long as a model supports skills, you can use Yida Login with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Yida Login AI skill free?

Yes. It is published on GitHub by openyida under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇