work-with-adf
Create, validate, and work with Atlassian Document Format (ADF) for Jira. Use when creating rich content for Jira issues, epics, and comments. Helps with understanding ADF node structure, building documents programmatically, validating ADF against the specification, and troubleshooting validation errors.
What this skill does
# Work with ADF (Atlassian Document Format)
## Purpose
This skill helps you work with Atlassian Document Format (ADF), the JSON-based format used for rich text content in Jira. Whether you're creating documents programmatically, understanding the structure, validating content, or debugging Jira API errors, this skill provides clear guidance and patterns.
## Quick Start
Create a simple ADF paragraph:
```python
from jira_tool.formatter import JiraDocumentBuilder
doc = JiraDocumentBuilder()
doc.add_paragraph(doc.add_text("Hello, Jira!"))
adf = doc.build()
print(adf)
```
Output:
```json
{
"version": 1,
"type": "doc",
"content": [
{
"type": "paragraph",
"content": [{"type": "text", "text": "Hello, Jira!"}]
}
]
}
```
## Instructions
### Step 1: Understand ADF Structure
ADF documents follow a strict hierarchical structure:
1. **Root Node (`doc`)**: Every document must have `version`, `type: "doc"`, and `content` array
2. **Block Nodes**: Top-level structure (headings, paragraphs, lists, panels, code blocks, tables)
3. **Inline Nodes**: Content within blocks (text, emoji, links, mentions)
4. **Marks**: Formatting applied to text (bold, italic, code, strikethrough, links)
**Minimal Valid Document**:
```json
{
"version": 1,
"type": "doc",
"content": []
}
```
**Key Principle**: ADF uses a single sequential path - traversing nodes linearly produces correct reading order.
### Step 2: Choose Your Approach
Pick the right tool for your use case:
**Option A: Use `JiraDocumentBuilder` (Recommended)**
- Built-in Python class in `src/jira_tool/formatter.py`
- Fluent API with method chaining
- Handles correct nesting automatically
- Best for: Most common tasks
**Option B: Use Specialized Builders**
- `EpicBuilder`: Pre-formatted template for epics
- `IssueBuilder`: Pre-formatted template for issues
- Best for: Creating standardized documents
**Option C: Build Raw ADF (Advanced)**
- Direct JSON dictionaries
- Full control over structure
- Best for: Complex or non-standard layouts
### Step 3: Build Your Document
#### Basic Elements
**Add a heading**:
```python
doc.add_heading("My Epic", level=1)
doc.add_heading("Problem Statement", level=2)
```
**Add a paragraph with formatting**:
```python
doc.add_paragraph(
doc.bold("Priority: "),
doc.add_text("P0")
)
```
**Add lists**:
```python
doc.add_bullet_list(["Item 1", "Item 2", "Item 3"])
doc.add_ordered_list(["First step", "Second step"], start=1)
```
**Add code blocks**:
```python
doc.add_code_block(
'def hello():\n print("world")',
language="python"
)
```
**Add panels** (info, note, warning, success, error):
```python
doc.add_panel("warning",
{"type": "paragraph", "content": [doc.add_text("Important!")]}
)
```
**Add visual elements**:
```python
doc.add_rule() # Horizontal rule
emoji = doc.add_emoji(":rocket:", "๐")
```
#### Formatting Options
**Text formatting** (use in text nodes):
```python
doc.bold("Bold text")
doc.italic("Italic text")
doc.code("inline_code")
doc.strikethrough("Strikethrough")
doc.link("Click here", "https://example.com")
```
**Combine formatting**:
```python
doc.add_paragraph(
doc.bold("Status: "),
doc.add_text("In Progress")
)
```
### Step 4: Build and Export
**Get the final ADF**:
```python
adf_dict = doc.build()
```
**Use with Jira API**:
```python
from jira_tool.client import JiraClient
client = JiraClient()
client.create_issue(
project="PROJ",
issue_type="Epic",
summary="My Epic",
description=adf_dict # Pass ADF directly
)
```
## Examples
### Example 1: Create a Simple Epic
```python
from jira_tool.formatter import EpicBuilder
epic = EpicBuilder(
title="User Authentication System",
priority="P0",
dependencies="OAuth 2.0 library",
services="Auth Service, API Gateway"
)
epic.add_problem_statement(
"Current authentication is insecure and lacks OAuth support"
)
epic.add_description(
"Implement OAuth 2.0 integration with support for multiple providers"
)
epic.add_technical_details(
requirements=[
"Implement OAuth 2.0 flow",
"Support Google and GitHub providers",
"Add token refresh mechanism"
],
code_example="oauth = OAuth2Handler(provider='google')",
code_language="python"
)
epic.add_acceptance_criteria([
"Users can log in with Google",
"Users can log in with GitHub",
"Tokens refresh automatically"
])
epic.add_edge_cases([
"Handle provider outages gracefully",
"Support token expiration",
"Manage scope conflicts"
])
epic.add_testing_considerations([
"Mock OAuth provider responses",
"Test token refresh edge cases",
"Verify scope permissions"
])
adf = epic.build()
```
### Example 2: Create an Issue with Mixed Content
```python
from jira_tool.formatter import IssueBuilder
issue = IssueBuilder(
title="Implement OAuth Google Provider",
component="Auth Service",
story_points=13,
epic_key="PROJ-100"
)
issue.add_description(
"Add Google OAuth 2.0 provider support to the authentication system"
)
issue.add_implementation_details([
"Register application with Google Cloud Console",
"Implement OAuth callback endpoint",
"Add token validation and refresh logic",
"Update user profile with Google user ID"
])
issue.add_acceptance_criteria([
"Users can authenticate with Google account",
"Tokens are validated on each request",
"Token refresh works correctly",
"Tests pass with >90% coverage"
])
adf = issue.build()
```
### Example 3: Create Raw ADF with Full Control
For cases where builders don't provide enough flexibility:
```python
adf_document = {
"version": 1,
"type": "doc",
"content": [
{
"type": "heading",
"attrs": {"level": 1},
"content": [{"type": "text", "text": "Custom Report"}]
},
{
"type": "paragraph",
"content": [
{"type": "text", "text": "Data as of: "},
{"type": "text", "text": "2025-11-03", "marks": [{"type": "code"}]}
]
},
{
"type": "table",
"attrs": {"isNumberColumnEnabled": False, "layout": "default"},
"content": [
{
"type": "tableRow",
"content": [
{
"type": "tableHeader",
"content": [
{"type": "paragraph", "content": [{"type": "text", "text": "Metric"}]}
]
},
{
"type": "tableHeader",
"content": [
{"type": "paragraph", "content": [{"type": "text", "text": "Value"}]}
]
}
]
}
]
}
]
}
```
### Example 4: Add Emoji to Documents
```python
from jira_tool.formatter import JiraDocumentBuilder
doc = JiraDocumentBuilder()
# Emoji in paragraph
doc.add_paragraph(
doc.add_emoji(":rocket:", "๐"),
doc.add_text(" "),
doc.bold("Important Update")
)
# Emoji in heading
doc.add_heading(doc.add_emoji(":warning:", "โ ๏ธ") + " Critical Issue", 1)
adf = doc.build()
```
## Validation
### Validate ADF Structure
**Using the Official JSON Schema:**
Atlassian provides an official JSON Schema for ADF validation:
- **Schema URL (latest)**: https://unpkg.com/@atlaskit/adf-schema@latest/dist/json-schema/v1/full.json
- **Schema URL (pinned v51.3.2)**: https://unpkg.com/@atlaskit/[email protected]/dist/json-schema/v1/full.json
- **Short link**: https://go.atlassian.com/adf-json-schema (redirects to latest)
**Using the Built-in Validator:**
```bash
# Validate using the skill's validation script
python .claude/skills/work-with-adf/scripts/validate_adf.py your-adf.json
```
This validator checks:
- Root documenRelated in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only โ no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.