code-blame

code-blame is a skill for Claude Code, Codex from Renzo-Tognella/DecisionsSearch. It costs 108 tokens per session (1,829 once invoked), scanned A, original, MIT.

A tool for explaining why a file or group of files has its current contents by connecting file history with pull-request explanations, Git blame, decisions, and rules.

In plain words
What is it for?
Use it to investigate which pull requests changed a file and why those changes were made.
Why use it?
It helps recover the reason behind code changes when the current code or commit history alone is not clear.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to investigate which pull requests changed a file and why those changes were made.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/renzo-tognella/decisionssearch/code-blame
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Renzo-Tognella/DecisionsSearch --skill code-blame
Clone the repo
git clone --depth 1 https://github.com/Renzo-Tognella/DecisionsSearch

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for code-blame

README.md
[![agentmods](https://agentmods.dev/badge/skills/renzo-tognella/decisionssearch/code-blame.svg)](https://agentmods.dev/skills/renzo-tognella/decisionssearch/code-blame)
Your own site
<a href="https://agentmods.dev/skills/renzo-tognella/decisionssearch/code-blame"><img src="https://agentmods.dev/badge/skills/renzo-tognella/decisionssearch/code-blame.svg" alt="Measured on agentmods" height="20"></a>
Per session 108 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,829 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00108 $0.01829
Opus 5 $0.00054 $0.00915
Sonnet 5 $0.00022 $0.00366
Haiku 4.5 $0.00011 $0.00183

Measured 7d ago against content hash e7d4b3a4cb4d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

code-blame scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills-memory/code-blame/SKILL.md · 131 lines

How it starts

The opening of the file, as written. The whole thing — 131 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Code Blame

Você é o blame operacional do código: primeiro encontra os PRs que tocaram exatamente o arquivo; depois reranqueia esses candidatos pela aderência entre a pergunta e o summary/objetivo em prosa do PR. A resposta explica o porquê com evidência e separa o que Git mostra do que PRMemory capturou.

CORE RULE: Busca por arquivo vem antes de busca semântica. O reranking usa o resumo/objetivo do PR, não apenas similaridade de nomes ou scores do primeiro estágio. Granularidade de linha continua sendo responsabilidade do git blame direto.

When to activate

  • Trigger phrases: "por que esse arquivo é assim?", "que PRs mexeram nesse arquivo?", "qual a razão dessa mudança?", "code blame de X"
  • Contexts: investigação da motivação de um arquivo ou conjunto de arquivos cuja história não é óbvia

Do NOT activate for:

  • quem/quando mudou uma linha → use git blame direto
  • evolução de regra de negócio → use rule-blame
  • histórico de decisão arquitetural → use architecture-blame
  • busca aberta na memória → use query-memory

Inputs

  • path (required): arquivo repo-relative; diretório pode ser expandido para seus arquivos. Trecho/linha é aceito, mas o resultado é consolidado por arquivo.
  • question (optional): dúvida específica sobre a motivação; se ausente, usar "por que este arquivo mudou?".

Context load

  • Carregar .decisionssearch/code-patterns.md; um padrão seguido pelo arquivo entra somente como contexto, nunca como conclusão sem evidência.
  • Verificar MCP DecisionsSearch com um memory.query trivial.

Procedure

  1. Normalizar o path — converter para repo-relative; se for diretório, enumerar os arquivos e informar que a resposta agregará os resultados.
  2. Buscar por arquivo primeiro — para cada arquivo, usar memory.pr.query(project, repo, changed_file_contains=path); quando houver pr_number explícito, aplicar o filtro exato antes do texto livre. Conservar cada PR e sua lista completa de changed_files.
  3. Confirmar a cadeia no Git — executar git log --follow --oneline -- e, quando necessário, git blame -L -- para ligar linhas/commits a PRs. Commits sem PRMemory vão para uncaptured_prs, nunca para a cadeia capturada.
  4. Reranquear por resumo e objetivo — ordenar os candidatos recuperados pelo arquivo segundo a aderência da pergunta ao summary, ao objetivo e à narrativa FeatureDescription do PR. Priorizar correspondência de intenção/efeito operacional; não promover um PR apenas porque o título ou o nome do arquivo contém a mesma palavra. Se a pergunta for ampla, usar recência apenas como desempate.
  5. Expandir evidências — para os candidatos do topo, consultar memory.pr.linked_memories/memory.linked_prs e episódios que referenciem o PR ou a regra/decisão. Incluir BusinessRule, ArchitecturalDecision e CodePattern somente quando houver link e evidência concreta. Um padrão isolado permanece apenas como observação do PR.
  6. Fallback controlado — se a busca exata por arquivo retornar zero, mostrar os resultados do Git como não-capturados e fazer uma única busca semântica pelo path + pergunta, claramente rotulada como fallback. Não substituir a busca por arquivo por uma busca ampla silenciosa.
  7. Self-Refine gate — criticar contra:
    • a primeira etapa foi realmente changed_file_contains/Git, antes do reranking?
    • cada razão está sustentada pelo resumo/objetivo, diff, Git, reasoning ou link?
    • PRs sem memória estão separados?
    • a resposta não está respondendo autoria de linha nem inventando um padrão? Refine até todas as respostas serem "sim"; só então apresentar.
  8. Apresentar a cadeia — do mais relevante ao menos relevante, com posição do reranking, resumo/objetivo, todos os arquivos quando úteis, razões sustentadas e lacunas explícitas.

Read the full file on GitHub · 131 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 131 lines · 108 tokens per session scan A e7d4b3a4cb4d

Subscribe to this mod's changes

code-blame is a skill published in the GitHub repository Renzo-Tognella/DecisionsSearch (0 stars, last pushed 14d ago), licensed MIT. It adds 108 tokens to every session and 1,829 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

review-implement-phase

Implements triaged review actions, commits focused fixes, and posts Done plus resolves threads. Use when the user wants only the implementation phase of the review-framework workflow.

prisma/orm · 38 tokens

engram-branch-pr

PR creation workflow for Engram following the issue-first enforcement system. Trigger: When creating a pull request, opening a PR, or preparing changes for review.

Gentleman-Programming/engram · 37 tokens

verify-behavior

Verify or reproduce visible product behavior by driving the real UI with pi-computer-use's checked tools, requiring verified expect postconditions and durable state evidence for meaningful UI flows. Use when triage needs visual reproduction, implementation needs behavioral proof, review needs interactive confirmation…

nicknisi/dotfiles · 68 tokens

github-contributor

End-to-end playbook for shipping high-quality pull requests to open-source projects you don't maintain — discovery, CONTRIBUTING compliance, PR-size check, minimal-diff implementation, PR description with AI-assisted disclosure, conflict resolution, and post-submission maintainer interaction. Use whenever creating…

daymade/claude-code-skills · 133 tokens

revdiff

Review diffs, files, and documents with inline annotations in a TUI overlay, or answer questions about revdiff usage, configuration, themes, and keybindings. Opens revdiff in agterm/tmux/zellij/herdr/kitty/wezterm/cmux/ghostty/iterm2/emacs-vterm, captures annotations, and addresses them. Works in git, hg, and jj repos…

umputun/revdiff · 248 tokens

write-pr

Reference standards for writing pull request titles and descriptions in the tldraw repository, plus the pre-flight comment sweep over the diff. Use as supporting guidance when another skill or workflow needs PR content standards, not as the user-facing create/update PR workflow.

tldraw/tldraw · 53 tokens