configuration

Manages runtime configuration, environment variables, and secrets for Spring Boot projects.

Updated Sep 20, 2026
One-click install
npx skills add https://github.com/aascer39/codeagent --skill configuration-aascer39
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: configuration
Source: https://github.com/aascer39/codeagent/tree/main/.agents/skills/configuration
Command: npx skills add https://github.com/aascer39/codeagent --skill configuration-aascer39

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? It prevents configuration drift, hardcoded secrets, and inconsistent environment variables by enforcing a single contract for how .env files, Spring configuration binding, and sensitive values are created, renamed, and deleted. ## Core Features & Use Cases - Configuration Contract Enforcement: Requires every new environment variable to be added to both .env and .env.example, with UPPER_SNAKE_CASE naming and grouped prefixes like AI_, MYSQL_, REDIS_, AGENT_, and MCP_. - Secrets Protection: Prohibits hardcoding API keys, passwords, and tokens in Java code, application.yml, docs, logs, or Git commits, and mandates .env be gitignored while .env.example is committed. - Spring Boot Binding Rules: Standardizes loading .env through the native spring.config.import mechanism with a custom PropertySourceLoader, and prefers @ConfigurationProperties over scattered @Value usage. - Use Case: When adding a new AI embedding endpoint, the Skill guides you to add AI_EMBEDDING_BASE_URL to both env files, bind it via configuration properties, verify no duplicate keys exist, and validate startup. ## Quick Start Ask the AI to add a new environment variable for a third-party service API key following the configuration skill rules.

Frequently Asked Questions about configuration

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a new environment variable to a Spring Boot project?▼

Add the variable to both .env and .env.example using UPPER_SNAKE_CASE naming, then bind it in Java via @ConfigurationProperties or @Value. First search the codebase for an equivalent existing key to avoid duplicates, and verify the app starts correctly.

How to load .env files in Spring Boot without third-party libraries?▼

Declare spring.config.import: optional:file:./.env in application.yaml and register a custom PropertySourceLoader in META-INF/spring.factories that parses KEY=VALUE lines. The optional prefix lets CI and packaged runs skip the file when absent.

Should API keys be stored in application.yml or environment variables?▼

API keys, passwords, and tokens must use environment variables, never application.yml or Java source code. Commit only .env.example with empty or placeholder values, and ensure .env is listed in .gitignore so real secrets never enter Git.

When should a config value not be an environment variable?▼

Constants, business enums, and pure code-logic parameters that never change per environment should stay in configuration files or code. Reserve environment variables for secrets, connection URLs, and values that vary across development, test, and production.

Why is my Spring Boot app not reading values from the .env file?▼

The .env path is resolved relative to the process working directory, so start the app from the project root. Also confirm no test-classpath application.yaml shadows the main config, and that the PropertySourceLoader is registered for the env extension.