---
name: jira-cookie-automation
description: Automate Jira work with a live browser session cookie, automatically bootstrapping `JIRA_COOKIE` from an existing Chrome DevTools MCP Jira browser session when available. Use when Codex needs to create, file, update, assign, comment on, link, transition, search, sprint-assign, verify, or batch-process Jira issues, especially when a repo has planning CSV/JSON files or when the user wants Jira website actions made repeatable from any workspace.
title: jira-cookie-automation
canonical_url: https://skilld.dev/gh/geocine/skills/jira-cookie-automation
last_updated: 2026-09-29T08:37:51.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> Supporting files, fetch one when the Skill refers to it: [references/batch-formats.md](https://skilld.dev/api/skills-raw/geocine/skills/jira-cookie-automation/references/batch-formats.md), [references/cookie-auth.md](https://skilld.dev/api/skills-raw/geocine/skills/jira-cookie-automation/references/cookie-auth.md), [references/manual-ui-fallback.md](https://skilld.dev/api/skills-raw/geocine/skills/jira-cookie-automation/references/manual-ui-fallback.md), [references/mcp-cookie-bootstrap.md](https://skilld.dev/api/skills-raw/geocine/skills/jira-cookie-automation/references/mcp-cookie-bootstrap.md), [scripts/jira_cookie.py](https://skilld.dev/api/skills-raw/geocine/skills/jira-cookie-automation/scripts/jira_cookie.py).
>
> If the user asked to install this Skill, run `npx skilld install geocine/skills/jira-cookie-automation`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/jira-cookie-automation`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/geocine/skills/jira-cookie-automation) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/jira-cookie-automation`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/jira-cookie-automation --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/jira-cookie-automation --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# Jira Cookie Automation

## Core Rule

Prefer cookie-backed Jira REST automation over manual browser navigation. Use manual Jira UI only when REST is blocked, the user explicitly asks for website navigation, or an operation cannot be represented safely through the API.

Before asking the user to paste `JIRA_COOKIE`, try to extract the Cookie request header from an existing authenticated Jira page in Chrome DevTools MCP. Never store Jira cookies in files, logs, skill resources, commits, or generated artifacts.

## Cookie Bootstrap Order

1. If Chrome DevTools MCP tools are available, use `references/mcp-cookie-bootstrap.md` and try to read the `Cookie` header from an authenticated Jira network request.
2. If MCP extraction succeeds, set `JIRA_BASE_URL` from the request origin and use that Cookie header as `JIRA_COOKIE` for the CLI command.
3. If MCP extraction fails because no Jira page or request is available, ask the user to open Jira and trigger any authenticated REST request, such as `/rest/api/3/myself`.
4. Ask the user to paste a cookie manually only when MCP is unavailable or cannot expose request headers.

## Quick Start

Use the bundled CLI from this skill directory:

```powershell
$env:JIRA_BASE_URL = 'https://your-site.atlassian.net'
$env:JIRA_COOKIE = 'paste the full Cookie request header here'
python scripts\jira_cookie.py whoami
```

Run write operations as dry-runs first:

```powershell
python scripts\jira_cookie.py create --dry-run --project APP --type Task --summary "Build shared shell" --description "Implement:`n- Build the route shell"
```

Then run the same command without `--dry-run` only after the payload is correct.

## Workflow

1. Identify the Jira base URL, project key, issue type, board ID, labels, priority names, and assignee names or account IDs from the repo, user message, or Jira itself.
2. Bootstrap `JIRA_COOKIE` from Chrome DevTools MCP when available. Fall back to manual cookie setup only if needed.
3. Run `whoami` to verify the cookie and base URL.
4. Use `search`, `get`, `user-search`, and `transitions` to discover current Jira state before writing.
5. For writes, run with `--dry-run` first and inspect the JSON payload.
6. Apply small batches. For issue creation, keep batches to 3 to 5 unless the user explicitly wants a larger automated run.
7. Verify by reading Jira back after each batch. Prefer the CLI's `--verify` flag where available.
8. Keep a local progress file or write-back CSV updated after successful batches.

## Common Commands

Authentication check:

```powershell
python scripts\jira_cookie.py whoami
```

Search issues:

```powershell
python scripts\jira_cookie.py search --jql "project = APP ORDER BY created DESC" --fields summary,status,assignee,priority
```

Create an issue:

```powershell
python scripts\jira_cookie.py create --project APP --type Task --summary "Implement profile shell" --description-file issue.txt --assignee "Jordan Hale" --priority High --label app-v2 --verify
```

Update summary, description, assignee, priority, or labels:

```powershell
python scripts\jira_cookie.py update APP-123 --summary "Implement profile shell route" --assignee "Jordan Hale" --priority Normal --verify
```

Assign an issue:

```powershell
python scripts\jira_cookie.py assign APP-123 --assignee "Riley Chen" --verify
```

Add a dependency link:

```powershell
python scripts\jira_cookie.py link --type Blocks --inward APP-124 --outward APP-123
```

This means Jira stores a `Blocks` link where `APP-124` is blocked by `APP-123`.

Transition an issue:

```powershell
python scripts\jira_cookie.py transition APP-123 --to Done --comment "Scope covered by APP-122."
```

Assign issues to a sprint:

```powershell
python scripts\jira_cookie.py assign-sprint --board-id 42 --sprint "App Sprint 6" --create-missing --issues APP-123 APP-124
```

Batch-create from CSV:

```powershell
python scripts\jira_cookie.py batch-create --csv jira-ui-create-queue.csv --project APP --type Task --summary-col Summary --description-col Description --assignee-col Assignee --priority-col Priority --label app-v2 --limit 5 --write-back --verify
```

See `references/batch-formats.md` for CSV and JSON plan patterns.

## Operating Rules

- Treat `JIRA_COOKIE` as a short-lived session secret. If a request returns 401, 403, CAPTCHA, or unexpected HTML, ask the user to refresh the cookie.
- Prefer an MCP-extracted cookie over asking the user to copy/paste one.
- Do not invent assignee account IDs. Resolve names with `user-search` or use IDs already present in trusted local files.
- Do not create duplicate issues. Search by summary, project, labels, or known issue keys before creating.
- Do not silently close or transition issues. Comment first when closing duplicates or retargeting scope.
- Use Jira read-back verification for summary, assignee, priority, labels, status, sprint, and links after writes.
- Keep project-specific constants out of the skill. Use environment variables, command flags, or repo-local config/docs.
- Keep generated logs free of cookie values and request headers.

## Resources

- `scripts/jira_cookie.py`: reusable Jira REST CLI backed by `JIRA_COOKIE`.
- `references/mcp-cookie-bootstrap.md`: Chrome DevTools MCP flow for extracting the Cookie header from an existing Jira browser session.
- `references/cookie-auth.md`: safe cookie acquisition and environment setup.
- `references/batch-formats.md`: reusable CSV/JSON shapes for filing, assignment, linking, sprint work, and resumable runs.
- `references/manual-ui-fallback.md`: condensed website-navigation fallback for the Jira create-issue UI.
