1实现原理 · 为什么它能做到
核心是可执行脚本而非提示词编排:安装(install_gangtise.sh)、配凭证(configure_auth.sh)、诊断(diagnose.sh)三个能力入口全部由 bash/python 脚本实现,SKILL.md 只做路由与说明书。
| 1. Install Gangtise skills (minimal default, workshop alias, full, or `--only` custom) | `scripts/install_gangtise.sh` | See `references/installation_flow.md` |
安装原理:从华为云 OBS 官方桶下载 4 个 zip 包 → 解压到 /tmp 暂存 → 复制到 canonical 位置 ~/.local/share/gangtise-copilot/skills → 对每个检测到的 agent(claude-code/openclaw/codex)skills 目录建符号链接。
BASE_URL="https://gts-download.obs.myhuaweicloud.com/skills"
凭证管理原理:单共享凭证文件 + 每技能符号链接。configure_auth.sh 把 accessKey/secretAccessKey 写入 ~/.config/gangtise/authorization.json(mode 600),写 ~/.GTS_AUTHORIZATION 裸 token 供上游 CLI,并给每个已装技能的 scripts/.authorization 建指向共享文件的 symlink。
AUTH_FILE="${XDG_CONFIG_DIR}/authorization.json" RUNTIME_TOKEN_FILE="$HOME/.GTS_AUTHORIZATION"
live 验证原理:configure_auth.sh 与 diagnose.sh 都把凭证 POST 到 Gangtise OAuth 端点换 token;diagnose 再用 token 打 RAG 端点做能力层 liveness;响应经 classify_response.py 分类(不打印 token/响应体)。
AUTH_ENDPOINT="https://open.gangtise.com/application/auth/oauth/open/loginV2" RAG_ENDPOINT="https://open.gangtise.com/application/open-data/ai/search/knowledge_base"
价值层是 19-skill 能力矩阵路由:SKILL.md 内嵌『数据层 6 + 工作流层 10 + 工具层 3』的注册表,把用户的数据问题(K 线/财报/估值/研报/首席观点/观点 PK…)路由到对应上游技能与 runner。
Gangtise's 19 skills form a **two-dimensional matrix** (data tier × operation type) that is not clearly documented. Use this table to route a user question to the right skill
wrapper 架构原则:绝不 vendor 上游文件——目录内无任何 Gangtise 技能内容拷贝,每次运行从 canonical OBS URL 重新下载当前版本;修 bug 走运行时修复(references/known_issues.md)而非改上游。
**Never vendor upstream files.** This skill directory contains no copy, fork, or excerpt of any Gangtise skill content.
2核心能力
3外部依赖
| 类型 | 依赖 |
|---|---|
| network | 华为云 OBS 技能分发桶 |
| api | Gangtise OAuth loginV2(accessKey/secretAccessKey 换 Bearer token) |
| api | Gangtise RAG knowledge_base 语义检索(diagnose 能力层 liveness) |
| network | GitHub contents API(SKILL.md 回退下载法,非脚本默认路径) |
| cli | curl / unzip / python3 / git(脚本前置检查与执行工具) |
4风险提醒 风险提醒:橙色 · 评估后使用
- 供应链信任面:安装第三方 OBS 内容,无签名/hash 校验 — installer 只做 HTTP 200 + 大小检查;解压的 19 个技能含可执行脚本,直接进 agent skills 目录并被 symlink 激活。上游内容不在本仓审计范围,用户需信任 Gangtise 官方 OBS 与 HTTPS。
- 凭证以明文落盘且会随 live 验证出网 — authorization.json(600)与 ~/.GTS_AUTHORIZATION 是明文;diagnose/configure 会把密钥 POST 到 open.gangtise.com。凭证出网对象可预期(官方域),但明文 token 文件对同机其他进程可见。
- 凭证可能出现在命令行/进程参数 — configure_auth.sh 支持 --access-key/--secret-key flag 与交互输入;flag 方式会进 shell 历史/进程列表。优先用交互提示或环境变量并清理历史。
- 上游 API 契约不稳定(HTTP 200 + body code、token 已带 Bearer 前缀) — known_issues/credentials_setup 记录契约怪癖(200 恒真、accessToken 自带 'Bearer '、expiresIn 10800 等),wrapper 已适配但依赖上游不破坏性变更。
5第二遍独立确认
- [ok] OBS 桶下载端点与 bundle 数量(19 技能/4 zip) — install_gangtise.sh BASE_URL 常量 + BUNDLES 数组(4 项,共 19 技能名)与 SKILL.md bundle map 一致;curl --fail -o + wc -c 大小门槛在源码中。
- [ok] 凭证读写在三个脚本中都真实存在 — configure_auth.sh 写 ~/.config/gangtise/authorization.json(600)+ ~/.GTS_AUTHORIZATION + live auth;diagnose.sh 读 authorization.json 的 accessKey/secretAccessKey 并 POST loginV2;均逐字可查。
- [ok] live 验证按 body shape(code==000000)而非 HTTP 码 — configure_auth.sh 'if echo "$response" | grep -q '"code":"000000"'' 与 credentials_setup.md『Gangtise returns HTTP 200 for both success and failure』一致。
- [ok] 诊断只读且不打印 token — diagnose.sh 无写文件语句;classify_response.py docstring『without printing tokens or response bodies』+ 字段白名单(http_status/code/errorType/traceId);tests 断言 'secret' 不出现在分类结果。
- [ok] wrapper 不 vendor 上游 + 上游内容不在本仓 — 目录 glob 无 gangtise-* 上游技能内容(仅 scripts/references/config-template/tests);SKILL.md『no copy, fork, or excerpt of any Gangtise skill content』成立。
- [ok] 安全反例搜索:是否有漏网端点/回调/混淆 — 全目录扫描仅 OBS、open.gangtise.com(loginV2 + knowledge_base + 文档中 skills-backend/open-quote 示例)、api.github.com(SKILL.md 回退法)、status.huaweicloud.com(文档链接);无遥测/无外发到第三方。
- [ok] 功能声明 vs 实际能力 — 『One-click install 19 official skills, configure accessKey/secretAccessKey, run health diagnostics』三项分别对应 install/configure/diagnose 脚本 + SKILL 路由;最小化 preset 规避 ISSUE-007 的说明与 known_issues.md 复现证据一致。
- [ok] 元数据(commit/license/stars) — 本地 HEAD == pin d5c4678cb5d4fd6acc9c922690df035dbd33d247;GitHub API:MIT、stars 1385(2026-09-09 实采)、pushed_at 2026-09-09T12:33:29Z。
6结论
7ba5dccf4fc1c4ad…d5c4678cb5