79 lines
2.6 KiB
Markdown
79 lines
2.6 KiB
Markdown
---
|
|
name: atlassian
|
|
description: Interact with Atlassian Cloud Jira and Confluence through a portable task-oriented CLI for search, issue/page edits, comments, transitions, and bounded raw requests.
|
|
---
|
|
|
|
# Atlassian (OpenCode)
|
|
|
|
Portable Atlassian workflows for OpenCode using a shared TypeScript CLI.
|
|
|
|
## Requirements
|
|
|
|
- Node.js 20+
|
|
- `pnpm`
|
|
- Atlassian Cloud account access
|
|
- `ATLASSIAN_BASE_URL`
|
|
- `ATLASSIAN_EMAIL`
|
|
- `ATLASSIAN_API_TOKEN`
|
|
|
|
## First-Time Setup
|
|
|
|
```bash
|
|
mkdir -p ~/.config/opencode/skills/atlassian
|
|
cp -R skills/atlassian/opencode/* ~/.config/opencode/skills/atlassian/
|
|
cd ~/.config/opencode/skills/atlassian/scripts
|
|
pnpm install
|
|
```
|
|
|
|
## Prerequisite Check (MANDATORY)
|
|
|
|
```bash
|
|
cd ~/.config/opencode/skills/atlassian/scripts
|
|
node -e "require.resolve('commander');require.resolve('dotenv');console.log('OK: runtime dependencies installed')"
|
|
test -n \"$ATLASSIAN_BASE_URL\"
|
|
test -n \"$ATLASSIAN_EMAIL\"
|
|
test -n \"$ATLASSIAN_API_TOKEN\"
|
|
pnpm atlassian health
|
|
```
|
|
|
|
If any check fails, stop and return:
|
|
|
|
`Missing dependency/config: atlassian requires installed CLI dependencies and valid Atlassian Cloud credentials. Run setup and configure ATLASSIAN_* env vars, then retry.`
|
|
|
|
## Supported Commands
|
|
|
|
- `pnpm atlassian health`
|
|
- `pnpm atlassian jira-search --jql "..."`
|
|
- `pnpm atlassian jira-get --issue ABC-123`
|
|
- `pnpm atlassian jira-create ... [--dry-run]`
|
|
- `pnpm atlassian jira-update ... [--dry-run]`
|
|
- `pnpm atlassian jira-comment ... [--dry-run]`
|
|
- `pnpm atlassian jira-transitions --issue ABC-123`
|
|
- `pnpm atlassian jira-transition ... [--dry-run]`
|
|
- `pnpm atlassian conf-search --query "..."`
|
|
- `pnpm atlassian conf-get --page 12345`
|
|
- `pnpm atlassian conf-create ... [--dry-run]`
|
|
- `pnpm atlassian conf-update ... [--dry-run]`
|
|
- `pnpm atlassian conf-comment ... [--dry-run]`
|
|
- `pnpm atlassian conf-children --page 12345`
|
|
- `pnpm atlassian raw --product jira|confluence --method GET|POST|PUT --path ...`
|
|
|
|
## Usage Examples
|
|
|
|
- `pnpm atlassian jira-transition --issue ENG-123 --transition 31 --dry-run`
|
|
- `pnpm atlassian conf-create --space OPS --title "Runbook" --body-file page.storage.html --dry-run`
|
|
- `pnpm atlassian raw --product jira --method GET --path "/rest/api/3/issue/ENG-123"`
|
|
|
|
## Safety Rules
|
|
|
|
- Prefer JSON output for machine consumption.
|
|
- Use `--dry-run` on writes unless the user explicitly asks to commit the remote mutation.
|
|
- Restrict `--body-file` to project files.
|
|
- Use `raw` only for unsupported edge cases.
|
|
- `DELETE` is intentionally unsupported in raw mode.
|
|
|
|
## Notes
|
|
|
|
- Atlassian Cloud is first-class in v1; Data Center support is future work.
|
|
- The CLI contract is shared across all agent variants so the same usage pattern works everywhere.
|