关于 atlassian
atlassian 是用于操作 Jira 和 Confluence 的命令行 skill。它支持通过 Atlassian MCP 服务进行 OAuth 2.1 认证,也可使用 API token 直接访问 REST API。
主要功能
- 01搜索和管理 Jira 问题
- 02创建、更新 Jira 问题并转换状态
- 03搜索和管理 Confluence 页面及空间
- 04选择 OAuth 或 API token 身份验证
- 05输出机器可读的 JSON
适用场景
- 01使用 JQL 查找 Jira 问题
- 02更新问题并变更状态
- 03搜索或编辑 Confluence 文档
MCP 相关
使用 OAuth 时,它会调用 Atlassian MCP 服务的工具;使用 API token 时,则直接连接 Atlassian REST API。
安装
复制下面的命令,在终端中运行。
npx skills add https:/ / github.com/ sanjay3290/ ai-skills --skill atlassian安装后在 Claude Code 中输入/atlassian确认已加载。
包含的文件
除 SKILL.md 外,安装时一起下载的参考资料和脚本。
.env.examplerequirements.txtscripts/api_client.pyauth.pyconfluence.pyjira.pymcp_client.py详细介绍
Atlassian(Jira + Confluence)
全面集成 Jira 和 Confluence,支持两种身份验证方式:
- OAuth 2.1,通过 Atlassian MCP 服务进行身份验证——基于浏览器的授权、令牌自动刷新,并调用 MCP 工具
- API token——将电子邮件地址和令牌存储在密钥环中,并直接调用 REST API
首次设置
选项 1:通过 MCP 服务使用 OAuth 2.1(推荐)
无需 API token 或实例 URL。使用动态客户端注册和 PKCE。
pip install -r requirements.txt
python scripts/auth.py login --oauth
浏览器将打开 Atlassian 授权页面。选择要授权访问的产品(Jira、Confluence、Compass)。令牌会存储在系统密钥环中,并在过期时自动刷新。
检查状态:
python scripts/auth.py status
选项 2:API Token(备用方案)
适用于无法使用基于浏览器的 OAuth 的环境。
pip install -r requirements.txt
python scripts/auth.py login
按照提示输入 Atlassian URL、电子邮件地址和 API token。凭据会安全地存储在系统密钥环中。
在此创建 API token:https://id.atlassian.com/manage-profile/security/api-tokens
检查身份验证状态:
python scripts/auth.py status
注销(清除 OAuth 和 API token 凭据):
python scripts/auth.py logout
后端选择
脚本会根据身份验证类型自动检测要使用的后端:
- OAuth → MCP 后端(调用 Atlassian MCP 服务工具)
- API token → REST 后端(直接调用 Atlassian REST API)
无论使用哪种后端,所有命令的操作方式都相同。
Jira(scripts/jira.py)
使用 JQL 搜索问题
python scripts/jira.py search "project = DEV AND status = Open"
python scripts/jira.py search "assignee = currentUser() ORDER BY updated DESC" --limit 10
获取问题详情
python scripts/jira.py get DEV-123
创建问题
python scripts/jira.py create --project DEV --summary "Fix login bug" --type Bug
python scripts/jira.py create --project DEV --summary "New feature" --type Story \
--description "Details here" --priority High --assignee "[email protected]" --labels "backend,urgent"
更新问题
python scripts/jira.py update DEV-123 --summary "Updated summary" --priority High
python scripts/jira.py update DEV-123 --assignee "[email protected]"
转换问题状态
python scripts/jira.py transition DEV-123 "In Progress"
python scripts/jira.py transition DEV-123 "Done"
添加和列出评论
python scripts/jira.py comment DEV-123 --add "This is a comment"
python scripts/jira.py comment DEV-123 --list
列出项目和状态
python scripts/jira.py list-projects
python scripts/jira.py list-statuses DEV
测试身份验证
python scripts/jira.py auth-info
列出可用的 MCP 工具(仅限 OAuth)
python scripts/jira.py list-tools
Confluence(scripts/confluence.py)
搜索页面
python scripts/confluence.py search "deployment guide"
python scripts/confluence.py search "type=page AND space=DEV AND text~\"deployment\""
python scripts/confluence.py search "onboarding" --limit 10
阅读页面
python scripts/confluence.py read <page-id>
python scripts/confluence.py read <page-id> --json
列出空间
python scripts/confluence.py list-spaces
python scripts/confluence.py list-spaces --limit 50
获取空间详情
python scripts/confluence.py get-space <space-id>
列出空间中的页面
python scripts/confluence.py list-pages --space-id <space-id>
创建页面
python scripts/confluence.py create --title "New Page" --space-id <space-id>
python scripts/confluence.py create --title "Guide" --space-id <id> --body "<p>Content here</p>"
python scripts/confluence.py create --title "Child" --space-id <id> --parent-id <parent-id>
更新页面
python scripts/confluence.py update <page-id> --title "Updated Title"
python scripts/confluence.py update <page-id> --body "<p>New content</p>"
获取子页面
python scripts/confluence.py get-children <page-id>
测试身份验证
python scripts/confluence.py auth-info
列出可用的 MCP 工具(仅限 OAuth)
python scripts/confluence.py list-tools
操作参考
Jira
| 命令 | 说明 | 必需参数 |
|---|---|---|
| search | 使用 JQL 搜索问题 | jql |
| get | 获取问题详情 | issue_key |
| create | 创建新问题 | --project、--summary、--type |
| update | 更新现有问题 | issue_key |
| transition | 更改问题状态 | issue_key、status |
| comment | 添加或列出评论 | issue_key |
| list-projects | 列出可访问的项目 | - |
| list-statuses | 列出项目的状态 | project_key |
| auth-info | 测试 API 连接 | - |
| list-tools | 列出 MCP 工具(仅限 OAuth) | - |
Confluence
| 命令 | 说明 | 必需参数 |
|---|---|---|
| search | 使用 CQL 搜索 | query |
| read | 获取页面内容 | page_id |
| list-spaces | 列出所有空间 | - |
| get-space | 获取空间详情 | space_id |
| list-pages | 列出空间中的页面 | --space-id |
| create | 创建新页面 | --title、--space-id |
| update | 更新现有页面 | page_id |
| get-children | 获取子页面 | page_id |
| auth-info | 测试 API 连接 | - |
| list-tools | 列出 MCP 工具(仅限 OAuth) | - |
JSON 输出
在任意脚本命令中添加 --json 标志,即可输出机器可读的数据。
令牌管理
凭据通过系统密钥环安全存储:
- macOS:Keychain
- Windows:Windows Credential Locker
- Linux:Secret Service API
服务名称:atlassian-skill
OAuth 令牌会在过期时自动刷新(如果有可用的刷新令牌)。