backnotprop/pstack

principle-type-system-discipline

Apply when designing types, reviewing a function signature, or writing code in any statically-typed language.

Ver código-fonte

Como usar

  1. Copie o comando e verifique o pacote antes de instalar no seu ambiente de agente.
  2. Consulte no original as ferramentas, credenciais e ambientes necessários.
  3. Descreva os dados de entrada e a entrega esperada; confira a saída com as fontes.
npx skills add https://github.com/backnotprop/pstack --skill principle-type-system-discipline

Antes de começar

  • A instalação não inclui assinatura de modelo, franquia API ou acesso aos seus arquivos.
  • Estrelas e instalações indicam atividade, não um teste independente de qualidade ou segurança.
Documento original do Skill

Renderizado do repositório de origem, preservando títulos, exemplos, código, tabelas, links e imagens.

Type System Discipline

Make the compiler reject impossible states, mismatched primitives, and unhandled variants.

  • Brand semantic primitives. If two arguments share a primitive type but mean different things, give each its own type. Validate once at creation.
  • External data is untyped until parsed. JSON, RPC payloads, CLI args, config, environment variables, and database rows go through a parse function at the boundary that returns the typed model.
  • Derive types from authoritative schemas. When a schema file owns a shape, derive the type from it instead of hand-rolling a parallel one.

For TypeScript syntax, see the typescript-best-practices skill.

do mesmo repositório

Mais Skills

Todos os Skills