effect-principles
Skill1 starsChanged 56 days agoApache-2.0View on GitHub
Apply the Effect way of reasoning in codebases that do not use Effect, in any programming language. Use when editing or reviewing non-Effect code so dependencies, failures, state, boundaries, resources, time, and workflows stay explicit without adding Effect-shaped architecture or broader scope.
In this repository51 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agentic-workflowsSkill
- asking-questionsSkill
- branch-context-consumerSkill
- broSkill
- browser-accessSkill
- browser-controlSkill
- changeset-scopeSkill
- check-skill-updatesSkill
- chillSkill
- cleanup-unnecessary-variablesSkill
- code-reviewSkill
- decision-modelsSkill
- diagnoseSkill
- evidence-firstSkill
- gh-stackSkill
- git-contextSkill
- github-development-rulesetsSkill
- github-repository-setupSkill
- grillingSkill
- handoffSkill
- herdr-workflowsSkill
- home-assistant-frontendSkill
- home-assistant-lazy-contextSkill
- home-assistant-list-componentsSkill
- home-assistant-lit-renderingSkill
- human-step-guideSkill
- import-external-skillSkill
- lit-renderingSkill
- maintain-docsSkill
- opencode-effectSkill
- pitchfork-dev-serversSkill
- pkexec-rootSkill
- planSkill
- release-oxlint-rulesSkill
- remove-single-use-functionsSkill
- researchSkill
- retroSkill
- safe-process-signalsSkill
- session-coordinationSkill
- shared-workflowsSkill
- show-meSkill
- skill-prefixesSkill
- staged-implementationSkill
- task-focusSkill
- testingSkill
- to-questionnaireSkill
- types-enforce-tsSkill
- wranglerSkill
- writing-dot-skillsSkill
- writing-styleSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
23 rules. About 0 are common, 22 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈22
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 9
Use the discipline behind Effect's APIs, not Effect's APIs themselves.
- Distinctive: line 18
when working from a branch, diff, pull request, or injected work scope, is directly required by those changes.
- Distinctive: line 20
does not add Effect, an Effect substitute, a dependency container, a generic result type, or a new architectural layer.
- Distinctive: line 21
does not increase conceptual surface area, indirection, or the amount a reader must learn.
- Distinctive: line 40
Keep ambient framework state where the framework owns it.
- Distinctive: line 41
Do not create an interface for a single concrete value unless a real boundary or existing test seam already calls for one.
- Distinctive: line 45
Prefer the repository's existing sum types, tagged variants, enums, constrained value types, schemas, guards, and state machines.
- Distinctive: line 47
Add a new model only when it removes at least as much branching or ambiguity as it introduces.
- Distinctive: line 52
Use the codebase's existing error mechanism: exceptions, rejected promises, error classes, status objects, or established result types.
- Distinctive: line 58
Keep sequencing, cleanup, cancellation, retry limits, and ownership visible in the function that controls them.
- Distinctive: line 59
Prefer native and existing primitives for cleanup, cancellation, lifecycle, queues, asynchronous work, and scheduling.
- Distinctive: line 60
Do not build generic pipeline, schedule, scope, or resource helpers for one workflow.
- Distinctive: line 65
Keep one-off logic inline when extraction would create a shallow helper or split a readable operation.
- Distinctive: line 66
Keep transport and framework adapters thin when an existing domain or application function already owns the rule.
- Distinctive: line 71
Prefer deterministic synchronization already available in the project over arbitrary sleeps.
- Distinctive: line 72
Add retry, caching, batching, or background work only when required by the task and supported by the operation's real semantics.
- Distinctive: line 76
Use this to recognise Effect's intent without reproducing its API surface:
- Very specific: line 91
Do not add Effect or recreate Effect, Layer, Context, Exit, Cause, Option, or Either under local names.
- Distinctive: line 92
Do not replace the language's ordinary async, exception, optional-value, or framework-state patterns project-wide.
- Distinctive: line 93
Do not add wrappers that only rename a platform or library API.
- Distinctive: line 94
Do not turn local implementation details into public contracts.
- Distinctive: line 95
Do not widen a focused fix into a domain-model, service, validation, or error-handling migration.
- Distinctive: line 96
Do not claim a change is safer when its new ceremony obscures the control flow.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Effect Principles Without Effect
Use the discipline behind Effect's APIs, not Effect's APIs themselves. Express it through the current language's native features and the repository's existing conventions, dependencies, and architecture.
For any bounded task, follow changeset-scope; this skill supplies engineering criteria but never expands investigation, finding, or edit scope.
Hard Gate
Apply a principle only when the resulting change:
- stays inside the scope and amount of change the user requested;
- when working from a branch, diff, pull request, or injected work scope, is directly required by those changes;
- uses existing language or repository constructs;
- does not add Effect, an Effect substitute, a dependency container, a generic result type, or a new architectural layer;
- does not increase conceptual surface area, indirection, or the amount a reader must learn;
- is at least as readable as the code it replaces.
The user's guidance on how much to change is authoritative. Do not treat this skill as permission to improve nearby code. If meeting a principle requires more files, callers, wrappers, types, helpers, or abstractions than the scoped behaviour requires, keep the existing design. Report a larger opportunity separately only when the user asked for architectural advice.
Workflow
- Establish the boundary with
changeset-scope, then read the nearest project guidance and enough surrounding code to understand it. - Identify only the concrete ambiguities introduced, modified, or exposed by that scope: untrusted input, implicit dependencies, expected failures, invalid states, uncontrolled side effects, retry policy, resource lifetime, or concurrent workflows.
- Find the smallest existing seams that own them. Prefer function signatures, local unions, existing interfaces, adapters, parsers, platform primitives, or framework lifecycles already in use.
- Tighten the relevant seams together when scoped behaviour crosses them. Change callers outside the original files only when required to keep that behaviour correct; do not propagate the pattern further.
- Compare the result against the hard gate. Revert the idea if it adds more ceremony than truth.
- Apply
testingand run the smallest reliable verification that proves the changed contract. Add tests when they protect important behaviour or catch a meaningful failure that existing checks miss.
Principles
Make requirements visible
- Pass a dependency as an existing parameter or constructor field when the caller already chooses it.
- Keep ambient framework state where the framework owns it; do not introduce dependency injection merely to imitate Effect context.
- Do not create an interface for a single concrete value unless a real boundary or existing test seam already calls for one.
Make invalid states harder to express
- Prefer the repository's existing sum types, tagged variants, enums, constrained value types, schemas, guards, and state machines.
- Narrow broad or nullable values at the boundary instead of scattering casts and checks through consumers.
- Add a new model only when it removes at least as much branching or ambiguity as it introduces.
Treat failures according to their contract
- Distinguish expected failures only when callers handle them differently.
- Use the codebase's existing error mechanism: exceptions, rejected promises, error classes, status objects, or established result types.
- Preserve unexpected defects and context. Do not catch, wrap, or convert every failure for uniformity.
- Recover, retry, or fall back only at the boundary that can make a truthful decision.
Keep workflows explicit
- Keep sequencing, cleanup, cancellation, retry limits, and ownership visible in the function that controls them.
- Prefer native and existing primitives for cleanup, cancellation, lifecycle, queues, asynchronous work, and scheduling.
- Do not build generic pipeline, schedule, scope, or resource helpers for one workflow.
Keep pure decisions separate from effects when natural
- Extract a pure decision only when it has a clear name, removes duplication, or can be understood independently.
- Keep one-off logic inline when extraction would create a shallow helper or split a readable operation.
- Keep transport and framework adapters thin when an existing domain or application function already owns the rule; do not create that layering solely for symmetry.
Make concurrency and time deliberate
- State whether work is sequential, concurrent, cancellable, retried, or best-effort when the behaviour matters.
- Prefer deterministic synchronization already available in the project over arbitrary sleeps.
- Add retry, caching, batching, or background work only when required by the task and supported by the operation's real semantics.
Translation Guide
Use this to recognise Effect's intent without reproducing its API surface:
| Effect discipline | Non-Effect expression |
| Requirements in the environment | Existing parameters, constructor fields, context, or framework injection |
| Typed error channel | Existing distinguishable expected-error contract |
| Schema at boundaries | Existing parser, validator, guard, schema library, or explicit narrowing |
| Tagged state | Existing sum type, tagged variant, enum, or state machine |
| Scoped resources | Existing lifecycle, cleanup construct, disposal, or cancellation handling |
| Schedule | Existing bounded retry or timing policy near the owning operation |
| Structured concurrency | Owned promises/tasks with explicit cancellation and joining |
| Service and Layer | Existing interface and composition root, but only when both already have a reason to exist |
Do Nots
- Do not add Effect or recreate
Effect,Layer,Context,Exit,Cause,Option, orEitherunder local names. - Do not replace the language's ordinary async, exception, optional-value, or framework-state patterns project-wide.
- Do not add wrappers that only rename a platform or library API.
- Do not turn local implementation details into public contracts.
- Do not widen a focused fix into a domain-model, service, validation, or error-handling migration.
- Do not claim a change is safer when its new ceremony obscures the control flow.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

