Skip to content
Back to skills

Checkout

ASecurity

Start work on a new issue or feature by creating a jj change on the up-to-date default branch with an optional named bookmark.

  • 10 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added October 1, 2026
ai-agentsbashgit

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned November 9, 2026

npx -y skills add martinemde/dotfiles --skill checkout --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Checkout?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Checkout
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/martinemde-checkout/badge)](https://www.skillsdirectory.com/skills/martinemde-checkout)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: checkout
description: Start work on a new issue or feature by creating a jj change on the up-to-date default branch with an optional named bookmark.
---

# Checkout: Start a New Change for an Issue

## Arguments

```
$ARGUMENTS
```

## Gather Context

Before changing revisions, run `jj status`, `jj diff --stat`, and a short
`jj log` covering `@` and its recent ancestors. Use that output to determine
whether the current change is empty, described, conflicted, or contains work
that must be preserved.

## Constraints

- Use `jj` for all version control operations, never `git`.
- Do not abandon changes or discard work without user confirmation.

## Instructions

### 1. Parse Arguments

Determine what `$ARGUMENTS` contains:

| Pattern                                | Action                                  |
| -------------------------------------- | --------------------------------------- |
| `#123` or issue URL                    | Fetch issue title, derive bookmark name |
| Bookmark name (e.g., `feat/dark-mode`) | Use directly                            |
| Empty                                  | Ask what to work on                     |

### 2. Derive Bookmark Name (from issue)

If `$ARGUMENTS` is an issue reference:

1. Fetch: `gh issue view <number> --json number,title,labels`
2. Derive bookmark name from issue metadata:
   - Check labels for conventional commit type hints (bug/fix labels → `fix/`, feature labels → `feat/`, chore/maintenance labels → `chore/`, default → `feat/`)
   - Format: `<prefix><number>-<kebab-case-title>` (e.g., `feat/123-add-dark-mode`)
   - Truncate to 60 characters max

### 3. Handle Existing Work

Check the gathered context for the current working copy state.

In jj, the working copy `@` is always a change being edited. Before starting new work, assess:

| Situation                                      | Action                                                                        |
| ---------------------------------------------- | ----------------------------------------------------------------------------- |
| Working copy is empty (no diff)                | Safe to proceed — `jj new` will leave an empty change behind (auto-abandoned) |
| Working copy has changes with a description    | Suggest `jj commit` first to finalize, then proceed                           |
| Working copy has changes without a description | Suggest `jj commit -m "..."` or `jj describe -m "..."` first                  |
| Conflicts exist (`jj st` shows conflicts)      | Inform user and wait for guidance                                             |

Do not silently abandon or squash work.

### 4. Create the Change

1. `jj git fetch` — ensure we have latest from remote
2. Create a new change on top of main:

```bash
jj new main -m "<issue title or description>"
```

3. Create a named bookmark on the new change (for later pushing/PR):

```bash
jj bookmark create <bookmark-name> -r @
```

### 5. Report and Continue

Report the change ID, bookmark name, and parent (e.g., `Created change xyz on bookmark feat/123-add-dark-mode from main`), then immediately mark this task complete and execute the next task in the workflow.

Files in this skill

  • README.md2.3 KB
  • SKILL.md3.5 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.