principle-prefer-pure-functional-patterns
Prefer pure calculations and explicit effects when creating, changing, reviewing, or diagnosing transformations, validators, reducers, pipelines, or state…
Skill by ElmoJones3
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/elmojones3-principle-prefer-pure-functional-patterns
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/principle-prefer-pure-functional-patterns
What's inside
- Skill name
principle-prefer-pure-functional-patterns- Description
- Prefer pure calculations and explicit effects when creating, changing, reviewing, or diagnosing transformations, validators, reducers, pipelines, or state changes. Preserve the domain's command and ownership contracts.
- License
- MIT
- Instructions
- 72 lines in SKILL.md · view on GitHub
Files (5)
- SKILL.md
- openai.yaml · agents/
- go.md · references/
- python.md · references/
- typescript.md · references/
SKILL.md (first lines)
# Prefer pure functional patterns Prefer calculations whose results depend on explicit inputs and which leave caller-owned state unchanged. Keep external effects visible. This principle does not choose the domain's public API, require a functional library, or make every operation a pipeline. ## Separate calculation from ownership Use ordinary functions and the project's existing error convention for calculations and validation. A method may be just as clear as a free function. Compose operations when composition helps the actual caller; fallibility alone does not require currying, a modifier namespace, or a generic result wrapper. Domain objects own their commands, invariants, and consequences. An isolated mutable Edit is a valid authoring mechanism for immutable snapshots. Its commands may update owned working state while leaving the source and retained observations unchanged. Do not replace that API with a parallel set of pure commands. Local mutation of unshared working storage can also implement a pure calculation without repeatedly copying the whole input. Use `domain-modeling` when deciding business behavior. Use the repository's specific domain conventions for construction and transition signatures. ## Make the purity claim precise - Pass decision-sensitive time, configuration, policy, and external facts as inputs. Keep clock reads, identity generation, and I/O in their named owners; do not call an effectful constructor pure because it returns a value. - A copied container can still alias nested storage. Copy what the operation owns or use the other owner's public copying contract. Do not reach into another model's representation to implement a generic deep copy. - Accumulate independent validation problems. Stop dependent work when its prerequisite fails, preserving the project's expected-error vocabulary. - Preserve the failure boundary the operation promises. A rejected command must not leave half its changes or facts behind. In an Edit, that does not imply discarding earlier accepted commands. - Make no-op behavior explicit in the domain contract. Do not manufacture changes or facts for a no-op unless recording the attempt is itself required. ## Keep consequences and delivery distinct The domain computes required consequences along with the change that causes them. Use its existing result, ledger, or pending-event contract. Do not invent `Change`, `EmittingModifier`, or another carrier merely because events exist. In-memory accumulation is not external delivery. It must respect ownership and failure isolation, but need not be replaced by a different return type. Sending to a channel or broker and writing a database are effects that cannot be undone by discarding a calculation or Edit. The application or adapter owns durable settlement and delivery. If state and messages must become durable together, prove that guarantee at the transaction boundary, using the project's delivery mechanism. An in-memory success or receipt alone proves neither persistence nor atomicity. ## Apply only the relevant detail Consult the language reference when language-specific copying, error, or composition choices matter. Ordinary domain work need not load a catalog of functional machinery. - [Go](references/go.md) - [Python](references/python.md) - [TypeScript](references/typescript.md) Use `principle-testing-guidelines` for behavioral proof. Assert actual results, relevant non-mutation, and the promised failure boundary. Test ordering and short-circuiting when they affect the operation. Shared helper laws belong with a helper that is actually used, not in every domain's tests.
From ElmoJones3/opinionated, MIT.
More from ElmoJones3/opinionated
- 0.592score
domain-modeling
ElmoJones3
Make business objects own their behavior, construction, invariants, and consequences.
SkillAFreshness: A★ 1Claude Code +9 - 0.549score
mind-merge
ElmoJones3
Adjudicate long or branching design conversations by maintaining a local graph of open Questions, accepted Decisions, Evidence, dependencies, provenance, and…
SkillBFreshness: B★ 1Claude Code +9 - 0.549score
principle-observe-operations
ElmoJones3
Establish operation ownership and one coherent completion observation when adding or reviewing instrumentation across logs, traces, or metrics.
SkillBFreshness: B★ 1Claude Code +9 - 0.549score
principle-observe-progress
ElmoJones3
Define useful advancement, legitimate waits, and fresh live evidence when instrumenting or reviewing streams, long-running operations, or stall and spin…
SkillBFreshness: B★ 1Claude Code +9 - 0.549score
semantic-mapping
ElmoJones3
Keep project terms and definitions consistent in SEMANTICS.md and SEMANTIC-MAP.md.
SkillBFreshness: B★ 1Claude Code +9 - 0.549score
principle-bound-telemetry
ElmoJones3
Bound collection cost and protect business outcomes when configuring or reviewing telemetry fields, cardinality, queues, exporters, sampling, loss reporting…
SkillBFreshness: B★ 1Claude Code +9 - 0.549score
principle-interpret-observations
ElmoJones3
Preserve evidence meaning when receiving observations, selecting current execution evidence, or calculating operational reports, rates, and coverage.
SkillBFreshness: B★ 1Claude Code +9 - 0.549score
semantic-snapshot
ElmoJones3
Review the recent conversation for settled terminology and decisions, then update semantic files and missing ADRs.
SkillBFreshness: B★ 1Claude Code +9 - 0.549score
principle-always-comment-code
ElmoJones3
Preserve the reason code exists beside every source file, named declaration, and member.
SkillBFreshness: B★ 1Claude Code +9 - 0.549score
principle-code-first-documentation
ElmoJones3
Treat generated OpenAPI and its documentation UI as part of every HTTP boundary.
SkillBFreshness: B★ 1Claude Code +9 - 0.544score
stay-in-your-lane
ElmoJones3
Keep agents inside user-defined scope and authority.
SkillBFreshness: B★ 1Claude Code +9 - 0.544score
principle-sql-preserve-query-cardinality
ElmoJones3
Preserve root selection, child completeness, ordering and bounded query work when implementing or reviewing SQL aggregate reads, filters, joins or pagination.
SkillBFreshness: B★ 1Claude Code +9
Signals
- Stars
- 1
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Sep 10, 2026 (1 month ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/ElmoJones3/opinionated
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from ElmoJones3
- 0.592score
domain-modeling
ElmoJones3
Make business objects own their behavior, construction, invariants, and consequences.
SkillAFreshness: A★ 1Claude Code +9 - 0.549score
principle-observe-progress
ElmoJones3
Define useful advancement, legitimate waits, and fresh live evidence when instrumenting or reviewing streams, long-running operations, or stall and spin…
SkillBFreshness: B★ 1Claude Code +9 - 0.549score
principle-always-comment-code
ElmoJones3
Preserve the reason code exists beside every source file, named declaration, and member.
SkillBFreshness: B★ 1Claude Code +9 - 0.549score
principle-code-first-documentation
ElmoJones3
Treat generated OpenAPI and its documentation UI as part of every HTTP boundary.
SkillBFreshness: B★ 1Claude Code +9 - 0.549score
principle-observe-operations
ElmoJones3
Establish operation ownership and one coherent completion observation when adding or reviewing instrumentation across logs, traces, or metrics.
SkillBFreshness: B★ 1Claude Code +9 - 0.549score
principle-bound-telemetry
ElmoJones3
Bound collection cost and protect business outcomes when configuring or reviewing telemetry fields, cardinality, queues, exporters, sampling, loss reporting…
SkillBFreshness: B★ 1Claude Code +9
Cite this page
principle-prefer-pure-functional-patterns skill. Agent Mart. https://agentmart.dev/skills/elmojones3-principle-prefer-pure-functional-patterns (last updated 2026-10-24)