Automatically cites sources for any code symbol, file, config key, or checkable claim about repository behavior. Applies to nearly every substantive answer.
Ships in sourcerer. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Trigger this on any answer where you:
In practice that's almost every response from this agent - assume it applies unless you're doing pure chit-chat with no claims about the codebase.
Prefer sources in this order when a claim could be supported by more than one:
When sources conflict, the code wins - state the discrepancy rather than smoothing it over.
code-search skill recursively to find sources if you don't have enough information to properly cite them[`AuthService`](url).#L{n}, a multi-line span is #L{start}-L{end} (note the hyphen and the second line number). If your sentence or link text refers to more than one line, the href MUST be the range form - a bare #L{start} for a multi-line claim is wrong. See "Choosing the citation extent" for picking the span.code.grep / code.search return one row per line, each with an authoritative line.number - cite single lines and don't merge separate rows into a range.files.cat / files.head / files.tail / files.read_lines) prefix every returned line with its authoritative 1-indexed line number (grep -n style, <line>:<content>) unless called with show_line_numbers=false - read the number directly off the line you're citing, and off the first and last lines of a block to cite a range.line.number) (see Integrity below).Match the cited span to the scope of the claim - no broader, no narrower. A range and a single line are each precise when they fit the claim; the failure mode is a mismatch, not a wrong choice of shape.
code.grep for a closing pattern - never estimate them. A range is legitimate only when you've read the contiguous block and confirmed its endpoints; stitching a range out of separate code.grep/code.search match rows is not (see the anti-pattern under Examples).#L{start}-L{end} fragment, a single line uses #L{line}. Never state or link a range in the visible text (e.g. lines 939-977) while pointing the href at only its first line: a bare #L{start} silently narrows the citation to one line and contradicts what you wrote.sourcerer.code.* and sourcerer.files.* tool returns a git.host field on each row alongside git.org, git.repo, and git.commit.git.host from the tool output, then look up the matching host section in this skill's referenced content (named sourcerer-code-citations-<git.host>, for example sourcerer-code-citations-github for git.host = "github"). That section holds the exact directory / file / single-line / line-range URL templates for that host.{git.org}, {git.repo}, {git.commit}, {file.path}, {file.directory}, {line.number}, {line.number_start}, {line.number_end}) from the tool output. git.org already includes any provider-specific extra segment (e.g. a project or region) as an org+extra value, so substitute it verbatim.git.host, load it before formatting that citation. Do not guess a host's URL scheme.git.host (see "URL templates" above). Never cite external web pages (blog posts, doc sites, third-party references) - they can't be verified with your tools. If external material genuinely adds value, mention it as external background in prose, not as a citation.line.number is verification; counting or estimating a position from unnumbered text is not.#L{start}-L{end} href (it contains -L). A multi-line claim pointing at a bare #L{start} is the single most common citation error here - fix it before answering.Correct (range for a definition - the common case):
Scores are combined by conflation of probability distributions (calculateCompositeScore) - the claim is about the whole method, so the href carries the full range #L622-L650, not just #L622. Both endpoints were read off numbered tool output, not stitched together from separate code.grep match rows.
Correct (single line for a specific value):
The retry limit defaults to 3 (MAX_RETRIES) - a one-line fact, so a single-line #L42 anchor is exactly right.
Incorrect (missing citation on a checkable claim): The retry limit defaults to 3.
Incorrect (merging separate per-line rows into a range): Citing lines 10-14 as one block when the tool returned five independent single-line rows for 10, 11, 12, 13, 14.
Incorrect (range in the text, single line in the URL):
Link text of lines 939-977 whose href is …/Job.java#L939 - the anchor drops the end of the range and highlights only line 939. It must be …/Job.java#L939-L977.
Correct (documentation-only claim, no code citation manufactured):
The project favors per-ref index isolation for operational simplicity, per the architecture notes in docs/design.md - this is a design-intent claim, not a line-level behavior, so the doc stands alone as the citation.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
5 skills in this plugin
/code-searchUse when you need to find where something is defined, understand how a feature is implemented, or explore an unfamiliar repo. Guides which tools to use and in what order./subagent-orchestrationUse when a request decomposes into multiple independent subtasks that can be worked on separately and combined afterward./ref-resolutionUse any time a branch, tag, or version in the user's question is ambiguous or unspecified - whether at the start of a question or mid-conversation (e.g. when comparing behavior across versions)./sourcerer:code-citationsfrom sourcerer
npx claudepluginhub elastic/sourcerer --plugin sourcererOther plugins' skills for the same job