Skip to main content

fp-idiomatic-style

Coding style policy for generated code: prefer idiomatic language conventions with a functional-leaning approach (pure-ish functions, composability), and prefer lightweight data structures over heavy schema/class abstractions unless clearly justified.

Ir para a instalação

Informações da origem

Repositório
editor-code-assistant/eca-plugins
Última atividade na origem
10 de março de 2026 às 16:51
Idioma detectado do SKILL.md
inglês
Estrelas
5
Forks
4

Opções de instalação

Por padrão, está selecionado o prompt que primeiro revisa a origem. Você pode mudar para um comando direto ou baixar uma cópia local.

Revise os arquivos de origem

Leia o SKILL.md e os arquivos complementares exibidos pelo SkillsMP antes de decidir se vai instalar.

Exibindo SKILL.md

SKILL.md
Instruções da origem · Visualização somente leitura
name
fp-idiomatic-style
description
Coding style policy for generated code: prefer idiomatic language conventions with a functional-leaning approach (pure-ish functions, composability), and prefer lightweight data structures over heavy schema/class abstractions unless clearly justified.
# Functional-leaning, idiomatic coding style policy Applies whenever you write new code OR propose code changes, in any language. ## Priorities (in order) 1) Correctness and clarity first. 2) Idiomatic for the target language (e.g., Pythonic for Python, idiomatic TS for TypeScript). 3) Functional-leaning style when it fits naturally: - explicit inputs/outputs - minimize side effects and shared mutable state - small composable functions - declarative transformations over imperative loops where readable ## Data modeling preference (important) - Prefer lightweight structures for transient data over heavy class/schema abstractions. - Only introduce richer types when clearly beneficial, e.g.: - validation/invariants are required - long-lived domain objects - meaningful behavior/methods beyond data transport ### Language examples - **Python:** prefer `dict`/`Mapping`/tuples; avoid `dataclasses` or `pydantic` models unless justified. - **TypeScript:** prefer plain objects, interfaces, or type aliases; avoid classes unless justified. - **Clojure:** prefer maps and vectors; avoid records unless justified by polymorphism needs. - **Other languages:** follow the same principle — reach for the lightest idiomatic container first. ## Don't force FP purity - Avoid clever chaining, excessive `map`/`filter`, or recursion if it reduces readability. - Choose the most readable idiomatic solution, then make it functional-leaning where it remains clear. ## When editing existing code - Prefer the smallest change that satisfies requirements. - Preserve local conventions unless they conflict with correctness/security.
Ver no GitHub