close-milestone

Closes a milestone only after verifying all issues are closed and the integration PR is merged.

Updated Aug 7, 2026
One-click install
npx skills add https://github.com/sagittaras/agentic-workflow --skill close-milestone-sagittaras
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: close-milestone
Source: https://github.com/sagittaras/agentic-workflow/tree/main/skills/close-milestone
Command: npx skills add https://github.com/sagittaras/agentic-workflow --skill close-milestone-sagittaras

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Closing a milestone prematurely makes unfinished work look done, and nobody checks a closed milestone again. This Skill prevents that by verifying hard evidence from the issue tracker — all issues closed and the integration pull request actually merged — before closing anything. ## Core Features & Use Cases - Cross-checked issue verification: Lists all issues for the milestone (paginated, filtered to issues only) and reconciles counts against the tracker's open/closed numbers, retrying once on mismatch and refusing to close on persistent discrepancy. - Merge-state validation: Distinguishes a merged PR from one merely closed, using forge-specific fields (merged/merged_at on Gitea, mergedAt on GitHub), with a fallback search by branch name and title when no PR is linked to the milestone. - Safe failure modes: Open issues, unmerged PRs, ambiguous milestone names, empty milestones, and count mismatches all end in a report or a user question — never in a silent close. - Use Case: After merging the integration PR for a release milestone, ask the assistant to close the milestone; it confirms all 12 issues are closed and PR #45 is merged, then closes the milestone in one call. ## Quick Start Ask the assistant to close the milestone named "v2.0" once its work is finished and the integration PR has been merged.

Frequently Asked Questions about close-milestone

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I safely close a GitHub or Gitea milestone?

Verify every issue in the milestone is closed and the integration pull request is merged before closing. This Skill performs both checks against live tracker data and closes the milestone with a single call only when both pass.

How to check if a pull request was merged or just closed?

Check the merged flag rather than the closed state: `merged`/`merged_at` on Gitea and `mergedAt` or state `MERGED` on GitHub. Fields like `mergeable` only indicate whether a PR can be merged, not whether it was.

Does this work with both Gitea and GitHub issue trackers?

Yes, it supports both forges selected via the project's workflow configuration. Gitea uses MCP tools like milestone_read and list_issues, while GitHub uses gh-based shell scripts with an explicit -R owner/repo argument.

What happens if a milestone has open issues when closing?

The milestone is not closed. The Skill lists each open issue with its number and title, then stops, since open issues are the primary signal that the milestone's work is not finished.

Can a milestone with no issues be closed automatically?

No, an empty milestone is never closed silently because it usually means issues were never created. The Skill asks the user for explicit confirmation and skips the integration PR check before closing.

Why does milestone closing fail with a 404 on Gitea?

A 404 on Gitea almost always means the account running the MCP server lacks permission on the repository. Verify the account's access rights rather than retrying against a different repository.