tejasgadhia

tg-issue

0
0
# Install this skill:
npx skills add tejasgadhia/tg-claude-skills --skill "tg-issue"

Install specific skill from multi-skill repository

# Description

Log a new issue to the current project's GitHub repo. Use when you want to track a bug, idea, or task for later without fixing it immediately. Triggers include "/tg-issue", "log this issue", "track this bug", "remember this problem".

# SKILL.md


name: tg-issue
description: Log a new issue to the current project's GitHub repo. Use when you want to track a bug, idea, or task for later without fixing it immediately. Triggers include "/tg-issue", "log this issue", "track this bug", "remember this problem".


Issue Tracker - Create GitHub Issue

Overview

Quickly log issues to the current project's GitHub repo for later. Designed for Tejas's workflow: capture the thought, don't lose it, tackle it later.

When to Use

Use this skill when:
- You notice a bug but don't want to fix it right now
- You have an idea for an enhancement
- You want to remember a task for later
- Something's broken but you're focused on something else

Key principle: Log it and move on. Don't context-switch to fix it immediately.

The Workflow

Step 1: Detect GitHub Repo

# Get the GitHub repo from git remote
git remote get-url origin 2>/dev/null

If no GitHub repo found:

This project doesn't have a GitHub remote configured.

To add one:
1. Create a repo at https://github.com/new
2. Run: git remote add origin https://github.com/tejasgadhia/[repo-name].git

Then try /tg-issue again.

Do not proceed if there's no GitHub repo. Stop here.

Step 2: Analyze the Issue

From the user's message, extract:
- What's the problem or idea?
- Any error messages mentioned?
- What were they trying to do?
- Any files or code referenced?

From recent conversation context (be token-efficient):
- What project/feature were we working on?
- Any relevant error messages or failures?
- Files recently discussed?

Important: Often the issue is a tangential thought, NOT related to current work. Don't over-assume connection to recent context. If the user's message is self-contained, trust it.

Step 3: Determine Clarity

Issue is CLEAR if you can answer:
1. What is the problem/request? (title)
2. What type is it? (bug/enhancement/idea/task)
3. What priority seems appropriate?

Issue is UNCLEAR if:
- The description is vague ("fix that thing")
- You can't determine what type it is
- Critical context seems missing

Step 4: If Unclear, Ask Clarifying Questions

Ask at most 2 questions to clarify. Examples:

I want to make sure this issue is useful when you come back to it. Quick clarifications:

1. **What's the specific problem?** (e.g., "search returns wrong results" vs "search is broken")
2. **How urgent is this?** (P1-critical, P2-high, P3-medium, P4-low)

Don't over-ask. If you have enough to create a useful issue, proceed.

Step 5: Generate Issue Preview

Always show a preview before creating:

## Issue Preview

**Repository**: tejasgadhia/[repo-name]
**Title**: [Clear, actionable title]
**Labels**: `bug`, `P2-high`

**Description**:
---
## Problem
[What's wrong or what's needed]

## Context
[Relevant background - what we were doing, files involved]

## Steps to Reproduce (if applicable)
1. [Step 1]
2. [Step 2]

## Expected vs Actual (if applicable)
- **Expected**: [what should happen]
- **Actual**: [what happens instead]

## Notes
- Logged during: [brief context of current session]
- Related files: [if any were mentioned]
---

**Create this issue?** (yes/no, or suggest edits)

Adjust sections based on issue type:
- Bug: Include steps to reproduce, expected vs actual
- Enhancement/Idea: Include motivation, potential approach
- Task: Include clear definition of done

Step 6: Create the Issue

Once confirmed, create the issue:

# Get repo in owner/repo format
REPO=$(git remote get-url origin | sed 's/.*github.com[:/]\(.*\)\.git/\1/' | sed 's/.*github.com[:/]\(.*\)/\1/')

# Create issue with labels
gh issue create \
  --repo "$REPO" \
  --title "Issue title here" \
  --body "Issue body here" \
  --label "bug" \
  --label "P2-high"

Step 7: Confirm Creation

## Issue Created

**#[number]**: [title]
**URL**: https://github.com/tejasgadhia/[repo]/issues/[number]
**Labels**: `bug`, `P2-high`

Issue logged! You can tackle it later with `/tg-issues` to see your backlog.

---
*Continuing with what you were doing...*

Labels Reference

Type Labels (pick one):
| Label | Use When |
|-------|----------|
| bug | Something is broken or behaving incorrectly |
| enhancement | Improvement to existing functionality |
| idea | New feature or concept to explore |
| task | General work item or to-do |

Priority Labels (pick one):
| Label | Use When |
|-------|----------|
| P1-critical | Blocks core functionality, needs immediate attention |
| P2-high | Important, should tackle soon |
| P3-medium | Normal priority, address when time permits |
| P4-low | Nice to have, no rush |

Default priority: P3-medium (if user doesn't specify)

Examples

Example 1: Clear Bug Report

User: "/tg-issue the search filter doesn't work when you select multiple categories"

Response (show preview immediately):

## Issue Preview

**Repository**: tejasgadhia/project-name
**Title**: Search filter fails with multiple category selection
**Labels**: `bug`, `P3-medium`

**Description**:
---
## Problem
Search filter doesn't work correctly when multiple categories are selected.

## Context
Reported during development session.

## Steps to Reproduce
1. Open search
2. Select multiple categories
3. Observe incorrect/no results

## Expected vs Actual
- **Expected**: Results filtered by all selected categories
- **Actual**: Filter fails or returns incorrect results
---

**Create this issue?**

Example 2: Vague Request

User: "/tg-issue fix that animation thing"

Response (ask for clarity):

I want to make sure this issue is useful when you come back to it:

1. **Which animation?** (e.g., "the chart loading animation" or "hover effect on buttons")
2. **What's wrong with it?** (too slow, glitchy, not working at all?)

Example 3: Quick Idea

User: "/tg-issue would be cool to add dark mode"

Response (show preview):

## Issue Preview

**Repository**: tejasgadhia/project-name
**Title**: Add dark mode support
**Labels**: `enhancement`, `P3-medium`

**Description**:
---
## Request
Add dark mode theme option.

## Motivation
Improve user experience with theme preference support.

## Potential Approach
- Add CSS custom properties for theming
- Add theme toggle in UI
- Persist preference in localStorage
---

**Create this issue?**

Error Handling

No git repo:

This directory isn't a git repository. Navigate to a project directory first.

No GitHub remote:

This project doesn't have a GitHub remote configured.

To add one:
1. Create a repo at https://github.com/new
2. Run: git remote add origin https://github.com/tejasgadhia/[repo-name].git

gh CLI not authenticated:

GitHub CLI isn't authenticated. Run:
gh auth login

Then try /tg-issue again.

Label doesn't exist:
Create the label automatically:

gh label create "P3-medium" --description "Normal priority" --color "fbca04" --repo "$REPO" 2>/dev/null || true

Success Criteria

  • Issue created in correct repo
  • Clear, actionable title
  • Appropriate labels applied
  • Enough context to understand later
  • User can continue their work without losing focus

# Supported AI Coding Agents

This skill is compatible with the SKILL.md standard and works with all major AI coding agents:

Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.