94 lines
3.3 KiB
Markdown
94 lines
3.3 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 (Cursor Agent CLI)
|
|
|
|
Portable Atlassian workflows for Cursor Agent CLI using a shared TypeScript CLI.
|
|
|
|
## Requirements
|
|
|
|
- Cursor Agent CLI skill discovery via `.cursor/skills/` or `~/.cursor/skills/`
|
|
- Node.js 20+
|
|
- `pnpm`
|
|
- Atlassian Cloud account access
|
|
- `ATLASSIAN_BASE_URL`
|
|
- `ATLASSIAN_EMAIL`
|
|
- `ATLASSIAN_API_TOKEN`
|
|
|
|
The `ATLASSIAN_*` values may come from the shell environment or a `.env` file in the installed `scripts/` folder.
|
|
|
|
## First-Time Setup
|
|
|
|
Repo-local install:
|
|
|
|
```bash
|
|
mkdir -p .cursor/skills/atlassian
|
|
cp -R skills/atlassian/cursor/* .cursor/skills/atlassian/
|
|
cd .cursor/skills/atlassian/scripts
|
|
pnpm install
|
|
```
|
|
|
|
Global install:
|
|
|
|
```bash
|
|
mkdir -p ~/.cursor/skills/atlassian
|
|
cp -R skills/atlassian/cursor/* ~/.cursor/skills/atlassian/
|
|
cd ~/.cursor/skills/atlassian/scripts
|
|
pnpm install
|
|
```
|
|
|
|
## Prerequisite Check (MANDATORY)
|
|
|
|
Repo-local form:
|
|
|
|
```bash
|
|
cursor-agent --version
|
|
cd .cursor/skills/atlassian/scripts
|
|
node -e "require.resolve('commander');require.resolve('dotenv');console.log('OK: runtime dependencies installed')"
|
|
node -e 'require("dotenv").config({ path: ".env" }); const required = ["ATLASSIAN_BASE_URL", "ATLASSIAN_EMAIL", "ATLASSIAN_API_TOKEN"]; const missing = required.filter((key) => !(process.env[key] || "").trim()); if (missing.length) { console.error("Missing required Atlassian config: " + missing.join(", ")); process.exit(1); } console.log("OK: Atlassian config present")'
|
|
pnpm atlassian health
|
|
```
|
|
|
|
If any check fails, stop and return:
|
|
|
|
`Missing dependency/config: atlassian requires installed CLI dependencies and valid Atlassian Cloud credentials. Configure ATLASSIAN_* in the shell environment or scripts/.env, 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-get --issue ENG-123`
|
|
- `pnpm atlassian conf-search --query "title ~ \\\"Runbook\\\"" --max-results 10 --start-at 0`
|
|
- `pnpm atlassian raw --product confluence --method POST --path "/wiki/api/v2/pages" --body-file page.json --dry-run`
|
|
|
|
## Safety Rules
|
|
|
|
- Prefer JSON output for agent use.
|
|
- Use `--dry-run` before writes unless the user explicitly wants the change applied.
|
|
- Keep `--body-file` inputs within the current workspace.
|
|
- Use `raw` only for user-requested unsupported endpoints.
|
|
- `raw` does not allow `DELETE`.
|
|
|
|
## Notes
|
|
|
|
- Cursor discovers this skill from `.cursor/skills/` or `~/.cursor/skills/`.
|
|
- Atlassian Cloud is the supported platform in v1.
|