Skip to content
Back to skills

Effect Config Schema Mepuka Adjunct

ASecurity

Config loading and Schema validation/transform. Use when defining configuration or validating inputs.

  • 666 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added February 8, 2026
toolsbashawsapidocumentation

Works with

  • api
  • mcp

Security analysis

A100/100

Scanned February 12, 2026

npx -y skills add majiayu000/claude-skill-registry --skill effect-config-schema-mepuka-adjunct --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Effect Config Schema Mepuka Adjunct?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Effect Config Schema Mepuka Adjunct
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-effect-config-schema-mepuka-adjunct/badge)](https://www.skillsdirectory.com/skills/majiayu000-effect-config-schema-mepuka-adjunct)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: effect-config-schema
description: Config loading and Schema validation/transform. Use when defining configuration or validating inputs.
allowed-tools: Read, Grep, Glob, Edit, Write, mcp__effect-docs__effect_docs_search
---

# Config & Schema

## When to use
- Validating request bodies, params, or external inputs
- Loading environment configuration with types

## Config (example)
```ts
import { Config } from "effect"

const Server = Config.nested("SERVER")(Config.all({
  host: Config.string("HOST"),
  port: Config.number("PORT")
}))
```

## Schema Validate
```ts
import { Schema as S } from "effect"

const User = S.Struct({ id: S.Number, name: S.String })
const decodeUser = (u: unknown) => S.decodeUnknown(User)(u)
```

## Transform
```ts
const IsoDate = S.String // then transform to Date in pipeline where needed
```

## Real-world snippet: Layer selecting AWS credentials via Config options
```ts
class AwsCredentials extends Effect.Service<AwsCredentials>()("AwsCredentials", {
  effect: Effect.gen(function* () {
    const accessKeys = yield* Config.option(
      Config.all([Config.string("CAP_AWS_ACCESS_KEY"), Config.string("CAP_AWS_SECRET_KEY")])
    )
    const vercelAwsRole = yield* Config.option(Config.string("VERCEL_AWS_ROLE_ARN"))

    const credentials = yield* Effect.gen(function* () {
      if (Option.isSome(vercelAwsRole)) return awsCredentialsProvider({ roleArn: vercelAwsRole.value })
      if (Option.isSome(accessKeys)) {
        const [accessKeyId, secretAccessKey] = accessKeys.value
        return { accessKeyId, secretAccessKey }
      }
      return fromContainerMetadata()
    })

    return { credentials }
  })
})
```

## Guidance
- Prefer schemas close to boundaries; keep core logic typed
- For branded types (Email, PositiveInt), use transform/brand helpers
- Validate early, map to domain errors in one place

## Pitfalls
- Accepting `unknown` into core → always decode first
- Large ad-hoc validation code → centralize in Schema

## Cross-links
- HTTP & Routing for endpoint validation
- Foundations for operator style

## Local Source Reference

**CRITICAL: Search local Effect source before implementing**

The full Effect source code is available at `docs/effect-source/`. Always search the actual implementation before writing Effect code.

### Key Source Files
- Config: `docs/effect-source/effect/src/Config.ts`
- Schema: `docs/effect-source/schema/src/Schema.ts`

### Example Searches
```bash
# Find Config patterns and options
grep -F "Config.string" docs/effect-source/effect/src/Config.ts
grep -F "Config.number" docs/effect-source/effect/src/Config.ts
grep -F "Config.option" docs/effect-source/effect/src/Config.ts

# Study Schema validation
grep -F "Struct" docs/effect-source/schema/src/Schema.ts
grep -F "decodeUnknown" docs/effect-source/schema/src/Schema.ts

# Find Schema transforms
grep -rF "transform" docs/effect-source/schema/src/
grep -rF "brand" docs/effect-source/schema/src/

# Look at Config test examples
grep -F "Config." docs/effect-source/effect/test/Config.test.ts
```

### Workflow
1. Identify the Config or Schema API you need
2. Search `docs/effect-source/effect/src/Config.ts` or `docs/effect-source/schema/src/Schema.ts`
3. Study the types and validation patterns
4. Look at test files for usage examples
5. Write your code based on real implementations

**Real source code > documentation > assumptions**

## References
- Agent Skills overview: https://www.anthropic.com/news/skills
- Skills guide: https://docs.claude.com/en/docs/claude-code/skills

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.