A new Claude Code skill that captures a session's research or investigation into a structured markdown document and publishes it as a private GitHub Gist. Designed to be triggered naturally mid-session with minimal friction.
Needed a way to preserve Claude session findings — investigations, research results, design decisions — into a shareable artifact without manually writing it up. The output should be self-contained enough for a teammate to read cold.
Skill: /capture-context
Workflow:
- Identify scope — if one clear thread, proceeds silently; if multiple threads, lists them and asks which to include; if ambiguous, asks one clarifying question
- Check git state — includes a Code Changes section if files were modified during the session, omits it if not
- Generate doc — structured markdown: TL;DR → Background → Investigation → Findings → Code Changes → Key Decisions → Open Questions → Next Steps → Relevant Files
- Confirm — shows the doc and asks for corrections before publishing
- Visibility — asks private or public, defaults to private
- Publish — creates gist via
gh gist create, returns the URL - Cleanup — removes the temp file after publishing
- Default private — gist is only accessible via link unless user explicitly opts into public
- Self-contained output — doc avoids "as discussed" references; written so anyone can read it cold
- Minimal questioning — only asks when genuinely ambiguous; one clear thread = no questions
~/.claude/skills/capture-context/SKILL.md- https://github.com/alejandrolechuga/skills/tree/main/skills/capture-context