linear-ticket-cleanup

Remove Linear ticket worktrees, branches, and feature directories after completion.

9|3|Updated Apr 14, 2026
One-click install
npx skills add https://github.com/Pythagora-io/agent-templates --skill linear-ticket-cleanup
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: linear-ticket-cleanup
Source: https://github.com/Pythagora-io/agent-templates/tree/main/Developer%20Agent/linear-ticket-cleanup
Command: npx skills add https://github.com/Pythagora-io/agent-templates --skill linear-ticket-cleanup

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automatically clean up the development environment after a Linear ticket completes, removing worktrees, branches, and feature directories to keep repos tidy.

Core Features & Use Cases

  • Remove feature worktrees and associated branches when a Linear ticket is done.
  • Update the feature registry to reflect removal.
  • Safe fallback steps for manual cleanup if the primary command is unavailable.

Quick Start

Run the cleanup command with the feature name to remove worktrees, branches, and the feature directory.

Frequently Asked Questions about linear-ticket-cleanup

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

FAQPage Schema
How do I automatically delete git worktrees and branches when a Linear ticket is done?

To remove git worktrees and branches when a Linear ticket is done, run the cleanup command with the feature name. This removes associated worktrees, branches, and feature directories, keeping your development environment tidy after ticket completion.

Can I clean up feature directories across multiple repositories for one Linear ticket?

Yes, you can clean up feature directories across multiple repositories for a single Linear ticket. The cleanup process applies to both merged and closed Linear tickets across one or more repositories, including multi-repo scenarios.

What happens to the feature registry after removing a closed Linear ticket's worktrees?

After removing a closed Linear ticket's worktrees, the feature registry is automatically updated to reflect the removals. This ensures your tracking system stays accurate and synchronized with the actual state of your local directories.

Does the cleanup process validate worktree existence before attempting deletion?

Yes, the cleanup process validates the existence of worktrees, branches, and feature directories before deletion. This validation ensures safe removal and prevents errors when handling completed Linear tickets across your repositories.

What should I do if the primary Linear worktree cleanup command is unavailable?

If the primary Linear worktree cleanup command is unavailable, the system provides safe fallback steps for manual cleanup. These steps guide you through manually removing worktrees, branches, and feature directories when automation fails.

Does Linear ticket cleanup remove branches for both merged and closed tickets?

Yes, Linear ticket cleanup removes branches and worktrees for both merged and closed tickets. It comprehensively cleans up the development environment regardless of whether the ticket was actively merged or simply closed without merging.