set-session-context

Configure agent session names and colors from git branch and pull request context.

9|Updated Mar 22, 2026
One-click install
npx skills add https://github.com/paultyng/skill-issue --skill set-session-context
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: set-session-context
Source: https://github.com/paultyng/skill-issue/tree/main/skills/set-session-context
Command: npx skills add https://github.com/paultyng/skill-issue --skill set-session-context

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Manually updating agent session names and colors when switching between git branches is tedious and leads to confusing context when working across multiple features or fixes at once.

Core Features & Use Cases

  • Automatic branch detection: Skips main/master branches and detached HEAD states to only update context for active feature work.
  • PR-aware naming: Uses open pull request titles as session names for clear, descriptive context, with fallback to humanized branch names when no PR exists.
  • Color-coded sessions: Assigns consistent colors to sessions based on branch type (e.g., feat=blue, fix=red) for quick visual identification of active work streams.
  • Use Case: When you switch to a fix/login-bug branch, the skill automatically renames your session to "login bug" and sets the color to red so you can instantly recognize you're working on a bug fix.

Quick Start

Use the set-session-context skill to automatically update your session name and color as soon as you switch to a non-main git branch.

Frequently Asked Questions about set-session-context

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

FAQPage Schema
How do I automatically set session names and colors from git branches?

Automate session context configuration by detecting your current git branch and pull request context, assigning descriptive titles and consistent colors based on branch type to eliminate manual context updates during frequent branch switching.

Does the automatic session context tool work with main and master branches?

No, the automatic session context tool skips main and master branches as well as detached HEAD states, ensuring it only updates session names and colors when you are actively working on a feature or fix branch.

Do I need the GitHub CLI to set session context from pull requests?

Yes, you need the gh CLI installed to look up open pull request titles for session naming. If no matching pull request exists, the tool falls back to humanized branch name parsing.

What is the best way to visually identify active git branch work streams?

Color-coded sessions assigned by branch type provide quick visual identification of active work streams, such as setting the color to red for fix branches and blue for feature branches.

How does session naming work when there is no open pull request for a branch?

When no open pull request exists for a branch, session naming falls back to humanized branch name parsing, converting branch identifiers like fix/login-bug into readable session names such as login bug.

Can I use branch workflow context automation for detached HEAD states?

No, branch workflow context automation explicitly skips detached HEAD states to prevent incorrect session naming, focusing only on recognized feature and fix branches for accurate context updates.