/roost:create-xray-testfrom roost
Files Cucumber scenarios into Jira Xray Test issues via API or browser. Sets parent epic, Components, and story link. For teams using tests.kind: xray only.
Ships in roost. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Files Cucumber (Given/When/Then) scenarios into Jira Xray Test issues. The scenarios go in the Xray scenario editor, not the issue description.
This skill does the filing only. The scenarios come from:
shape-epic, for a new epic. It passes the approved test plan.live-verified-bdd, for a feature that already runs. It passes scenarios it has checked in the app.If there are no scenarios yet, stop and use one of those first. Don't make scenarios up here.
First, load the team config with roost-config. This skill is the browser half of the Xray adapter (tests.kind: xray); the adapter's notes are in roost-config's references/tests-xray.md.
This skill is only for Xray. With another tests.kind, don't use it: create and update tests as that tests adapter's "Create a test" and "Update a test's scenarios" say (for eval cases, roost-config's references/tests-evals.md).
XRAY_CLIENT_ID and XRAY_CLIENT_SECRET set: nothing else. Use the API ("Creating tests through the API" below); no browser is needed.https://<tracker.jira.site> and wait for them to sign in.tests.manual_label; see "Manual tests" in the Xray adapter notes): that it's manual, and its "how to run it" description.When XRAY_CLIENT_ID and XRAY_CLIENT_SECRET are set, create the tests and any Preconditions through Xray's API instead of the browser steps below: the Xray adapter notes (roost-config's references/tests-xray.md) show both mutations. It's faster and steadier than the browser. Show the user the list first, as below. Put the parent, the story's Components (step 6), and for a manual test its label and description, in the createTest call's jira.fields. Read every test back with getTests, comparing its Gherkin, labels and Components with what you sent; then link each test to its story (step 9). Use the browser steps only without the credentials.
Before creating anything, show the user the list of tests (key to be assigned, title, story, scenario names) and get approval. Then, for each test:
Click: css=[data-testid='atlassian-navigation--create-button']
Wait: 2 seconds for the dialog to load
The issue type stays "Test" after the first one in a session. If it isn't "Test", change it with the type selector.
Type into: css=[data-testid='issue-create-commons.common.ui.fields.base-fields.input-field.textfield']
Content: the test title (descriptive, under 100 characters)
The parent field only accepts epics, not stories.
Click: css=[data-testid='issue-create-commons.ui.pill-parent-field.parent-trigger']
Type into: css=input#parent-field
Content: the epic key
Wait: 2 seconds for search results
Click: css=#react-select-2-option-0
Click: css=[data-testid='issue-create-modernised.create-button']
Wait: 3 seconds
Snapshot: css=[role='alert']
Extract: the issue key from the alert text (for example "Created Test PROJ-2281")
Click: the "View Test" link in the alert
Wait: 4 seconds for the page to load
When tracker.components_required is true, every ticket needs Components. Copy them from the test's story (for a cross-cutting test, the last story it depends on) with the Jira MCP editJiraIssue tool. For a manual test, set its label and description in the same call (labels replace every label, so send them all):
fields: { "components": [{ "id": "<id>" }, …] }
fields: { "labels": ["<tests.manual_label>"], "description": "<how to run it>" } // manual tests only
The Xray panel lives in a Connect iframe whose URL contains all-in-one. The Ace editor's textarea is read-only, so fill() doesn't work. Set the editor's value through the frame instead:
const xrayFrame = page.frames().find(f => f.url().includes('all-in-one'));
await xrayFrame.locator('.ace_content').first().click(); // enter edit mode
await page.waitForTimeout(1500);
await xrayFrame.evaluate((g) => {
window.ace.edit(document.querySelector('.ace_editor')).setValue(g, -1);
}, gherkin);
await page.waitForTimeout(500);
await xrayFrame.getByRole('button', { name: 'Confirm' }).click();
On a new test, if there's no editor yet, click the "Click to add a scenario definition" element (test id gherkin-editor-view) first.
Never include a Feature: line. Xray builds the feature from the test summary. Start directly with Scenario::
Scenario: [what it proves]
Given [precondition]
When [action]
Then [expected result]
Scenario: [another behavior]
Given …
Reload the page, wait about 7 seconds, read the editor's value again, and compare it with what you set:
const now = await xrayFrame.evaluate(() => window.ace.edit(document.querySelector('.ace_editor')).getValue());
If they differ, report it. Don't retry blindly.
Use the Jira MCP createIssueLink tool with link type tests.xray.test_link_type (by default "Test", "tests" / "is tested by"):
inwardIssue: the testoutwardIssue: the storyRead the test back afterwards. The story should appear under its links as "tests PROJ-XXXX". Link a cross-cutting test to the last story it depends on, like any other.
If XRAY_CLIENT_ID and XRAY_CLIENT_SECRET are set, read and update scenarios through Xray's GraphQL API instead of the browser: getTests to read and updateGherkinTestDefinition to write. The Xray adapter notes show both calls. The same steps below apply: save the current text first, then check what was saved.
In the browser, the editor's visible text can look empty even when scenarios exist, so always read the value through Ace.
getValue() (step 8's snippet).After all tests are filed or updated, show:
| Test | Story | Title | Scenarios | Manual | Saved text matches |
|---|---|---|---|---|---|
| PROJ-XXXX | PROJ-YYYY | … | 3 | No | Yes |
| Problem | Fix |
|---|---|
| The create dialog doesn't open | Wait longer, or check whether a modal is already open |
| The parent field says "No matches found" | Only epics can be parents. Link stories with step 9. |
| The Xray iframe isn't there | Wait 4+ seconds after navigating, and scroll down if needed |
| "Click to add scenario" isn't visible | The test type must be "Cucumber". Check the Test Type field in the Xray panel. |
| The editor looks empty on an existing test | Its text is still there. Read it with getValue(), not the page text. |
| Stale ref IDs after navigating | Take a fresh snapshot after every navigation |
internal:frame selector error | Don't use CSS selectors with internal:frame. Use the frame API above, or refs from a snapshot. |
| Playwright says the browser is already in use | Another session holds the signed-in browser. Don't kill it: tell the user which session's work is waiting and ask them to free the browser, then retry (see "The signed-in browser" in roost-config) |
From the config: the cloud ID is tracker.jira.cloud_id, the Xray panel's test id is tests.xray.panel_test_id, and the link type is tests.xray.test_link_type.
What SKILL.md sets; muted values are Claude Code's defaults
23 skills in this plugin
/automate-testsAutomate the tests linked to a story or slice. Read each test's scenarios, find which already have automation, write the missing automation at the right layer, run it, and only when every scenario passes mark the test automated. Use when a developer agent is asked to "automate the tests for PROJ-X", "figure out why these tests aren't automated", or to finish the e2e work for a slice./automate-xray-testsThe old name of automate-tests, kept so it still works. Use automate-tests./bug-bashFix a list of bugs from the tracker in this repo, one branch each, test-first, with each fix placed by its parent (on the epic's GitHub stack for a bug in an unreleased epic, or its own PR from main for a standalone bug), moving each ticket through In Progress and Ready for Release. When a fix needs another repo, hand it off with pasteable comments instead of touching it. Use when the user gives a list of bugs to fix, says "bug bash", or pastes a "Big Bug Fix Bash" prompt./build-epicBuild an epic from its tech lead prompt to release QA, through the user's repo sessions (one per repo in the team's roost config). If the stories have no kickoff comments yet, it first sends the epic's tech lead prompt to the lead repo's session, brings the plan to the user for approval, and has the kickoffs posted. Then it runs run-slice for each story in order, slice-handoff between stories, the epic's "before release" work, review-epic, close-out-epic and release-qa. Starts without asking and keeps going on its own; stops only for decisions that are the user's (the plan, each slice's checkpoints, each handoff's sorting table) and for real blockers. Answers "where are we on the epic?" from the tracker, GitHub and its state file. Use when the user says "build PROJ-X", "build the epic", "develop PROJ-X", "start building PROJ-X", "do all the slices", "take this epic to release", or the older "run the epic" and "run the rest of PROJ-X". Run it from a separate orchestrator session, not from inside any of the repos./close-out-epicClose out an epic before it's released, so that its open-ticket count means something. Lists every open ticket under the epic and proposes, for each, fix before release, move to the epic's follow-up epic, or make standalone, then waits for the user's decisions. Moves the deferred tickets out of the epic with a link back, rewrites each one's description so it still makes sense outside the epic, posts one closing comment on the epic saying what was deferred and where it went, and checks the epic has no open tickets left. Run it again after the release ships, to confirm production runs it, check each release workflow and its tracker sync, close any ticket left waiting to ship with the version it shipped in, rewrite the epic's Release order and Close-out comments as shipped, and offer to draft the epic's release notes. Use when the user says "close out PROJ-X", "get PROJ-X ready to release", "move the leftovers out of the epic", "what's still open in this epic", "wrap up the epic" or "the epic shipped", and from build-epic right before release QA./cross-repo-handoffWrite a prompt that another repo's agent can run cold, for work this repo needs but must not do itself (for example the API change a UI fix depends on, or the UI change an API fix needs). Posts it as a comment on the ticket or returns it for pasting. Use when the user asks for "a prompt for the API agent", "a prompt for the UI agent", "what should I share back", or when a fix needs changes in the other repo.npx claudepluginhub beakpoint-insights/roost --plugin roostOther plugins' skills for the same job