agentsclimarketplace

Set session context

Skill paultyng/skill-issue/skills/set-session-context

Personal Claude Code / Cursor agent skills, rules, and config

Install
npx -y skills add paultyng/skill-issue --skill set-session-context

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 9 stars9 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Use when starting a session on a non-main branch, switching branches (git checkout, git switch), or when a hook prompts for session context update. Also invocable manually via /set-session-context.

SKILL.md

1.5 KB, as published. Nobody here has run it

Set Session Context

Automatically set session name and color based on the current git branch and PR.

Steps

  1. Detect branch:

    git symbolic-ref --short HEAD
    
    • If detached HEAD (command fails) → stop, do nothing
    • If main or master → stop, do nothing
  2. Look up PR title:

    gh pr view --json title --jq '.title'
    
  3. Determine session name:

    • If PR exists → use PR title
    • If no PR → humanize branch name: strip the conventional prefix and slash/hyphen separator, replace remaining hyphens with spaces
      • feat/add-widgetadd widget
      • fix-login-buglogin bug
  4. Run: /rename <session name>

  5. Determine color from the branch prefix (match ^(type)[/-]):

    PrefixColor
    featblue
    fixred
    choregreen
    docscyan
    refactoryellow
    testpurple
    ciorange
    buildorange
    perfyellow
    stylecyan
    (no match)blue
  6. Run: /color <color>

Behavior

  • Execute silently: do not announce, explain, or narrate what you are doing.
  • Do not ask for confirmation.
  • If gh is unavailable or fails, fall back to the humanized branch name.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.