Skip to content

Commit ad5c232

Browse files
committed
LT-22324: move skills to .agents
1 parent bc7e8b1 commit ad5c232

102 files changed

Lines changed: 1890 additions & 1253 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/skills/atlassian-readonly-skills/REFERENCE.md renamed to .agents/skills/atlassian-readonly-skills/REFERENCE.md

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,22 @@ Detailed usage examples and API documentation for read-only Jira, Confluence, an
44

55
> **Note**: This is a read-only variant. For write operations (create, update, delete), use `atlassian-skills`.
66
7+
## Jira CLI Quick Reference
8+
9+
Run from the repository root. The CLI uses `.agents/skills/atlassian-readonly-skills/.env` or `JIRA_*` environment variables and accepts either an issue key or a Jira browse URL.
10+
11+
```powershell
12+
python .agents/skills/atlassian-readonly-skills/scripts/jira.py issue LT-22324
13+
python .agents/skills/atlassian-readonly-skills/scripts/jira.py issue LT-22324 --all-fields
14+
python .agents/skills/atlassian-readonly-skills/scripts/jira.py comments LT-22324
15+
python .agents/skills/atlassian-readonly-skills/scripts/jira.py attachments LT-22324
16+
python .agents/skills/atlassian-readonly-skills/scripts/jira.py download-attachments LT-22324 --out Output/Jira/LT-22324
17+
python .agents/skills/atlassian-readonly-skills/scripts/jira.py search "project = LT AND key = LT-22324"
18+
python .agents/skills/atlassian-readonly-skills/scripts/jira.py transitions LT-22324
19+
```
20+
21+
Avoid long PowerShell blocks and `python -c` for normal Jira issue work. The plain `issue` command returns a readable common field set; use `--all-fields` only when you need every Jira field. Use the writable skill only when the user explicitly requests comments, edits, transitions, or uploads.
22+
723
## Configuration Modes
824

