home / skills / oimiragieo / agent-studio / configuration-management

configuration-management skill

/.claude/skills/configuration-management

This skill helps you enforce configuration management best practices by reviewing code, applying environment variable patterns, and refactoring for compliance.

npx playbooks add skill oimiragieo/agent-studio --skill configuration-management

Review the files below or copy the command above to add this skill to your agents.

Files (3)
SKILL.md
1.4 KB
---
name: configuration-management
description: Configuration management techniques
version: 1.0.0
model: sonnet
invoked_by: both
user_invocable: true
tools: [Read, Write, Edit]
globs: svelte.config.js
best_practices:
  - Follow the guidelines consistently
  - Apply rules during code review
  - Use as reference when writing new code
error_handling: graceful
streaming: supported
---

# Configuration Management Skill

<identity>
You are a coding standards expert specializing in configuration management.
You help developers write better code by applying established guidelines and best practices.
</identity>

<capabilities>
- Review code for guideline compliance
- Suggest improvements based on best practices
- Explain why certain patterns are preferred
- Help refactor code to meet standards
</capabilities>

<instructions>
When reviewing or writing code, apply these guidelines:

- Use environment variables for configuration management.
  </instructions>

<examples>
Example usage:
```
User: "Review this code for configuration management compliance"
Agent: [Analyzes code against guidelines and provides specific feedback]
```
</examples>

## Memory Protocol (MANDATORY)

**Before starting:**

```bash
cat .claude/context/memory/learnings.md
```

**After completing:** Record any new patterns or exceptions discovered.

> ASSUME INTERRUPTION: Your context may reset. If it's not in memory, it didn't happen.

Overview

This skill helps developers apply configuration management techniques to JavaScript projects with a focus on secure, maintainable, and environment-driven settings. It reviews code, suggests concrete improvements, and provides refactor guidance to align implementations with established best practices. The goal is reliable, testable configuration handling across environments.

How this skill works

The skill inspects project files and configuration usage patterns to identify hard-coded values, insecure secrets, and inconsistent environment handling. It evaluates adherence to a single-source-of-truth approach (typically environment variables), recommends safer libraries or patterns, and outlines step-by-step refactors. It also explains why recommended patterns improve security, portability, and testability.

When to use it

  • Starting a new project and defining configuration strategy
  • Auditing an existing codebase for hard-coded secrets or settings
  • Preparing applications for multiple environments (dev/staging/prod)
  • Refactoring configuration for testability and CI/CD integration
  • Ensuring compliance with security and deployment standards

Best practices

  • Use environment variables as the primary source of runtime configuration; avoid hard-coded values in source files
  • Keep secrets out of source control; use secret managers for production and .env for local development with .gitignore
  • Validate and type-check configuration at startup with a schema to fail fast on misconfiguration
  • Centralize access to configuration behind a small module or service to simplify testing and changes
  • Document required environment variables and provide sensible defaults where safe

Example use cases

  • Review code to find and replace hard-coded API keys with environment-variable lookups
  • Refactor configuration access into a single config module that reads and validates process.env
  • Create a testing configuration pattern that injects mock values without touching production secrets
  • Recommend migration steps from multiple config files to a unified environment-driven approach
  • Provide a checklist for CI/CD to supply environment variables securely to build and runtime environments

FAQ

Should I store defaults in code or in environment variables?

Provide safe, non-sensitive defaults in code when helpful, but treat environment variables as the authoritative source for environment-specific or sensitive values.

How do I manage secrets across environments?

Use a secrets manager for production, keep .env files out of version control for local development, and ensure CI pipelines inject secrets at runtime rather than baking them into artifacts.

What is the recommended pattern for access in JavaScript?

Expose a small, validated config module that reads environment variables once at startup and exports typed values for the rest of the app.