delegating-to-jira-agent
Recognize Jira queries and delegate to specialized sub-agent to avoid context pollution
When & Why to Use This Skill
This Claude skill optimizes agent performance by implementing a delegation pattern for Jira-related tasks. It automatically detects Atlassian Jira queries—such as searching for tickets, creating issues, or updating statuses—and routes them to a specialized sub-agent. This architectural approach ensures the main conversation remains focused and 'clean' by preventing context pollution, while simultaneously reducing operational costs and improving accuracy through specialized task handling.
Use Cases
- Streamlining Project Management: Automatically identify mentions of Jira issue keys (e.g., PROJ-123) and delegate to a sub-agent to fetch real-time status updates without cluttering the main chat context.
- Efficient DevOps Workflows: Delegate the creation of new bug reports or task tickets to a specialized agent that understands specific field requirements and formatting, ensuring high-quality data entry.
- Cost-Effective Search Operations: Offload complex Jira Query Language (JQL) searches and result summarization to a secondary agent, preserving the primary agent's memory for high-level reasoning and strategy.
- Context-Aware Ticket Updates: Use a sub-agent to append comments or transition issue statuses, allowing the main agent to maintain a clean history of the broader project discussion.
| name | Delegating to Jira Agent |
|---|---|
| description | Recognize Jira queries and delegate to specialized sub-agent to avoid context pollution |
| keywords | jira, atlassian, devops, issue, ticket, bug, task, search, comment, delegate, agent |
| when_to_use | When user mentions "jira", "issue", "ticket", or asks to view/create/search/update Acme Jira issues. ALWAYS delegate to sub-agent. |
| version | 1.0.0 |
Delegating to Jira Agent
Core Principle
Never handle Jira operations directly. Always delegate to a specialized sub-agent to keep your context clean and costs low.
Recognition Patterns
Delegate when user says:
- "show me jira issue PROJ-1234"
- "what jira issues do I have?"
- "search jira for nginx"
- "create a jira for this work"
- "add a comment to PROJ-1234"
- Any mention of: jira, issue, ticket, PROJ-, AcmeED-
How to Delegate
Use the Task tool with a specialized prompt:
Task(
subagent_type: "general-purpose",
description: "Query Acme Jira",
prompt: "<full agent instructions from AGENT-INSTRUCTIONS.md>"
)
Agent Prompt Template
When delegating, include:
- The complete agent instructions (see AGENT-INSTRUCTIONS.md)
- The user's specific request
- Clear output format requirements
Example:
You are a Acme Jira specialist. Your job is to query Acme's Atlassian Jira using shell wrappers and return clean results.
<AGENT INSTRUCTIONS HERE>
USER REQUEST: Show me my jira issues for production-main
Return a clean summary with:
- Issue keys
- Summaries
- Status
- URLs
After Agent Returns
- Present results cleanly to user
- Offer follow-up if relevant (e.g., "Would you like details on PROJ-1234?")
- Don't expose mechanics (curl, auth, etc.) to user
Benefits
- ✅ Main context stays clean
- ✅ Cheaper queries (sub-agent uses less expensive model)
- ✅ Specialized knowledge isolated
- ✅ Scalable pattern for other services
Example Flow
User: "show me my open jira issues"
Main Assistant: [Recognizes Jira query]
→ Invokes Task tool with agent instructions
→ Agent runs issuetracker-mine wrapper
→ Agent returns formatted results
Main Assistant: "You have 20 open issues. Here are the highlights:
- PROJ-1638: production-main (In Development)
- PROJ-2216: Reduce catdv log noise (Scheduled)
..."
Red Flags
DON'T:
- ❌ Try to run issuetracker-* scripts yourself
- ❌ Construct curl commands in main session
- ❌ Load detailed Jira API knowledge
- ❌ Handle authentication directly
DO:
- ✅ Immediately delegate on Jira keywords
- ✅ Trust the sub-agent's results
- ✅ Present clean summaries to user
Version History
- 1.0.0 (2025-10-14): Initial delegation skill created to reduce context pollution