925
All functions support two configuration modes:
@@ -463,12 +479,12 @@ credentials = AtlassianCredentials(
463479
jira_url="https://company.atlassian.net",
464480
jira_username="user@company.com",
465481
jira_api_token="jira_token_here",
466-
482+
467483
# Confluence configuration
468484
confluence_url="https://company.atlassian.net/wiki",
469485
confluence_username="user@company.com",
470486
confluence_api_token="confluence_token_here",
471-
487+
472488
# Bitbucket configuration (optional)
473489
bitbucket_url="https://bitbucket.company.com",
474490
bitbucket_pat_token="bitbucket_pat_here"
@@ -487,10 +503,10 @@ if "jira" in availability["available_services"]:
487503
credentials=credentials
488504
)
489505
issue = json.loads(result)
490-
506+
491507
if not issue.get("error"):
492508
print(f"Issue: {issue['key']} - {issue['summary']}")
493-
509+
494510
# Search for issues
495511
result = jira_search(
496512
jql="project = PROJ AND status = 'In Progress'",
@@ -573,23 +589,23 @@ AtlassianCredentials(
573589
jira_api_token: Optional[str] = None,
574590
jira_pat_token: Optional[str] = None,
575591
jira_api_version: Optional[str] = None, # '2' or '3', auto-detected if not set
576-
jira_ssl_verify: bool = False,
577-
592+
jira_ssl_verify: bool = True,
593+
578594
# Confluence
579595
confluence_url: Optional[str] = None,
580596
confluence_username: Optional[str] = None,
581597
confluence_api_token: Optional[str] = None,
582598
confluence_pat_token: Optional[str] = None,
583599
confluence_api_version: Optional[str] = None,
584-
confluence_ssl_verify: bool = False,
585-
600+
confluence_ssl_verify: bool = True,
601+
586602
# Bitbucket
587603
bitbucket_url: Optional[str] = None,
588604
bitbucket_username: Optional[str] = None,
589605
bitbucket_api_token: Optional[str] = None,
590606
bitbucket_pat_token: Optional[str] = None,
591607
bitbucket_api_version: Optional[str] = None,
592-
bitbucket_ssl_verify: bool = False
608+
bitbucket_ssl_verify: bool = True
593609
)
594610
```
595611

.github/skills/atlassian-readonly-skills/SKILL.md renamed to .agents/skills/atlassian-readonly-skills/SKILL.md

Lines changed: 42 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -22,27 +22,34 @@ Read-only Python utilities for Jira, Confluence, and Bitbucket integration, supp
2222
- References to `jira.sil.org` URLs
2323
- Requests to "look up" or "check" a JIRA ticket
2424

25-
### ⚠️ Critical: Always Use Python Scripts
25+
### Critical: Use the Small Python CLI First
2626

2727
**NEVER** attempt to:
2828
- Browse to `jira.sil.org` URLs directly (requires authentication)
2929
- Use `fetch_webpage` or similar tools on JIRA URLs
3030
- Use GitHub issue tools for LT-* tickets
31+
- Build large inline PowerShell commands or quote-heavy `python -c` snippets for normal Jira work
3132

32-
**ALWAYS** use these Python modules. The scripts are Python modules (not CLI tools), so use them via inline Python or import:
33+
Run commands from the repository root. For normal read-only Jira issue work, use `scripts/jira.py`; it accepts either `LT-22324` or `https://jira.sil.org/browse/LT-22324`.
3334

3435
```powershell
35-
# Get a single issue (inline Python one-liner)
36-
python -c "import sys; sys.path.insert(0, '.github/skills/atlassian-readonly-skills/scripts'); from jira_issues import jira_get_issue; print(jira_get_issue('LT-22382'))"
37-
38-
# Search for issues (JQL query)
39-
python -c "import sys; sys.path.insert(0, '.github/skills/atlassian-readonly-skills/scripts'); from jira_search import jira_search; print(jira_search('project = LT AND status = Open'))"
40-
41-
# Get issue workflow transitions
42-
python -c "import sys; sys.path.insert(0, '.github/skills/atlassian-readonly-skills/scripts'); from jira_workflow import jira_get_transitions; print(jira_get_transitions('LT-22382'))"
36+
# Read the sample issue
37+
python .agents/skills/atlassian-readonly-skills/scripts/jira.py issue LT-22324
38+
python .agents/skills/atlassian-readonly-skills/scripts/jira.py issue LT-22324 --all-fields
39+
40+
# Review comments and attachments
41+
python .agents/skills/atlassian-readonly-skills/scripts/jira.py comments LT-22324
42+
python .agents/skills/atlassian-readonly-skills/scripts/jira.py attachments LT-22324
43+
python .agents/skills/atlassian-readonly-skills/scripts/jira.py download-attachments LT-22324 --out Output/Jira/LT-22324
44+
45+
# Search and workflow inspection
46+
python .agents/skills/atlassian-readonly-skills/scripts/jira.py search "project = LT AND key = LT-22324"
47+
python .agents/skills/atlassian-readonly-skills/scripts/jira.py transitions LT-22324
4348
```
4449

45-
Use the script modules in this skill directly.
50+
Use the Python modules directly only when a task genuinely needs custom composition beyond the CLI. For write operations such as adding comments or uploading screenshots, switch to `atlassian-skills` and get explicit user intent before modifying Jira.
51+
52+
By default, `issue` returns the fields agents usually need: summary, description, status, type, priority, assignee, reporter, timestamps, labels, and components. Use `--fields` for a custom field list, or `--all-fields` only when you really need every Jira field.
4653

4754
## Configuration
4855

@@ -58,7 +65,9 @@ Set environment variables based on your deployment type. This mode is used when
5865
# SIL JIRA instance for LT-* tickets
5966
JIRA_URL=https://jira.sil.org
6067
# Personal Access Token - generate at: https://jira.sil.org/secure/ViewProfile.jspa → Personal Access Tokens
61-
JIRA_PAT_TOKEN=your_jira_pat_token_here
68+
JIRA_PAT_TOKEN=
69+
JIRA_API_VERSION=2
70+
JIRA_SSL_VERIFY=true
6271
```
6372

6473
#### Cloud (API Token)
@@ -82,22 +91,26 @@ Generate API tokens at: https://id.atlassian.com/manage-profile/security/api-tok
8291
```bash
8392
# Jira Data Center
8493
JIRA_URL=https://jira.your-company.com
85-
JIRA_PAT_TOKEN=your_pat_token
94+
JIRA_PAT_TOKEN=
8695

8796
# Confluence Data Center
8897
CONFLUENCE_URL=https://confluence.your-company.com
8998
CONFLUENCE_PAT_TOKEN=your_pat_token
9099

91-
# Bitbucket Server/Data Center
92-
BITBUCKET_URL=https://bitbucket.your-company.com
93-
BITBUCKET_PAT_TOKEN=your_pat_token
100+
# Bitbucket Server/Data Center, only if needed
101+
# BITBUCKET_URL=https://bitbucket.your-company.com
102+
# BITBUCKET_PAT_TOKEN=
94103
```
95104

96105
> **Note**: PAT Token takes precedence if both are provided.
97106
98107
### Mode 2: Parameter-Based (Agent Environments)
99108

100-
Alternatively, call the scripts in this skill directly.
109+
When environment variables are not available, pass credentials directly to the Python functions.
110+
111+
```python
112+
from scripts._common import AtlassianCredentials, check_available_skills
113+
from scripts.jira_issues import jira_get_issue
101114

102115
# Create credentials object
103116
credentials = AtlassianCredentials(
@@ -225,13 +238,24 @@ result = confluence_get_page(
225238
### Jira Issue Management (`scripts.jira_issues`)
226239

227240
```python
228-
from scripts.jira_issues import jira_get_issue
241+
from scripts.jira_issues import (
242+
jira_download_attachment,
243+
jira_download_attachments,
244+
jira_get_attachments,
245+
jira_get_comments,
246+
jira_get_issue,
247+
)
229248

230249
# Get issue by key
231250
jira_get_issue(
232251
issue_key="PROJ-123",
233252
credentials=credentials # Optional
234253
)
254+
255+
# Get comments and attachments
256+
jira_get_comments(issue_key="PROJ-123")
257+
jira_get_attachments(issue_key="PROJ-123")
258+
jira_download_attachments(issue_key="PROJ-123", output_dir="Output/Jira/PROJ-123")
235259
```
236260

237261
### Jira Search (`scripts.jira_search`)

.github/skills/atlassian-readonly-skills/requirements.txt renamed to .agents/skills/atlassian-readonly-skills/requirements.txt

File renamed without changes.

.github/skills/atlassian-readonly-skills/scripts/__init__.py renamed to .agents/skills/atlassian-readonly-skills/scripts/__init__.py

File renamed without changes.

0 commit comments

Comments
 (0)