use-company

Solid

Sets the active company context or diagnoses company routing. Two modes: (1) Set — declare which company to work with, bypassing auto-detection. (2) Diagnose — show which company a JIRA ticket or project routes to. Trigger keywords: "use company", "switch company", "切換公司", "用這間", "/use-company", "set company", "公司切換", "我要做 X 公司的", "which company", "哪間公司", "/which-company".

AI & Automation 4 stars 0 forks Updated 3 days ago MIT

Install

View on GitHub

Quality Score: 80/100

Stars 20%
23
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# /use-company — Active Company Context Switcher ## Purpose 明確設定目前對話要使用哪個 company context,避免在多公司 workspace 中反覆 auto-detect, 或因 routing 歧義導致用錯設定。 ## Workflow Shared authority: `bash scripts/resolve-company-context.sh` ### Step 1 — Resolve Target Company **If the user provides a company name:** 1. Run `bash scripts/resolve-company-context.sh --company "<name>" --format json` 2. If `status=ok` → proceed with resolved payload 3. 若 `status=error` → 直接呈現 resolver 的 fail-stop diagnostics;skill 內不得自己重寫 YAML matching **If no company name provided:** 1. Run `bash scripts/resolve-company-context.sh --format json` 2. If `status=ok` → proceed with resolved payload 3. 若 `error_code=default_company_unset` → 列出已註冊公司,請使用者選擇 4. 其他 resolver error 一律直接回報 fail-stop diagnostics;不得默默猜測 ### Step 2 — Load and Validate Company Config 1. 把 resolver output 視為 `base_dir`、`config_path`、`github.org`、`jira.projects` 的單一 authority 2. 若 resolver 回傳 `status=error`,就停止並直接回報該錯誤 3. 對非 blocking 的 `warnings[]` 才能用 warning 呈現;不得把 resolver failure 降格成 advisory prose ### Step 3 — Confirm Context 以簡短摘要回報: ``` ✓ Active company: {company_name} Base dir: {base_dir} GitHub org: {github_org} JIRA projects: {project_keys} Slack: {configured channels or "not configured"} ``` ### Step 4 — Inform Strategist 要明確告知:「在這段對話剩餘流程中,所有工作都應透過 **{company_name}** context routing。 套用 `.claude/rules/{company_name}/` 的 L2 rules,並從 `{base_dir}/workspace-config.yaml` 解析 config。」 ## Notes - 這只會設定 **目前這段對話**...

Details

Author
HsuanYuLee
Repository
HsuanYuLee/polaris
Created
4 months ago
Last Updated
3 days ago
Language
Shell
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category