agentleFS
dgambhir01dgambhir01/jira-testcraft/skills/generate/SKILL.md

generate

Skill1 starsChanged 6 months agoMITView on GitHub

Generates structured test cases from a Jira Cloud Story. Use when the user provides a Jira issue key or URL and wants test cases generated.

17 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. 0 are common, 7 are distinctive, and 6 are very specific to this project.

  • 0

    Common

    Most of the 16 edited versions we read keep these.

  • 7

    Distinctive

    This author's own choices. Worth a look.

  • 6

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If the input matches an issue key pattern (e.g.

    line 15
  2. Distinctive:

    If the input is a URL, extract the issue key from either of these formats:

    line 16
  3. Distinctive:

    If the input is neither a valid issue key nor a recognised Jira Cloud URL, stop immediately:

    line 19
  4. Distinctive:

    Read these environment variables using a shell tool:

    line 30
  5. Very specific:

    If JIRA_URL is empty, stop:

    line 40
  6. Very specific:

    If the issue key's project prefix does not match JIRA_PROJECT_KEY when it is set, warn but do not stop.

    line 44
  7. Very specific:

    Use the atlassian MCP server.

    line 48
  8. Very specific:

    If anything other than Story, stop:

    line 59
  9. Distinctive:

    Treat Description as the primary test source.

    line 80
  10. Very specific:

    Read JIRA_AC_FIELD if set.

    line 89
  11. Distinctive:

    Search custom fields named Acceptance Criteria / AC.

    line 90
  12. Distinctive:

    If Description was sparse (warned above), add at top of output:

    line 109
  13. Distinctive:

    If separate AC was found via custom field, optionally note:

    line 113

“Common” is measured: kept by at least 6 in 10 of the 16 edited versions of this file we could read. “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
SKILL.md

Generate Test Cases from Jira Story

Instructions

The user will provide a Jira issue key (e.g. PROJ-123) or a full Jira Cloud URL.

Step 0 — Pre-flight checks (before any MCP call)

Validate input format first.

  • If the input matches an issue key pattern (e.g. PROJ-123, MYTEAM-4567), use it directly as the issue key. Keys are typically {PROJECT_KEY}-{number}.
  • If the input is a URL, extract the issue key from either of these formats:
    • https://{site}.atlassian.net/browse/{KEY}-{number}
    • https://{site}.atlassian.net/jira/software/projects/{project}/boards/{id}?selectedIssue={KEY}-{number}
  • If the input is neither a valid issue key nor a recognised Jira Cloud URL, stop immediately:

    "That doesn't look like a valid Jira issue key or URL. Please provide an issue key (e.g. PROJ-123) or a full Jira Cloud issue URL."

Validate MCP availability.

Confirm the atlassian MCP server is connected. If it is not available, stop:

"The Atlassian MCP server is not connected. Restart Claude Code — on first start a browser opens for Atlassian OAuth sign-in. If the browser did not open, run /jira-testcraft:setup and follow the prompts. Requires Node.js v18+."

Resolve configuration from the environment.

Read these environment variables using a shell tool:

  • JIRA_URL — Jira Cloud site URL, used as cloudId (e.g. https://mycompany.atlassian.net)
  • JIRA_PROJECT_KEY — default project key for validation (e.g. PROJ)
  • JIRA_AC_FIELD — optional; only used when the team has a separate Acceptance Criteria custom field
  • JIRA_DESCRIPTION_ONLY — if true (default), treat Description as the primary requirements source
  • Windows (PowerShell): $env:JIRA_URL, $env:JIRA_PROJECT_KEY, etc.
  • macOS / Linux (Bash): echo $JIRA_URL, echo $JIRA_PROJECT_KEY, etc.

If JIRA_URL is empty, stop:

"JIRA_URL is not set. Run /jira-testcraft:setup to configure it."

If the issue key's project prefix does not match JIRA_PROJECT_KEY when it is set, warn but do not stop.

Step 1 — Fetch and validate the issue

Use the atlassian MCP server. Call getJiraIssue with:

  • cloudId: value of JIRA_URL — pass the site URL directly. Do not call getAccessibleAtlassianResources.
  • issueIdOrKey: the issue key from Step 0

Always fetch fresh data — never reuse issue data from a previous invocation.

If the fetch fails, stop with a clear message including permission and admin hints. See docs/TROUBLESHOOTING.md patterns.

Check the issue type (fields.issuetype.name).

If anything other than Story, stop:

"Issue [KEY] is a [type] — not a Story. /jira-testcraft:generate only supports Stories in v1."

Check the issue status (fields.status.name).

  • Deleted / not found: stop.
  • Done, Closed, or Resolved: warn and ask before continuing.

Extract field content.

FieldSource
Summaryfields.summary
Descriptionfields.description — extract plain text from ADF if needed
Supplementary ACOptional; see below

Description-first content model (Jira default).

Most Jira teams put all requirements in Description — steps, expected results, and acceptance criteria together. This is normal and expected.

Treat Description as the primary test source. Look for:

  • Step / Expected pairs (e.g. Step: … Expected:)
  • Numbered or bulleted flows
  • Gherkin (Given / When / Then)
  • User story format ("As a … I want … so that …")

Optional separate Acceptance Criteria — only when JIRA_AC_FIELD is set OR JIRA_DESCRIPTION_ONLY is not true:

  1. Read JIRA_AC_FIELD if set.
  2. Search custom fields named Acceptance Criteria / AC.
  3. Parse an explicit "Acceptance Criteria" section from Description (do not duplicate content already used as Description body).

Assess content richness.

SituationAction
Summary and Description both emptyStop: "Story [KEY] appears empty. Add a Description with steps or requirements."
Summary only — Description emptyWarn and ask: "Story [KEY] has only a title. Test cases will be very generic. Proceed?"
Description has substantive content (steps, Expected, Gherkin, flows)Proceed normally — no warning
Description is a vague one-liner (< ~20 words, no structure)Warn: "Description is sparse. Test cases may lack coverage. Proceed?"
Separate AC field populatedProceed; optionally note AC source

Do not show "No Acceptance Criteria found" when Description contains clear steps, expected results, or Given/When/Then blocks.

Step 2 — Additional context

Review comments and linked issues for context only — not as primary test source.

If Description was sparse (warned above), add at top of output:

"⚠️ Story [KEY] has limited Description content. Recommend enriching with steps and expected results before finalising test cases."

If separate AC was found via custom field, optionally note:

"ℹ️ Supplementary Acceptance Criteria from field: [name or ID]"

Step 3 — Analyze for testable scenarios

Apply QE heuristics:

  • Boundary Value Analysis — min, max, just-below, just-above
  • Equivalence Partitioning — valid/invalid input classes
  • SFDIPOT — Structure, Function, Data, Interfaces, Platform, Operations, Time

Derive scenarios from Description content first. Use supplementary AC only if present and non-duplicative.

Step 4 — Generate Test Cases

Output a markdown table:

#Test Case TitleTypePreconditionsTest StepsExpected ResultPriority

Types to cover:

  • ✅ Positive — happy path, valid inputs
  • ❌ Negative — invalid inputs, error conditions
  • 🔲 Edge Case — boundaries, nulls, empty states, max length
  • 📐 Boundary Value — exact min/max thresholds

Step 5 — Summary

After the table:

  • Total test cases count by type
  • Areas where Description was unclear (flag for QE to verify with dev/PM)
  • Suggested automation priority

Arguments

$ARGUMENTS should be the Jira issue key or full Jira Cloud URL.

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.