agentleFS
wrm3wrm3/ai_project_template/.cursor/rules/atlassian/atlassian_integration.mdc

ai_project_template / atlassian

Cursor rule1 starsChanged 13 months agoMITView on GitHub

Complete integration with Atlassian products (Jira, Confluence, Bitbucket, Trello) for project management, documentation, and code repository operations. Use these rules when user requests involve: - Jira issue operations (create, update, query) - Confluence page management - Bitbucket repository/PR operations - Trello board/card management - Atlassian workflow automation - Cross-product integrations Jira: Issue tracking, project management, agile workflows Confluence: Documentation, knowledge base, collaboration (MCP: fstrent_mcp_confluence) Bitbucket: Code repositories, pull requests, code review Trello: Board management, task tracking Store credentials in .env.atlassian:

  • Reads credentials

The file

We split this atlassian_integration.mdc into the rules it gives an agent

6 rules. About 0 are common, 5 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use these rules when user requests involve:

    line 9
  2. Distinctive:

    401 Unauthorized: Check API token validity

    line 129
  3. Distinctive:

    403 Forbidden: Verify user permissions

    line 130
  4. Distinctive:

    404 Not Found: Verify resource ID/key

    line 132
  5. Very specific:

    If fstrent_mcp_confluence is configured in .mcp.json, prefer MCP tools:

    line 154
  6. Distinctive:

    Remember: Ensure proper authorization and follow organizational policies for Atlassian API access.

    line 169

≈ “Common” is an estimate: at least 1 in 5 of the 3,030 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
atlassian_integration.mdc
# Atlassian Integration - Cursor Rules

## Overview

Complete integration with Atlassian products (Jira, Confluence, Bitbucket, Trello) for project management, documentation, and code repository operations.

## When to Apply

Use these rules when user requests involve:
- Jira issue operations (create, update, query)
- Confluence page management
- Bitbucket repository/PR operations
- Trello board/card management
- Atlassian workflow automation
- Cross-product integrations

## Available Integrations

**Jira:** Issue tracking, project management, agile workflows
**Confluence:** Documentation, knowledge base, collaboration (MCP: `fstrent_mcp_confluence`)
**Bitbucket:** Code repositories, pull requests, code review
**Trello:** Board management, task tracking

## Core Workflows

### Jira Issue Management
```
Create issue:
1. Gather: project key, type, summary, description
2. Validate project exists
3. Create via API
4. Return issue key and URL

Query issues (JQL):
1. Build JQL query from criteria
2. Execute search
3. Format results
4. Return structured data

Transition issue:
1. Get issue key and target status
2. Verify transition is valid
3. Execute transition
4. Return confirmation
```

### Confluence Pages
```
Create page:
1. Gather: space key, title, content
2. Convert to Confluence format
3. Create via MCP or API
4. Return page ID and URL

Update page:
1. Get page ID
2. Increment version
3. Update content
4. Return updated page URL

Search:
1. Build CQL query
2. Execute search
3. Return matching pages
```

### Bitbucket Operations
```
Create PR:
1. Get source and target branches
2. Generate title/description from commits
3. Add reviewers
4. Create PR
5. Return PR URL

Review PR:
1. Get PR changes
2. Review code
3. Add comments
4. Approve or request changes
```

### Trello Management
```
Create card:
1. Get board and list IDs
2. Set card details
3. Create via API
4. Return card URL

Move card:
1. Get card and target list
2. Move card
3. Return confirmation
```

## Query Languages

### JQL (Jira)
```jql
# Open bugs in current sprint
project = PROJ AND type = Bug AND sprint in openSprints() AND status != Done

# My high priority issues
assignee = currentUser() AND priority = High
```

### CQL (Confluence)
```cql
# Search by title
title ~ "API Documentation"

# Recent pages in space
space = TEAM AND lastModified >= now("-7d")
```

## Authentication

Store credentials in `.env.atlassian`:
```bash
JIRA_URL=https://company.atlassian.net
JIRA_API_TOKEN=your_token
CONFLUENCE_URL=https://company.atlassian.net/wiki
CONFLUENCE_API_TOKEN=your_token
```

## Error Handling

**401 Unauthorized:** Check API token validity
**403 Forbidden:** Verify user permissions
**429 Rate Limited:** Implement exponential backoff
**404 Not Found:** Verify resource ID/key

## Best Practices

**Security:**
- ✅ Store tokens in environment variables
- ✅ Use minimum required permissions
- ❌ Never commit tokens to repository

**Operations:**
- ✅ Validate inputs before API calls
- ✅ Use bulk operations for efficiency
- ✅ Handle rate limiting
- ✅ Cache responses appropriately

**User Experience:**
- ✅ Explain operations before executing
- ✅ Provide progress updates
- ✅ Return URLs for created resources

## MCP Server (Confluence)

If `fstrent_mcp_confluence` is configured in `.mcp.json`, prefer MCP tools:
- `confluence_create_page`
- `confluence_update_page`
- `confluence_get_page`
- `confluence_search`

## Reference

For detailed information, see Claude Code Skill:
- `.claude/skills/atlassian-integration/SKILL.md`
- `.claude/skills/atlassian-integration/rules.md`
- `.claude/skills/atlassian-integration/examples/workflow_examples.md`

---

**Remember:** Ensure proper authorization and follow organizational policies for Atlassian API access.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.