Skip to content

hackbrasil-2026-bora/OiTenta / .agents/skills/shared-validation-rule

shared-validation-rule

Unverified

Cria regras de validação reutilizáveis no pacote compartilhado da aplicação, seguindo o padrão existente de contratos, utilitários, códigos de erro, exports e testes unitários completos.

references/few-shots/email.rule.test.example.ts

View on GitHub
import { EmailRule } from "../../../src/index";

describe("EmailRule", () => {
  test("deve aceitar emails validos", () => {
    const rule = new EmailRule();

    expect(rule.validate("john@doe.com")).toBeNull();
    expect(rule.validate(" john@doe.com ")).toBeNull();
  });

  test("deve reprovar emails invalidos", () => {
    const rule = new EmailRule();

    expect(rule.validate("john@doe")).toBe("invalid.email");
    expect(rule.validate("john doe")).toBe("invalid.email");
    expect(rule.validate(123)).toBe("invalid.email");
  });

  test("deve ignorar valores vazios para permitir campo opcional", () => {
    const rule = new EmailRule();

    expect(rule.validate("")).toBeNull();
    expect(rule.validate("   ")).toBeNull();
    expect(rule.validate(null)).toBeNull();
    expect(rule.validate(undefined)).toBeNull();
  });
});
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 198kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 194kUpdated Claude CodeCodexVerifiedInstall