contribute-kb

contribute-kb is a command for Claude Code from adrianosantostreina/delphi-dev. It costs 65 tokens per session (676 once invoked), scanned A, original, MIT.

A command for packaging local Delphi project learnings and proposing them to the plugin's shared knowledge base on GitHub. GitHub is a service for storing and reviewing code changes.

In plain words
What is it for?
Use it to find recent files in knowledge/local/, preview their content, sanitize paths and personal or business data, commit the result, and open a pull request.
Why use it?
It provides a review step and removes sensitive details before sharing selected learnings with the wider community.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the delphi-dev plugin — 15 skills, 10 commands, 4 agents shipped together

Good fit Use it to find recent files in knowledge/local/, preview their content, sanitize paths and personal or business data, commit the result, and open a pull request.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/adrianosantostreina/delphi-dev/contribute-kb
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.

Clone the repo
git clone --depth 1 https://github.com/adrianosantostreina/delphi-dev

Made for: Claude Code.

Or install delphi-dev, the plugin that ships this one along with the rest of its 15 skills, 10 commands, 4 agents.

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 contribute-kb

README.md
[![agentmods](https://agentmods.dev/badge/commands/adrianosantostreina/delphi-dev/contribute-kb.svg)](https://agentmods.dev/commands/adrianosantostreina/delphi-dev/contribute-kb)
Your own site
<a href="https://agentmods.dev/commands/adrianosantostreina/delphi-dev/contribute-kb"><img src="https://agentmods.dev/badge/commands/adrianosantostreina/delphi-dev/contribute-kb.svg" alt="Measured on agentmods" height="20"></a>
Per session 65 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 676 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.00065 $0.00676
Opus 5 $0.00032 $0.00338
Sonnet 5 $0.00013 $0.00135
Haiku 4.5 $0.00006 $0.00068

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

Security

Grade A, and why

contribute-kb 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 8d 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.

commands/contribute-kb.md · 68 lines

How it starts

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

Idioma de saída

Detecte o idioma da primeira mensagem do usuário. Padrão: pt-BR. Honor: "respond in English" → en-US.

O que este comando faz

Coleta os arquivos de knowledge/local/ gerados pelos hooks nas últimas sessões, sanitiza dados sensíveis e abre um Pull Request no repositório GitHub do plugin para que o autor possa revisar e mesclar o conhecimento com a base comunitária.

Fluxo

pt-BR

  1. Verificar se há arquivos em knowledge/local/ nos últimos 30 dias

    • Se vazio: informar que não há aprendizados para contribuir e sugerir usar o plugin em mais sessões Delphi
    • Se houver arquivos: listar os arquivos encontrados com data e número de chunks
  2. Mostrar preview dos primeiros 3 chunks de cada arquivo e perguntar: "Quer contribuir estes X aprendizados para a base de conhecimento comunitária? (s/n)"

  3. Se confirmado:

    • Sanitizar: remover paths absolutos do usuário, substituir por ~/...
    • Remover qualquer nome de empresa, CPF, CNPJ, IP de produção (regex)
    • Copiar arquivos sanitizados para knowledge/community/YYYY-MM-DD-contrib-{hash}.md
    • Commitar a mudança
    • Abrir PR via gh pr create:
      Título: kb: add community learnings ({N} chunks, {date})
      Body: Contribuição automática via /contribute-kb. Revisar antes de mesclar.
      
  4. Exibir URL do PR criado

  5. Edge case — knowledge/local/ vazio: pt-BR: "Não encontrei aprendizados recentes para contribuir. Continue usando o plugin em sessões Delphi — os hooks capturam automaticamente o que você aprende." en-US: "No recent learnings found to contribute. Keep using the plugin in Delphi sessions — hooks automatically capture what you learn."

en-US

  1. Check for files in knowledge/local/ from the last 30 days

    • If empty: inform user and suggest more Delphi sessions
    • If files exist: list them with date and chunk count
  2. Show preview of first 3 chunks per file and ask: "Contribute these X learnings to the community knowledge base? (y/n)"

Read the full file on GitHub · 68 lines

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. 8d ago First seen · 68 lines · 65 tokens per session scan A a5c91d57341a

Subscribe to this mod's changes

contribute-kb is a command published in the GitHub repository adrianosantostreina/delphi-dev (79 stars, last pushed 4d ago), licensed MIT. It adds 65 tokens to every session and 676 once invoked, about $0.0003 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-30.