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外部依赖
| Kind | Dependency / Endpoint |
|---|---|
| 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管控建议与判定依据
- scripts/: 执行本地脚本或命令: scripts/install_gangtise.sh(bash,下载+解压+安装+symlink)
- 网络端点: 声明外部网络访问: curl 下载 https://gts-download.obs.myhuaweicloud.com/skills/<bundle>.zip(4 个包
- 本地工作目录: 文件读写与工件输出: ~/.config/gangtise/authorization.json(mode 600)
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…