configuration
Skill8 starsChanged 9 months agoMITView on GitHub
This skill should be used when the user asks about "Effect Config", "environment variables", "configuration management", "Config.string", "Config.number", "ConfigProvider", "Config.nested", "Config.withDefault", "Config.redacted", "sensitive values", "config validation", "loading config from JSON", "config schema", or needs to understand how Effect handles application configuration.
- Reads credentials
6 other projects use a version of this.
Adopted by
Most recently taken up by
- msrv-tech/skillstheir own version, first seen Oct 2, 2026
- wachterjohannes/symfony-skillstheir own version, first seen Sep 3, 2026
- codewithmukesh/dotnet-claude-kittheir own version, first seen Jul 22, 2026
- alfredxw/denovatheir own version, first seen Jul 15, 2026
- junhjang/claude-harnesstheir own version, first seen May 12, 2026
- ajshedivy/ibmi-agent-skillstheir own version, first seen Mar 15, 2026
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 6
- alfredxw/denova★ 865same name
- codewithmukesh/dotnet-claude-kit★ 750same name
- msrv-tech/skills★ 57same name
- ajshedivy/ibmi-agent-skills★ 4same name
- wachterjohannes/symfony-skills★ 4same name
- junhjang/claude-harness★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository23 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- references/llms-full.txtllms.txt
- api-doc-lookupSkill
- batching-cachingSkill
- code-styleSkill
- concurrencySkill
- data-typesSkill
- effect-aiSkill
- effect-coreSkill
- error-managementSkill
- ObservabilitySkill
- pattern-matchingSkill
- platformSkill
- requirementsSkill
- resourcesSkill
- runtimeSkill
- schedulingSkill
- schemaSkill
- sinksSkill
- stateSkill
- streamsSkill
- testingSkill
- traitsSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 4 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 15
Default values and composition
- Distinctive: line 94
Use Effect Schema for complex validation:
- Distinctive: line 301
Use Config.withDefault for optional values: - Avoid runtime errors
- Distinctive: line 311
Search for these sections:
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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
Configuration in Effect
Overview
Effect provides type-safe configuration loading with:
- Automatic environment variable reading
- Validation and type conversion
- Default values and composition
- Sensitive value handling
- Multiple config sources (env, JSON, custom)
Basic Configuration Types
import { Config, Effect } from "effect";
const host = Config.string("HOST");
const port = Config.number("PORT");
const debug = Config.boolean("DEBUG");
const maxConnections = Config.integer("MAX_CONNECTIONS");Using Config in Effects
const program = Effect.gen(function* () {
const host = yield* Config.string("DATABASE_HOST");
const port = yield* Config.number("DATABASE_PORT");
return { host, port };
});
// Runs and reads from environment
await Effect.runPromise(program);Default Values
const port = Config.number("PORT").pipe(Config.withDefault(3000));
const debug = Config.boolean("DEBUG").pipe(Config.withDefault(false));Optional Configuration
const apiKey = Config.string("API_KEY").pipe(Config.option);
// Type: Effect<Option<string>>Combining Configurations
Using Config.all
const dbConfig = Config.all({
host: Config.string("DB_HOST"),
port: Config.number("DB_PORT"),
database: Config.string("DB_NAME"),
maxConnections: Config.number("DB_MAX_CONN").pipe(Config.withDefault(10)),
});
const program = Effect.gen(function* () {
const config = yield* dbConfig;
// config: { host: string, port: number, database: string, maxConnections: number }
});Nested Configurations
const dbConfig = Config.nested("DB")(
Config.all({
host: Config.string("HOST"), // Reads DB_HOST
port: Config.number("PORT"), // Reads DB_PORT
name: Config.string("NAME"), // Reads DB_NAME
}),
);Config with Schema Validation
Use Effect Schema for complex validation:
import { Config, Schema } from "effect";
const PortSchema = Schema.Number.pipe(Schema.int(), Schema.between(1, 65535));
const port = Config.number("PORT").pipe(
Config.mapOrFail((n) =>
Schema.decodeUnknownEither(PortSchema)(n).pipe(
Either.mapLeft((e) => ConfigError.InvalidData([], `Invalid port: ${n}`)),
),
),
);Handling Sensitive Values
Config.redacted
Prevents accidental logging of sensitive values:
const apiKey = Config.redacted("API_KEY");
// Type: Effect<Redacted<string>>
const program = Effect.gen(function* () {
const key = yield* apiKey;
// Safe to log - shows "<redacted>"
yield* Effect.log(`Key: ${key}`);
// Get actual value when needed
const actual = Redacted.value(key);
});Secret Type
const dbPassword = Config.secret("DB_PASSWORD");
// Type: Effect<Secret.Secret>
const program = Effect.gen(function* () {
const password = yield* dbPassword;
const value = Secret.value(password); // Get actual string
});Config Operators
Transforming Values
const upperHost = Config.string("HOST").pipe(Config.map((s) => s.toUpperCase()));
const port = Config.string("PORT").pipe(
Config.mapOrFail((s) => {
const n = parseInt(s);
return isNaN(n) ? Either.left(ConfigError.InvalidData([], "Not a number")) : Either.right(n);
}),
);Fallback Values
const host = Config.string("PRIMARY_HOST").pipe(
Config.orElse(() => Config.string("SECONDARY_HOST")),
Config.orElse(() => Config.succeed("localhost")),
);Custom Config Providers
From Environment (Default)
const program = Effect.gen(function* () {
const host = yield* Config.string("HOST");
});From JSON/Object
import { ConfigProvider, Layer } from "effect";
const config = {
host: "localhost",
port: "3000",
database: {
host: "db.example.com",
port: "5432",
},
};
const JsonConfigProvider = ConfigProvider.fromJson(config);
const program = Effect.gen(function* () {
const host = yield* Config.string("host");
const dbHost = yield* Config.nested("database")(Config.string("host"));
});
const runnable = program.pipe(Effect.provide(Layer.setConfigProvider(JsonConfigProvider)));From Map
const MapProvider = ConfigProvider.fromMap(
new Map([
["HOST", "localhost"],
["PORT", "3000"],
]),
);Combining Providers
const CombinedProvider = ConfigProvider.orElse(ConfigProvider.fromEnv(), () => ConfigProvider.fromJson(defaultConfig));Config in Layers
const AppConfigLive = Layer.effect(
AppConfig,
Effect.gen(function* () {
const host = yield* Config.string("HOST");
const port = yield* Config.number("PORT");
const debug = yield* Config.boolean("DEBUG").pipe(Config.withDefault(false));
return { host, port, debug };
}),
);Testing Configuration
Mock Config Provider
const TestConfigProvider = ConfigProvider.fromMap(
new Map([
["HOST", "test-host"],
["PORT", "9999"],
]),
);
const testProgram = program.pipe(Effect.provide(Layer.setConfigProvider(TestConfigProvider)));Config.succeed for Hardcoded
const testConfig = Config.succeed({
host: "localhost",
port: 3000,
});Error Handling
Config failures produce ConfigError:
const program = Effect.gen(function* () {
const host = yield* Config.string("REQUIRED_HOST");
}).pipe(Effect.catchTag("ConfigError", (error) => Effect.fail(new StartupError({ cause: error }))));Complete Example
import { Config, Effect, Layer, Schema } from "effect";
// Define config shape
const AppConfig = Config.all({
server: Config.nested("SERVER")(
Config.all({
host: Config.string("HOST").pipe(Config.withDefault("0.0.0.0")),
port: Config.number("PORT").pipe(Config.withDefault(3000)),
}),
),
database: Config.nested("DATABASE")(
Config.all({
url: Config.redacted("URL"),
maxConnections: Config.number("MAX_CONN").pipe(Config.withDefault(10)),
}),
),
features: Config.all({
debug: Config.boolean("DEBUG").pipe(Config.withDefault(false)),
metrics: Config.boolean("METRICS_ENABLED").pipe(Config.withDefault(true)),
}),
});
// Use in application
const program = Effect.gen(function* () {
const config = yield* AppConfig;
yield* Effect.log(`Starting server on ${config.server.host}:${config.server.port}`);
});Best Practices
- Use Config.withDefault for optional values - Avoid runtime errors
- Use Config.redacted for secrets - Prevents accidental logging
- Use Config.nested for structure - Organizes related config
- Validate with Schema - Catch invalid config early
- Test with mock providers - Deterministic tests
Additional Resources
For comprehensive configuration documentation, consult ${CLAUDE_PLUGIN_ROOT}/references/llms-full.txt.
Search for these sections:
- "Configuration" for full API reference
- "ConfigProvider" for custom providers
- "Handling Sensitive Values" for security
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.

