AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Delphi Code Review

skill-delphicleancode-delphi-spec-kit-code-review · by delphicleancode

Delphi code review checklist — quality, security, performance, SOLID, memory

No reviews yet
0 installs
33 views
0.0% view→install

Install

$ agentstack add skill-delphicleancode-delphi-spec-kit-code-review

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-delphicleancode-delphi-spec-kit-code-review)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
6mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Delphi Code Review? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Delphi Code Review — Skill

Quick Checklist

Corretude

  • [ ] Code does what it's supposed to do
  • [ ] Edge cases handled (nil, empty list, zero value)
  • [ ] Error handling implemented with specific exceptions
  • [ ] No obvious bugs

Security

  • [ ] Parameterized SQL queries (without string concatenation)
  • [ ] Validated and sanitized input
  • [ ] No hardcoded credentials or passwords
  • [ ] No SQL injection via Format or concatenation in queries

Performance

  • [ ] No N+1 queries (avoid loop with query inside)
  • [ ] No unnecessary loops
  • [ ] Large objects released as early as possible
  • [ ] TObjectList with OwnsObjects configured correctly

Code Quality

  • [ ] Self-descriptive names following Pascal Guide
  • [ ] DRY — no duplicate code
  • [ ] SOLID — principles respected
  • [ ] Methods ≤ 20 lines
  • [ ] Guard clauses instead of deep nesting

Memory Management

  • [ ] try/finally with Free for temporary objects
  • [ ] Interfaces for automatic reference counting
  • [ ] Assigned() before accessing references that may be nil
  • [ ] Destructor Destroy with override freeing owned fields
  • [ ] No memory leaks in exception paths

Pascal Nomenclature

  • [ ] PascalCase for all identifiers
  • [ ] Prefix T in classes, I in interfaces, E in exceptions
  • [ ] Prefix F in private fields, A in parameters, L in local variables
  • [ ] Units: Projeto.Camada.Dominio.Funcionalidade.pas
  • [ ] Components: 3-letter prefix (btn, edt, lbl, etc.)

Tests

  • [ ] Unit tests for new code
  • [ ] Edge cases tested
  • [ ] Readable and maintainable tests

Documentation

  • [ ] XMLDoc for public methods and properties
  • [ ] Comments in Portuguese when necessary
  • [ ] Do not comment self-explanatory code

Anti-Patterns to Flag

// ❌ Números mágicos
if ACustomer.Age > 18 then

// ✅ Constantes nomeadas
const MINIMUM_AGE = 18;
if ACustomer.Age > MINIMUM_AGE then

// ❌ with statement
with AQuery do begin
  SQL.Text := '...';
  Open;
end;

// ✅ Referência explícita
AQuery.SQL.Text := '...';
AQuery.Open;

// ❌ Catch genérico
except
  on E: Exception do ShowMessage(E.Message);

// ✅ Exceptions específicas
except
  on E: EFDDBEngineException do
    raise EDatabaseException.Create('Falha: ' + E.Message);

// ❌ Logic em OnClick
procedure TfrmMain.btnSaveClick(Sender: TObject);
begin
  // 50 linhas de logic de negócio aqui
end;

// ✅ Delegar para Service
procedure TfrmMain.btnSaveClick(Sender: TObject);
begin
  FService.SaveCustomer(GetFormData);
end;

// ❌ Memory leak
function GetItems: TStringList;
begin
  Result := TStringList.Create;
  LoadItems(Result); // se LoadItems lançar exception, leak!
end;

// ✅ Seguro
function GetItems: TStringList;
begin
  Result := TStringList.Create;
  try
    LoadItems(Result);
  except
    Result.Free;
    raise;
  end;
end;

Review Comments Guide

🔴 BLOQUEANTE: Memory leak — objeto não liberado em caso de exception
🔴 BLOQUEANTE: SQL injection — query usando concatenação de string

🟡 SUGESTÃO: Extrair método — este bloco tem 35 linhas
🟡 SUGESTÃO: Usar interface em vez de classe concreta (DIP)

🟢 NIT: Renomear variável 'S' para nome descritivo
🟢 NIT: Preferir guard clause a nesting

❓ PERGUNTA: O que acontece se ACustomer for nil aqui?
❓ PERGUNTA: Este objeto é liberado por quem?

Specific SOLID Checklist

| Principle | Check | |-----------|-----------| | SRP | Does class have ONE responsibility? Service does not access data? | | OCP | Do new features add classes, not modify existing ones? | | LSP | Does either implementation of the interface work in place of the other? | | ISP | Doesn't interface have methods that implementers don't use? | | DIP | Constructor takes interfaces, not concrete classes? |

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.