home / skills / freekmurze / dotfiles / convert-issue-to-discussion

convert-issue-to-discussion skill

/config/claude/skills/convert-issue-to-discussion

This skill converts GitHub issues to discussions using browser automation, guiding you through login, selecting category, and finalizing the conversion.

npx playbooks add skill freekmurze/dotfiles --skill convert-issue-to-discussion

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
2.9 KB
---
name: convert-issue-to-discussion
description: Convert GitHub issues to discussions using agent-browser. Use when asked to convert, move, or change an issue to a discussion. Requires agent-browser installed and user to log in via headed browser.
---

# Convert GitHub Issue to Discussion

Convert GitHub issues to discussions using browser automation when the gh CLI doesn't support this operation.

## Prerequisites

- `agent-browser` installed
- User must log in to GitHub when prompted

## Workflow

### 1. Open Browser in Headed Mode

```bash
agent-browser open "https://github.com/<owner>/<repo>/issues/<number>" --headed
```

The `--headed` flag shows the browser window so the user can log in.

### 2. Wait for User Login

Take a snapshot to check if logged in:

```bash
agent-browser snapshot -i
```

If you see "Sign in" in the elements, the user needs to log in. Let them know and wait for confirmation.

### 3. Navigate to the Issue

After login, go to the issue page:

```bash
agent-browser open "https://github.com/<owner>/<repo>/issues/<number>"
```

### 4. Find the Convert Button

Take a snapshot and look for "Convert to discussion":

```bash
agent-browser snapshot -i
```

Look for a button like:
```
- button "Convert to discussion" [ref=e137]
```

### 5. Click Convert to Discussion

```bash
agent-browser click @<ref>
```

### 6. Select Discussion Category

A dialog will appear with category options:

```bash
agent-browser snapshot -i
```

You'll see options like:
```
- combobox "Category for new discussion" [ref=e2]
- option "General" [ref=e3] [selected]
- option "Ideas" [ref=e4]
- option "Q&A" [ref=e6]
- button "I understand, convert this issue" [ref=e9]
```

Select appropriate category (Q&A for support questions, Ideas for feature requests):

```bash
agent-browser select @<combobox-ref> "Q&A"
```

### 7. Confirm Conversion

```bash
agent-browser click @<confirm-button-ref>
```

### 8. Verify Conversion

You don't need to verify, you are done now.

## Quick Reference

```bash
# Open issue page with visible browser
agent-browser open "https://github.com/owner/repo/issues/123" --headed

# Wait for user to log in, then get elements
agent-browser snapshot -i

# Click convert button (ref from snapshot)
agent-browser click @e137

# Wait for dialog, get new elements
agent-browser wait 1000 && agent-browser snapshot -i

# Select category and confirm
agent-browser select @e2 "Q&A"
agent-browser click @e9

# Verify - should redirect to discussions
agent-browser wait 2000 && agent-browser get url
```

## Category Guidelines

- **Q&A**: Support questions, debugging help, how-to questions
- **Ideas**: Feature requests needing discussion
- **General**: General conversation, announcements
- **Show and tell**: Project showcases

## Cleanup

You do not have to close the browser, as we'll use the login state again to convert other issues to discussions

## Looking for issues

When you are asked to find for more good issues to convert to discussions, use gh

Overview

This skill automates converting a GitHub issue into a discussion using a headed agent-browser session when the gh CLI cannot perform the operation. It guides the user through opening the issue page, logging in if required, clicking the conversion controls, selecting a discussion category, and confirming the conversion. It expects agent-browser to be installed and the user to complete any GitHub login prompts in the visible browser window.

How this skill works

The skill opens the target issue URL in a visible (headed) browser so the user can sign in. It inspects page elements with agent-browser snapshot calls to find the "Convert to discussion" control, clicks it, then selects the appropriate discussion category from the conversion dialog and confirms. It uses agent-browser commands to wait for elements and to interact with buttons, comboboxes, and options.

When to use it

  • You need to move an issue into Discussions but the gh CLI lacks direct support.
  • You want to convert support questions into a Q&A discussion for better community response.
  • You want to move feature requests into an Ideas discussion to spur design conversation.
  • You need an assisted, repeatable browser workflow because repository permissions require interactive login.
  • You plan to convert multiple issues and want to reuse the browser login state.

Best practices

  • Open the issue URL with --headed so the browser shows and you can complete GitHub login.
  • Take snapshots (agent-browser snapshot -i) to inspect element refs before clicking or selecting.
  • Choose discussion categories intentionally: Q&A for support, Ideas for feature requests, General for announcements.
  • Wait for the page elements to load (use agent-browser wait) before interacting to avoid missed clicks.
  • Keep the browser open between conversions to reuse the login session for subsequent operations.

Example use cases

  • Convert a reported bug that is actually a support question into a Q&A discussion.
  • Move a feature request issue into the Ideas category to start a broader community design thread.
  • Change an issue with long commentary into a General discussion to preserve conversation flow.
  • Batch-convert several repository issues while staying signed in via the headed browser.
  • Onboard contributors by converting low-value issues into show-and-tell discussions for examples.

FAQ

Do I need to be logged in to GitHub?

Yes. The headed browser shows a login prompt; you must sign in to perform the conversion.

What if I don't see the Convert to discussion button?

Take a new snapshot to refresh element refs, ensure you have the right permissions, and confirm the issue page URL is correct.