agentleFS
dmzoneilldmzoneill/skills/close-issue/SKILL.md

close-issue

Skill2 starsChanged 19 days agoApache-2.0View on GitHub

Close a Jira issue by transitioning to Done. Adds a comment summarizing branch commits and MR. Use when user says "close issue", "mark done", "finish AAP-X".

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If status already "done": return early with message

    line 26
  2. Very specific:

    Use Jira wiki: {code}, {monospace}, | for tables

    line 36
  3. Very specific:

    Remove from state/current_work.active_issues (key match)

    line 51
  4. Very specific:

    Remove from open_mrs if MR merged

    line 52

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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

Close Jira Issue

Inputs

InputTypeDefaultPurpose
issue_keystringrequiredJira issue key (e.g., AAP-12345)
repostring"."Repo path for branch/commits
add_commentbooltrueAdd closing comment with commit summary

Workflow

1. Bootstrap

  • persona_load("developer")
  • knowledge_query(project="automation-analytics-backend", section="gotchas") — Jira workflow context
  • check_known_issues("jira_transition")
  • Load config: jira.statuses.done, jira.statuses.pending_release, resolve gitlab_project from issue key

2. Get Issue & Status

  • jira_get_issue(issue_key) — or jira_view_issue depending on tool naming
  • If status already "done": return early with message

3. Branch & Commits

  • git_branch_list(repo, all_branches=true) — find branch matching issue key via parse_git_branches
  • git_log(repo, limit=20, oneline=true) — parse commits
  • gitlab_mr_list(project, state="all") — find MR with issue key in title
  • Parse MR: id, title, state, merged, url

4. Build Comment

  • Format: h3. ✅ Issue Completed, Branch, MR link, Commits table (SHA, Message)
  • Use Jira wiki: {code}, {monospace}, | for tables

5. Update Jira

  • jira_add_comment(issue_key, closing_comment) if add_comment
  • jira_get_transitions(issue_key) — get available transitions
  • Find "Done" transition via find_transition_name (config may use "Done", "Closed", etc.)
  • jira_transition(issue_key, status=target_status)

6. Verify & Notify

  • jira_get_issue(issue_key) — verify status
  • skill_run("notify_team", '{"message": "Issue AAP-X closed", "type": "success", "context": "..."}')
  • jira_attach_session(issue_key, include_transcript=false)

7. Memory

  • memory_session_log("Closed issue AAP-X", "Commits: N, MR merged: Y/N")
  • Remove from state/current_work.active_issues (key match)
  • Remove from open_mrs if MR merged
  • Record in learned/patterns.issue_closures
  • Save to state/shared_context.last_issue_closed

8. Cleanup

  • skill_run("cleanup_branches", '{"repo": "...", "dry_run": false}') — delete merged branch
  • persona_load("developer") — restore after cleanup

9. Failure Learning

  • "transition not available" → learn_tool_fix("jira_transition", "transition not available", "Wrong status", "Check jira_get_transitions")
  • "no such host" → learn_tool_fix("gitlab_mr_list", "no such host", "VPN", "vpn_connect()")

Key MCP Tools

  • persona_load, jira_get_issue, jira_view_issue, jira_add_comment, jira_get_transitions, jira_transition, jira_attach_session
  • git_branch_list, git_log, gitlab_mr_list
  • knowledge_query, check_known_issues, learn_tool_fix
  • memory_session_log, skill_run

Note

Jira tool naming may vary: jira_get_issue vs jira_view_issue. Use available Jira tools for fetch, transitions, and comments.

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.