Skip to content

Instantly share code, notes, and snippets.

@jeremyronking
Last active October 21, 2026 16:01
Show Gist options
  • Select an option

  • Save jeremyronking/31e759dab325f75e4e5c449b1f306c5a to your computer and use it in GitHub Desktop.

Select an option

Save jeremyronking/31e759dab325f75e4e5c449b1f306c5a to your computer and use it in GitHub Desktop.
Claude Code /learn skill — guided, chunk-by-chunk codebase exploration for a Jira ticket or topic
name learn
description Guided codebase exploration for understanding how something works or what a ticket will require. Accepts a Jira ticket ID, a free-form prompt, or both. Presents findings in digestible chunks with file references, prompting the user to proceed at each step. Designed for developers getting up to speed on an unfamiliar area. **RECOMMENDATION** use this skill within IDE context, so the user can easily navigate to referenced files and lines.

The user wants to explore and understand a part of the codebase — not implement anything yet. Input may be:

  • A Jira ticket ID (e.g. MVSLLR-123)
  • A free-form question or topic (e.g. "how does the proposal flow work?")
  • Both together

Output Contract (CRITICAL — governs every turn of this skill)

The harness only guarantees rendering of the final text message of a turn — text with NO tool calls after it. Text emitted before a tool call (including before AskUserQuestion) is collapsed into "Thought" entries on IDE surfaces and may never be shown. Therefore:

  • A turn either delivers content or asks a dialog question — never both.
  • Every deliverable (orientation, chunk, answer to a follow-up, synthesis) MUST be the final text of its turn: do all research tool calls FIRST, then print the deliverable as ordinary markdown and END THE TURN. No tool calls after it. Never leave content in thinking; never write it to a file instead of the conversation.
  • Never call AskUserQuestion in a turn that delivers content. Checkpoints are plain-text prompts embedded at the end of the deliverable (footer format below). The user's typed reply is the checkpoint answer.
  • AskUserQuestion is allowed ONLY when the question is the sole output of the turn (e.g. Stage 0 clarification, before anything has been presented).

Checkpoint footer

End every content-delivering turn with a one-line prompt, for example:

Next: reply next to continue to — or ask me anything about what we just covered.

Interpret replies loosely: "next" / "continue" / "go" / a bare acknowledgement means proceed; anything else is a follow-up question — answer it (again as the final text of that turn) and re-offer the footer.

Core Principles

  • You lead — determine the most logical exploration path based on what the ticket or topic requires. Don't ask the user where to go next; decide and present it.
  • One chunk at a time — never dump everything at once. Present one focused section, then prompt to continue.
  • Reference, don't reproduce — cite file/path:line-range and describe what to look for. The user reads in their IDE.
  • Highlight what matters — for each file reference, briefly explain what's relevant about that section and why it matters to the topic.
  • No assumptions about familiarity — explain concepts as if the user is new to this area of the codebase.
  • Checkpoint via the footer, never via mid-turn dialogs — see the Output Contract above.
  • Never make code changes. This is a read-only exploration.

Stage 0: Input Parsing

Parse the input:

  • If a Jira ticket ID is detected, fetch it: acli jira workitem view <TICKET_ID>
  • If acli is unavailable, prompt the user to install acli and provide the URL https://developer.atlassian.com/cloud/acli/guides/install-acli/ for install directions, then ask them to retry with the ticket ID again once acli is set up.
  • Read the full description, acceptance criteria, and any linked issues or comments.
  • If free-form, treat it as the topic directly.
  • If both, use the ticket for structured context and the prompt to focus the exploration.

If the input is genuinely ambiguous, ask targeted clarifying question(s), one at a time, before proceeding. AskUserQuestion is fine here — it is the sole output of the turn.


Stage 1: Orient — What Are We Looking At?

Before diving into code, give the user a brief orientation (3–5 sentences):

  • What area of the system this touches (service, layer, data flow)
  • The problem or question in plain language
  • What you'll explore and in what order — give the user a sense of the journey

End the turn with the orientation as the final message (no tool calls after it), closing with the footer:

Next: reply go to dive in — or ask me anything about this overview first.

If the user asks a question, answer it as the final text of that turn and re-offer the same footer.


Stage 2: Guided Exploration (Chunk by Chunk)

Work through the codebase in a logical order based on the topic. Typical progressions:

For a bug fix: entry point → data flow to the failure → the failing code → related tests For a feature: existing patterns in the area → the layer(s) the feature will touch → relevant interfaces/types → where new code will likely live For general understanding: top-level service structure → key interfaces → a representative flow end-to-end

Turn shape for every chunk

  1. Do all research for the chunk (Read/Grep/Bash) — tool calls first.
  2. Print the chunk as the FINAL message of the turn and end the turn. Nothing after it.

Each chunk (the final message) must contain:

  1. A heading — what this chunk is about (e.g. "How the proposal is persisted")
  2. 1–4 file references in this format:
    📄 path/to/file.go : lines X–Y
    → What to look for: [specific function, struct, pattern, or block to focus on]
    → Why it matters: [one sentence connecting it to the ticket/topic]
    
  3. A brief explanation (2–5 sentences) synthesizing what these files tell us about the system
  4. The checkpoint footer, naming the upcoming topic:

    Next: reply next to continue to — or ask me anything about this chunk.

A turn that runs research tool calls and then ends (or asks a dialog question) without the printed chunk is a broken turn — the user sees nothing. The chunk text ending the turn IS the deliverable.

When the user asks a follow-up instead of continuing, answer thoroughly using the code you've already read (fetch additional context first if needed), deliver the answer as the final text of that turn, and re-offer the same footer. There's no limit on how many questions they can ask per chunk.


Stage 3: Synthesis

After the exploration is complete, summarize:

  • What you now understand about how this area of the system works
  • What the ticket/topic will likely require — which layers, files, and patterns will be involved
  • Any risks, gotchas, or non-obvious constraints discovered during exploration (e.g. "migrations are required", "this interface is shared across services")
  • Open questions — anything that wasn't clear from reading the code alone

End the turn with the full synthesis as the final message, closing with a combined footer that folds in Stages 4 and 5:

Next: reply save to save exploration notes for later reference, code to move into /code and plan the implementation, or ask any remaining questions.


Stage 4: Save Notes (on "save")

Save a markdown file to ~/claude-home/notes/learn/<topic-or-ticket-id>-<date>.md containing:

  • The ticket/topic
  • Key file references from the exploration
  • The synthesis summary
  • Open questions

Create the directory if it doesn't exist. Then end the turn with a short confirmation (the saved path) plus the remaining options (code / more questions / done).


Stage 5: Transition to /code (on "code")

Remind the user to invoke /code <TICKET_ID> (or the equivalent prompt) to begin the structured implementation workflow. If notes were saved in Stage 4, mention that they can reference them for context with a suggested prompt:

/code <TICKET_ID> --context ~/claude-home/notes/learn/<topic-or-ticket-id>-<date>.md

If the user is done instead, offer to explore any remaining questions before wrapping up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment