yao-workspace-config
它能做什么
这项技能管理工作区的 Git 设置,例如你的用户名、邮箱和访问令牌。适合希望工作区无需手动设置即可与 Git 托管服务协作的开发者。
适用场景
- ✓当工作区需要设置你的 Git 用户名和邮箱时。
- ✓当你想为某个 Git 托管服务保存个人访问令牌时。
- ✓当你需要导入 SSH 密钥,以便工作区能够连接 Git 时。
技能链接
https://github.com/YaoApp/yao/blob/main/tools/skills/yao-workspace-config/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请设置我的 Git 用户名,并把我的 GitHub 访问令牌添加到这个工作区。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会读取或设置工作区的 Git 配置,为某个托管服务保存访问令牌,并可以导入 SSH 密钥。列出凭证时不会显示已保存的令牌。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Workspace Git Config Tools
Manage workspace-level Git configuration, HTTPS credentials, and SSH keys.
workspace_git_config
Get or set workspace-level Git configuration values.
# Get all config
tai tool workspace_git_config '{"workspace_id":"ws-xxx","action":"get"}'
# Get specific key
tai tool workspace_git_config '{"workspace_id":"ws-xxx","action":"get","key":"user.name"}'
# Set config
tai tool workspace_git_config '{"workspace_id":"ws-xxx","action":"set","key":"user.name","value":"John"}'
| Parameter | Type | Required | Description |
|---|---|---|---|
| workspace_id | string | yes | Workspace ID |
| action | string | yes | get or set |
| key | string | no | Config key (e.g. user.name). Empty returns all. |
| value | string | for set | Config value |
workspace_git_credential
Manage HTTPS Git credentials (personal access tokens).
# Set credential
tai tool workspace_git_credential '{"workspace_id":"ws-xxx","action":"set","host":"github.com","token":"ghp_xxx"}'
# List credentials (tokens are not exposed)
tai tool workspace_git_credential '{"workspace_id":"ws-xxx","action":"list"}'
# Delete credential
tai tool workspace_git_credential '{"workspace_id":"ws-xxx","action":"delete","host":"github.com"}'
| Parameter | Type | Required | Description |
|---|---|---|---|
| workspace_id | string | yes | Workspace ID |
| action | string | yes | set, list, or delete |
| host | string | for set/delete | Git host (e.g. github.com) |
| username | string | no | Username (defaults to x-access-token) |
| token | string | for set | Access token |
workspace_ssh_key
Manage SSH keys for Git authentication.
# Import SSH key
tai tool workspace_ssh_key '{"workspace_id":"ws-xxx","action":"import","name":"github","private_key":"-----BEGIN...","host":"github.com"}'
# List SSH keys (private keys not exposed)
tai tool workspace_ssh_key '{"workspace_id":"ws-xxx","action":"list"}'
# Delete SSH key
tai tool workspace_ssh_key '{"workspace_id":"ws-xxx","action":"delete","name":"github"}'
| Parameter | Type | Required | Description |
|---|---|---|---|
| workspace_id | string | yes | Workspace ID |
| action | string | yes | import, list, or delete |
| name | string | for import/delete | Key name |
| private_key | string | for import | PEM-encoded private key |
| public_key | string | no | Public key (derived from private_key if omitted) |
| host | string | no | Git host to associate (e.g. github.com) |
常见问题
我的令牌会被显示给我吗?
不会。列出凭证时不会暴露令牌。
它能删除已保存的令牌吗?
可以。可以为指定的托管服务删除某个凭证。
我需要 SSH 密钥吗?
不一定。你可以改用 HTTPS 令牌,或者如果你愿意,也可以导入 SSH 密钥。
详情
作者的原始描述
Workspace Git identity and credential management. ALWAYS invoke this skill when the user asks about configuring Git user info, adding HTTPS tokens, importing SSH keys, or managing workspace-level Git authentication.
repo: YaoApp/yao
热度
- GitHub 星标
- 8.3k
- 排名
- #12481
- 许可证
- —
- 更新时间
- 2026/10/19
评论
- …