{"id":"34b7b610-8147-4abf-a964-ac7dfedfab3c","shortId":"PeS7Gv","kind":"skill","title":"set-session-context","tagline":">-","description":"# Set Session Context\n\nAutomatically set session name and color based on the current git branch and PR.\n\n## Steps\n\n1. **Detect branch:**\n   ```bash\n   git symbolic-ref --short HEAD\n   ```\n   - If detached HEAD (command fails) → stop, do nothing\n   - If `main` or `master` → stop, do nothing\n\n2. **Look up PR title:**\n   ```bash\n   gh pr view --json title --jq '.title'\n   ```\n\n3. **Determine session name:**\n   - If PR exists → use PR title\n   - If no PR → humanize branch name: strip the conventional prefix and slash/hyphen separator, replace remaining hyphens with spaces\n     - `feat/add-widget` → `add widget`\n     - `fix-login-bug` → `login bug`\n\n4. **Run:** `/rename <session name>`\n\n5. **Determine color** from the branch prefix (match `^(type)[/-]`):\n\n   | Prefix | Color |\n   |---|---|\n   | `feat` | blue |\n   | `fix` | red |\n   | `chore` | green |\n   | `docs` | cyan |\n   | `refactor` | yellow |\n   | `test` | purple |\n   | `ci` | orange |\n   | `build` | orange |\n   | `perf` | yellow |\n   | `style` | cyan |\n   | _(no match)_ | blue |\n\n6. **Run:** `/color <color>`\n\n## Behavior\n\n- Execute silently: do not announce, explain, or narrate what you are doing.\n- Do not ask for confirmation.\n- If `gh` is unavailable or fails, fall back to the humanized branch name.","tags":["set","session","context","skill","issue","paultyng","agent-skills","ai-tools","claude-code","cursor","dotfiles"],"capabilities":["skill","source-paultyng","skill-set-session-context","topic-agent-skills","topic-ai-tools","topic-claude-code","topic-cursor","topic-dotfiles"],"categories":["skill-issue"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/paultyng/skill-issue/set-session-context","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add paultyng/skill-issue","source_repo":"https://github.com/paultyng/skill-issue","install_from":"skills.sh"}},"qualityScore":"0.454","qualityRationale":"deterministic score 0.45 from registry signals: · indexed on github topic:agent-skills · 8 github stars · SKILL.md body (1,273 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-18T19:09:03.127Z","embedding":null,"createdAt":"2026-05-18T13:21:28.167Z","updatedAt":"2026-05-18T19:09:03.127Z","lastSeenAt":"2026-05-18T19:09:03.127Z","tsv":"'/color':137 '/rename':100 '1':23 '2':48 '3':61 '4':98 '5':101 '6':135 'add':90 'announc':143 'ask':153 'automat':8 'back':163 'base':14 'bash':26,53 'behavior':138 'blue':113,134 'branch':19,25,75,106,167 'bug':95,97 'build':126 'chore':116 'ci':124 'color':13,103,111 'command':36 'confirm':155 'context':4,7 'convent':79 'current':17 'cyan':119,131 'detach':34 'detect':24 'determin':62,102 'doc':118 'execut':139 'exist':67 'explain':144 'fail':37,161 'fall':162 'feat':112 'feat/add-widget':89 'fix':93,114 'fix-login-bug':92 'gh':54,157 'git':18,27 'green':117 'head':32,35 'human':74,166 'hyphen':86 'jq':59 'json':57 'login':94,96 'look':49 'main':42 'master':44 'match':108,133 'name':11,64,76,168 'narrat':146 'noth':40,47 'orang':125,127 'perf':128 'pr':21,51,55,66,69,73 'prefix':80,107,110 'purpl':123 'red':115 'ref':30 'refactor':120 'remain':85 'replac':84 'run':99,136 'separ':83 'session':3,6,10,63 'set':2,5,9 'set-session-context':1 'short':31 'silent':140 'skill' 'skill-set-session-context' 'slash/hyphen':82 'source-paultyng' 'space':88 'step':22 'stop':38,45 'strip':77 'style':130 'symbol':29 'symbolic-ref':28 'test':122 'titl':52,58,60,70 'topic-agent-skills' 'topic-ai-tools' 'topic-claude-code' 'topic-cursor' 'topic-dotfiles' 'type':109 'unavail':159 'use':68 'view':56 'widget':91 'yellow':121,129","prices":[{"id":"9354e14f-a2d4-4ed2-b588-582936f7a43c","listingId":"34b7b610-8147-4abf-a964-ac7dfedfab3c","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"paultyng","category":"skill-issue","install_from":"skills.sh"},"createdAt":"2026-05-18T13:21:28.167Z"}],"sources":[{"listingId":"34b7b610-8147-4abf-a964-ac7dfedfab3c","source":"github","sourceId":"paultyng/skill-issue/set-session-context","sourceUrl":"https://github.com/paultyng/skill-issue/tree/main/skills/set-session-context","isPrimary":false,"firstSeenAt":"2026-05-18T13:21:28.167Z","lastSeenAt":"2026-05-18T19:09:03.127Z"}],"details":{"listingId":"34b7b610-8147-4abf-a964-ac7dfedfab3c","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"paultyng","slug":"set-session-context","github":{"repo":"paultyng/skill-issue","stars":8,"topics":["agent-skills","ai-tools","claude-code","cursor","dotfiles"],"license":"mit","html_url":"https://github.com/paultyng/skill-issue","pushed_at":"2026-05-18T18:26:54Z","description":"Personal Claude Code / Cursor agent skills, rules, and config","skill_md_sha":"8cf12a997dcdf48813776781333dfe53921f6a2c","skill_md_path":"skills/set-session-context/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/paultyng/skill-issue/tree/main/skills/set-session-context"},"layout":"multi","source":"github","category":"skill-issue","frontmatter":{"name":"set-session-context","description":">-"},"skills_sh_url":"https://skills.sh/paultyng/skill-issue/set-session-context"},"updatedAt":"2026-05-18T19:09:03.127Z"}}