gangtise-copilot
Gangtise (岗底斯投研) OpenAPI skill suite installer and diagnostic tool. One-click install 19 official skills (data, research, utility), configure accessKey/secretAccessKey, run health diagnostics. Trigger when user mentions Gangtise, 岗底斯, any gangtise-* skill, credential setup, or reports errors like 'token is invalid' / '接口地址错误'.
1How It Works & Mechanism
Core architecture relies on executable scripts rather than prompt engineering: All three capability entry points—installation (install_gangtise.sh), credential configuration (configure_auth.sh), and diagnostics (diagnose.sh)—are implemented entirely via bash/python scripts, while SKILL.md serves solely as a routing guide and documentation manual.
| 1. Install Gangtise skills (minimal default, workshop alias, full, or `--only` custom) | `scripts/install_gangtise.sh` | See `references/installation_flow.md` |
Installation mechanism: Downloads 4 zip archives from the official Huawei Cloud OBS bucket → unzips them to a temporary /tmp staging area → copies them to the canonical path ~/.local/share/gangtise-copilot/skills → creates symlinks in the skills directories of all detected agents (claude-code/openclaw/codex).
BASE_URL="https://gts-download.obs.myhuaweicloud.com/skills"
Credential management mechanism: Single shared credential file + per-skill symlinks. configure_auth.sh writes accessKey/secretAccessKey to ~/.config/gangtise/authorization.json (mode 600), writes a bare token to ~/.GTS_AUTHORIZATION for upstream CLIs, and creates symlinks pointing to the shared file in the scripts/.authorization directory of each installed skill.
AUTH_FILE="${XDG_CONFIG_DIR}/authorization.json" RUNTIME_TOKEN_FILE="$HOME/.GTS_AUTHORIZATION"
Live verification mechanism: Both configure_auth.sh and diagnose.sh POST credentials to the Gangtise OAuth endpoint to exchange for a token; diagnose.sh then queries the RAG endpoint using this token to test capability-layer liveness; responses are parsed via classify_response.py without echoing tokens or full response bodies.
AUTH_ENDPOINT="https://open.gangtise.com/application/auth/oauth/open/loginV2" RAG_ENDPOINT="https://open.gangtise.com/application/open-data/ai/search/knowledge_base"
Value layer lies in the 19-skill capability matrix routing: SKILL.md embeds a comprehensive registry categorizing skills into 'Data Layer (6) + Workflow Layer (10) + Tool Layer (3)', routing user data queries (K-line/financial reports/valuation/research reports/chief analyst views/thesis comparison, etc.) to the appropriate upstream skill and 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 architecture principle: Never vendor upstream files—the repository contains no local copies of Gangtise skill code; every run fetches the current version fresh from the canonical OBS URL; bug fixes are applied via runtime remediation (references/known_issues.md) rather than upstream modification.
**Never vendor upstream files.** This skill directory contains no copy, fork, or excerpt of any Gangtise skill content.
2Core Capabilities
3External Dependencies
| 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(脚本前置检查与执行工具) |
4Recommended Governance & Evidence
- scripts/: Local script and command execution: scripts/install_gangtise.sh (bash: download + extract + install + symlink)
- 网络端点: Declared external network access: curl download from https://gts-download.obs.myhuaweicloud.com/skills/<bundle>.zip (4 bundles)
- 本地工作目录: File read/write and artifact output: ~/.config/gangtise/authorization.json (mode 600)
5Second-Pass Verification
- [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。
6Verdict & Scenarios
7ba5dccf4fc1c4ad…