Community生產力與協作github.com

olonok69/cursor_code_ml_engineer

唯讀存取 Atlassian Jira 與 Confluence:讀取問題、連結、評論、匯出 XML,並比對本機檔案與 Confluence 頁面內容。

cursor_code_ml_engineer 是什麼?

此技能提供一個基於 Python 的命令列工具 `atl.py`,可透過 Atlassian REST API 以唯讀方式存取 Jira 與 Confluence。開發者或 AI 代理可藉此即時獲取問題的狀態、指派者、連結與最近評論,也可搜尋 Jira 問題或 Confluence 頁面、匯出問題的 XML 到指定的資料夾結構(data/changes/<ticket-lowercase>/<TICKET>.xml)。此外,它還支援將本機 Markdown 或 HTML 檔案與 Confluence 頁面進行差異比對(diff)。該工具僅使用 Python 3.10+ 標準函式庫(無需 pip 安裝),可於 macOS、Linux、WSL 或 Windows 上執行。設定僅需建立一個環境檔案(jira.env)存放基本 URL、電子郵件與 API token,並強制限制寫入權限(chmod 600)。本技能嚴格遵守唯讀原則:所有 Jia 與 Confluence 的修改(如建立、編輯、留言、更新頁面)皆須由使用者手動處理,AI 僅輔助起草文字或提供差異摘要,並提醒切勿將 token 或環境檔案內容暴露於對話或版本控制中。

相容平台~Claude Code~Codex CLI✓Cursor
npx skills add https://github.com/olonok69/cursor_code_ml_engineer/tree/HEAD/docs/ai-agents-code-methodology/cursor/skills/atlassian

Installed? Explore more 生產力與協作 skills: steipete/gemini, steipete/gh-issues, steipete/skill-creator · View all 6 →

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

atlassian:唯讀 Jira + Confluence

使用時機

  • 使用者提到一個票號(PROJ-123)且你需要其即時狀態、指派者、連結或最近評論。
  • 新的票券資料夾需要其 XML:data/changes/<票券小寫>/<TICKET>.xml。
  • 在編輯一份也存在於 Confluence 的文件之前:先比對差異。

工具

位於專案儲存庫中的 data/changes/tools/atlassian/atl.py(課程副本:ejemplos/metodologia/tools/atlassian/)。 需要 Python 3.10+,僅使用標準函式庫(無需 pip 安裝)。從儲存庫根目錄執行。在 macOS、Linux 或 WSL 上使用 python3;在 Windows 上使用 py 或 python。

python3 data/changes/tools/atlassian/atl.py jira issue PROJ-123          # 類型、狀態、摘要、指派者、連結
python3 data/changes/tools/atlassian/atl.py jira search 'project = PROJ AND assignee = currentUser() AND statusCategory != Done'
python3 data/changes/tools/atlassian/atl.py jira links PROJ-123
python3 data/changes/tools/atlassian/atl.py jira comments PROJ-123 --last 3
python3 data/changes/tools/atlassian/atl.py jira xml PROJ-123 --out data/changes/proj-123/
python3 data/changes/tools/atlassian/atl.py confluence search 'title ~ "authoring" AND type = page'
python3 data/changes/tools/atlassian/atl.py confluence page <PAGE_ID> --body
python3 data/changes/tools/atlassian/atl.py confluence diff <local .md/.html> <PAGE_ID>

結束代碼:

代碼意義
0成功
2憑證遺失或無效(請參閱設定)
3HTTP 錯誤
4找不到

--json 回傳原始 JSON。僅在腳本內使用;在對話中使用預設的緊湊格式以節省上下文。

設定(每台機器僅需執行一次,由操作者進行)

建立 ~/.config/<org>/jira.env(Windows:%USERPROFILE%\.config\<org>\jira.env;ATLASSIAN_ENV_FILE 可覆蓋路徑),內容包含三行:

JIRA_BASE_URL=https://<your-site>.atlassian.net
JIRA_EMAIL=<你的 Atlassian 登入信箱>
JIRA_API_TOKEN=<來自 id.atlassian.com → Security → API tokens 的 token>

將權限限制為僅供你的使用者使用(在 macOS/Linux 上使用 chmod 600)。請在你的終端機中撰寫此檔案——絕不要將 token 貼到對話或 data/ 下的檔案中。同一個 token 也可讀取 Confluence。使用 … atl.py jira issue PROJ-123 驗證:回傳代碼 0 表示正常運作,代碼 2 表示檔案遺失或內容錯誤。

嚴格規則

  1. 唯讀。 atl.py 僅發送 GET 請求(一個網路函式;測試會確認這點)。
    • 建立、編輯、轉移或對 Jira 問題留言是使用者的工作。AI 可以起草文字,然後由使用者發佈。
    • 更新現有的 Confluence 頁面請使用 confluence_write.py:pull → plan(備份 + 可見文字差異 + 確認 token)→ 使用者閱讀差異並確認該頁面 → apply --confirm <token>。僅在使用者明確要求更新該頁面時才執行。如果 token、內容檔案或即時頁面版本在 plan 之後發生變更,Apply 會拒絕執行,並重新讀取頁面。
  2. 絕不列印、貼上或紀錄 token,也不得洩漏 jira.env 的內容。
  3. 使用票號引用問題。 對外文字應引用 case 標籤與票號,絕不使用本機檔案路徑。

Individual skills in this repo

This repo contains 4 individual skills — each has its own dedicated page.

相關技能