configuration-properties-profiles-kotlin-safe
Skill15 starsChanged 9 months agoMITView on GitHub
Design and diagnose Spring configuration, profiles, and `@ConfigurationProperties` binding for Kotlin applications. Use when property binding fails, environment-specific overrides behave unexpectedly, profile layering is confusing, secrets or defaults are modeled unsafely, or Kotlin nullability and constructor binding semantics make configuration errors hard to detect.
1 other project uses a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- JetBrains/skillsedited, first seen Apr 28, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 1
- JetBrains/skills★ 38696% same
Wrote their own version · 0
None found.
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 repository24 other files it gives its agents.
- ci-cd-containerization-advisorSkill
- dependency-conflict-resolverSkill
- domain-decomposition-api-design-advisorSkill
- error-model-validation-architectSkill
- gradle-kotlin-dsl-doctorSkill
- integration-resilience-engineerSkill
- jackson-kotlin-serialization-specialistSkill
- java-kotlin-migration-assistantSkill
- jpa-spring-data-kotlin-mapperSkill
- kotlin-idiomatic-refactorer-spring-awareSkill
- kotlin-spring-proxy-compatibilitySkill
- observability-integratorSkill
- performance-concurrency-advisorSkill
- production-incident-responderSkill
- project-context-ingestionSkill
- schema-migration-plannerSkill
- spring-context-di-reasoningSkill
- spring-kotlin-code-reviewSkill
- spring-mvc-webflux-api-builderSkill
- spring-security-configurator-auditorSkill
- stacktrace-log-triageSkill
- test-suite-builderSkill
- transaction-consistency-designerSkill
- upgrade-breaking-change-navigatorSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
22 rules. About 0 are common, 21 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈21
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 13
Treat configuration as typed application input, not as unstructured text.
- Distinctive: line 31
Verify prefix mapping and key shape.
- Distinctive: line 32
Verify constructor binding, defaults, and nullability.
- Distinctive: line 33
Verify collection, map, nested object, duration, and data-size binding.
- Distinctive: line 34
Verify profile activation and profile merge behavior.
- Distinctive: line 35
Verify whether the bug exists only in tests or only in deployment templates.
- Distinctive: line 40
Use defaults only when the default is semantically safe, not merely convenient.
- Distinctive: line 41
Use nullable only when the application can handle absence explicitly.
- Distinctive: line 42
Keep properties classes small and focused by feature or external dependency.
- Very specific: line 43
Prefer type-safe wrappers such as Duration, URI, or enums when they clarify the contract.
- Distinctive: line 53
Test overrides can mask missing production defaults if tests define properties more generously than runtime.
- Distinctive: line 66
Prefer one typed configuration class per external dependency or feature slice.
- Distinctive: line 67
When the same property is set in several layers, document the intended owner.
- Distinctive: line 68
If a config issue appears only after deploy, compare rendered manifests or effective environment variables before editing Kotlin classes.
- Distinctive: line 69
If startup must fail on bad config, prove that with a test or smoke check.
- Distinctive: line 74
Keep secrets out of committed config examples unless obviously fake and explicitly marked.
- Distinctive: line 76
Prefer one source of truth for a property family.
- Distinctive: line 91
Do not hardcode secrets.
- Distinctive: line 92
Do not default required credentials to empty strings.
- Distinctive: line 93
Do not use nullable everywhere just to make the binder happy.
- Distinctive: line 94
Do not assume profile-specific files replace base config wholesale.
- Distinctive: line 95
Do not fix a binding symptom while ignoring the underlying precedence or environment problem.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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 Properties Profiles Kotlin Safe
Source mapping: Tier 2 high-value skill derived from Kotlin_Spring_Developer_Pipeline.md (SK-16).
Mission
Make configuration predictable across local, test, staging, and production environments. Treat configuration as typed application input, not as unstructured text.
Read First
application.yml,application.properties, and profile-specific files.@ConfigurationPropertiesclasses and how they are registered.- Environment variable names, Helm values, Config Server or Vault usage, and test overrides.
- Active profile configuration and profile groups.
- Any custom converters, property placeholders, or late-bound secret conventions.
Diagnose In This Order
- Verify source precedence:
- default config file
- profile-specific file
- environment variables
SPRING_APPLICATION_JSON- external config systems
- Verify prefix mapping and key shape.
- Verify constructor binding, defaults, and nullability.
- Verify collection, map, nested object, duration, and data-size binding.
- Verify profile activation and profile merge behavior.
- Verify whether the bug exists only in tests or only in deployment templates.
Kotlin-Safe Modeling Rules
- Model genuinely required properties as required constructor parameters or validated fields.
- Use defaults only when the default is semantically safe, not merely convenient.
- Use nullable only when the application can handle absence explicitly.
- Keep properties classes small and focused by feature or external dependency.
- Prefer type-safe wrappers such as
Duration,URI, or enums when they clarify the contract.
Advanced Configuration Traps
- Profile files merge; they do not behave like full replacement documents. Partial overrides can leave stale sibling values in place.
- Empty string is not the same as missing value. Many runtime failures come from "configured but blank" secrets.
- Nested objects can be partially bound, which may produce a shape that looks non-null but is still semantically invalid.
- Environment-variable translation from
kebab-caseto uppercase underscore is easy to misread, especially for nested maps and lists. ignoreUnknownFieldsor overly permissive binding can hide deployment drift.- A property that fails only in one environment may really be a templating or secret-injection problem, not a Spring binding problem.
- Test overrides can mask missing production defaults if tests define properties more generously than runtime.
- Dynamic refresh or cloud config introduces lifecycle questions: startup validation alone may not be enough if config can change after boot.
Spring Config Data Nuances
spring.config.import, profile groups, andspring.config.activate.on-profilecan reshape the final config graph in ways that are not obvious from file names alone.- List replacement and map merge behavior differ. A partial override may replace a whole list while only merging a map subtree.
- Placeholder resolution timing matters. A property can appear bound yet still fail later if it depends on an unavailable placeholder or secret source.
- Deprecating or renaming configuration keys is a migration problem. If compatibility matters, plan aliases or a staged rollout instead of a hard rename.
- Overusing
@Profileon beans can make environment behavior harder to reason about than using one typed configuration model with feature flags or explicit toggles.
Expert Heuristics
- Prefer one typed configuration class per external dependency or feature slice. Giant omnibus config classes become impossible to validate and evolve safely.
- When the same property is set in several layers, document the intended owner. Hidden "last writer wins" behavior becomes operational debt fast.
- If a config issue appears only after deploy, compare rendered manifests or effective environment variables before editing Kotlin classes.
- If startup must fail on bad config, prove that with a test or smoke check. Teams often think they fail fast when they actually fail on first traffic.
Design Rules
- Validate required configuration at startup whenever possible.
- Keep secrets out of committed config examples unless obviously fake and explicitly marked.
- Model profile intent explicitly: local developer convenience, test isolation, operational environments, and feature toggles are different concerns.
- Prefer one source of truth for a property family. Duplicated definitions across profiles create drift fast.
Output Contract
Return these sections:
Binding model: how the properties should be represented in Kotlin.Source precedence: where the effective value should come from.Root cause: exact mismatch in key, type, profile, or source.Minimal fix: the smallest safe file, code, or env change.Startup validation: what must fail fast at boot.Verification: how to prove the resolved config in the target environment.
Guardrails
- Do not hardcode secrets.
- Do not default required credentials to empty strings.
- Do not use nullable everywhere just to make the binder happy.
- Do not assume profile-specific files replace base config wholesale.
- Do not fix a binding symptom while ignoring the underlying precedence or environment problem.
Quality Bar
A good run of this skill leaves the configuration model easier to reason about across environments. A bad run "fixes" one YAML key while leaving nullability, precedence, and startup validation ambiguous.
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.

