Skip to content
Agentmart
Submit a tool

ticket-close

CLOSE stage of /start - once the ticket's PR is merged, marks the ticket done, cleans up the branch and worktree, and closes the workspace.

Skill by beefysalad

IndexedMIT
Write a review

Chalk Labs

Need help deploying ticket-close?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/beefysalad-ticket-close

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

CLOSE stage of /start - once the ticket's PR is merged, marks the ticket done, cleans up the branch and worktree, and closes the workspace. Changes nothing while the PR is not merged.

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md and code. Checked Nov 2, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/ticket-close

What's inside

Skill name
ticket-close
Description
CLOSE stage of /start - once the ticket's PR is merged, marks the ticket done, cleans up the branch and worktree, and closes the workspace. Changes nothing while the PR is not merged.
License
MIT
Instructions
22 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# CLOSE

Read `patrick-workflows:ticket-workspace` first. `S` = `bash "$SKILL_DIR/../ticket-workspace/scripts/state.sh" <WS>/state.md`. Ask nothing; running `/start <id>` is the request.

1. Phase must be `pr`. `STATE=$(bash "$SKILL_DIR/../ticket-workspace/scripts/pr-state.sh" <pr_url>)`.
   - `open` → say the PR is still open (and its URL); change nothing.
   - `closed-unmerged` → say it was closed without merging; change nothing; to continue, reopen the PR on GitHub and push changes to the branch yourself (CLOSE then reports it open); to abandon the ticket, delete its workspace folder (`ticket-ws.sh path <id>`) and the branch yourself.
   - `could-not-run` → say `gh` could not read the PR; change nothing.
2. `merged`:
   1. Mark the ticket done with what the machine offers. Report which happened.
      - `issue_url` is set (`S get issue_url`): `gh issue view <issue_url> --json state --jq .state`. `CLOSED` (e.g. GitHub closed it from "Closes #n") → report it is already closed; do not comment. `OPEN` → `gh issue close <issue_url> --comment "Done in <pr_url>"`. Anything else → print the manual step.
      - Never close a GitHub issue by bare number (`gh issue close <n>` targets the current repo, which may not be the ticket's). No `issue_url` → treat the ticket as another tracker's.
      - Another tracker → its MCP tool if available; otherwise print the one manual step.
   2. If the session is in the ticket's worktree, `ExitWorktree` with `action: "keep"` first.
   3. If `checkout` is a worktree path: `git worktree remove <path>` (never with `--force`; report a refusal).
   4. In the main checkout, if its tree is clean (this is where `git switch` runs): `git switch <base_branch>` and, when a remote exists, `git pull --ff-only`.
   5. Delete the local branch: `git branch -d <branch>`. If git refuses (a squash or rebase merge), run `bash "$SKILL_DIR/../ticket-workspace/scripts/pr-state.sh" --head-matches <pr_url> <branch>`:
      - `same` → the local tip is exactly the PR head GitHub merged, so no unmerged work is lost: `git branch -D <branch>`, and report why `-D` was safe.
      - `differs` or `could-not-run` → never `-D`; keep the branch, report why, and tell the user they may delete it with `git branch -D <branch>` after checking it holds nothing unmerged.
   6. Ledger line with `date -u +%Y-%m-%dT%H:%M:%SZ`; `S phase closed`. Tell the user the ticket is closed.

From beefysalad/patrick-workflows, MIT.

Signals

Stars
0
Forks
0
Open issues
0
Last commit (this folder)
Oct 4, 2026 (1 month ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from beefysalad

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get ticket-close running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying ticket-close?

CallGet help
Cite this page

ticket-close skill. Agent Mart. https://agentmart.dev/skills/beefysalad-ticket-close (last updated 2026-10-24)