Help us improve
Share bugs, ideas, or general feedback.
From first-plan
Extracts git intelligence including activity heatmaps, ownership stats, and in-flight branches/PRs. Use during discovery and project health assessment.
npx claudepluginhub vynazevedo/first-plan --plugin first-planHow this skill is triggered — by the user, by Claude, or both
Slash command
/first-plan:git-intelligenceThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Extração de sinal do git que humanos veem mas IA tipicamente ignora.
Analyzes git history to identify code hotspots, bug magnets, bus factor, team momentum, and recent changes. Use when onboarding to unfamiliar codebases or assessing project health.
Analyzes git history to find code hotspots, temporal coupling between files, contributor knowledge distribution, and bus factor risks. Useful for queries on code ownership, frequent changes, or evolution.
Automates Git repository analysis, branching strategy detection, semantic commit impact analysis, and workflows for commits, branches, and releases.
Share bugs, ideas, or general feedback.
Extração de sinal do git que humanos veem mas IA tipicamente ignora.
Para hashing de arquivos do cache (08-meta/cache.json), preferir o binário first-plan-engine se disponível:
# Detectar engine (igual co-change-analysis)
ENGINE=""
for c in "${CLAUDE_PLUGIN_ROOT}/engine/bin/first-plan-engine" "${HOME}/.local/bin/first-plan-engine" "$(command -v first-plan-engine 2>/dev/null)"; do
[ -x "$c" ] && ENGINE="$c" && break
done
if [ -n "$ENGINE" ]; then
# xxh3 paralelo via rayon - 10x mais rapido que sha256 + bash loop
find . -type f -not -path "./.git/*" -not -path "./node_modules/*" | \
"$ENGINE" hash --paths-from-stdin --output-json .first-plan/cache/files.json
fi
JSON schema first-plan-hash-v1 em 08-meta/cache.json (ou similar).
Comandos git log, git status, git diff podem gerar muito output em repos grandes. Use first-plan-engine compress (ver skill compression-aware) para reduzir tokens em 30-80%:
# Ao invés de:
git log --oneline -n 100
# Use:
first-plan-engine compress --tool git-log --json -- -n 100
# retorna JSON com .output já comprimido
Compressão automática quando engine disponível, fallback graceful sem ele.
Projeto deve ser git repo. Se nao for, todas as seções correlatas em .first-plan/01-topology/activity.md, 01-topology/ownership.md, 07-state/in-flight.md ficam vazias com nota explicativa.
test -d .git || echo "Not a git repo"
git log --since="90 days ago" --name-only --pretty=format: \
| grep -v '^$' \
| sort | uniq -c | sort -rn \
| head -20
Output em .first-plan/01-topology/activity.md na seção "Top 20 arquivos".
git log --since="90 days ago" --name-only --pretty=format: \
| grep -v '^$' \
| xargs -I{} dirname {} \
| sort | uniq -c | sort -rn \
| head -20
Definição: pastas/arquivos com >= 10 commits em 30 dias.
git log --since="30 days ago" --name-only --pretty=format: \
| grep -v '^$' \
| sort | uniq -c \
| awk '$1 >= 10' \
| sort -rn
Pastas sem commits ha > 180 dias.
# Para cada arquivo do projeto:
git log -1 --format="%ad %P" --date=format:"%Y-%m-%d" -- <file>
# Filtrar onde data < (hoje - 180d)
(Aproximação rápida via comparação de timestamps.)
git shortlog -sne --all -- <path>
Pegar o autor com maior contagem para cada pasta principal. Output em 01-topology/ownership.md.
Autores com >= 20% das alterações naquele path. Útil para identificar pares que dominam juntos.
Arquivos modificados por > 10 pessoas sem nenhum com >= 30% das alterações. Marcar em ownership.md como "no clear owner".
Última modificação > 1 ano AND contribuidor original nao apareceu nos últimos 6 meses. Marcar como "orphan" em ownership.md - candidatos a dead code.
git for-each-ref --sort=-committerdate \
--format='%(refname:short) %(committerdate:relative) %(authorname)' \
refs/heads/ refs/remotes/
Para cada branch que nao é main/master:
git rev-list --count <branch>...origin/mainSe MCP github-work disponível:
mcp__github-work__list_pull_requests com state=open
Senão, se gh CLI instalado:
gh pr list --state open --json number,title,author,branch,createdAt,updatedAt
Senão, deixar nota em in-flight.md explicando que PR data nao disponível.
Branches/PRs com sinais explícitos de WIP:
wip, draft, temp, experiment[WIP], [DRAFT], Draft:Listar em 07-state/in-flight.md na seção "WIP detectado".
Se branch X modificou arquivos A,B,C e há feature pedida que provavelmente toca esses arquivos:
01-topology/activity.md01-topology/ownership.md07-state/in-flight.mdEm monorepos grandes, git log pode ser lento. Mitigações:
--since="90 days ago"--diff-filter para ignorar deletes08-meta/cache.json com TTL de 24hOs comandos acima leem dados locais do git. Não exfiltram nada. Se MCP github-work for usado, só leitura também. Não escrever nada externamente.