Env Matrix Dev Stg Prod
Standards for managing environments (development, staging, production) including configs, data policies, and access controls that differ per environment. This skill enables environment parity, reduces
Best use case
Env Matrix Dev Stg Prod is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Standards for managing environments (development, staging, production) including configs, data policies, and access controls that differ per environment. This skill enables environment parity, reduces
Teams using Env Matrix Dev Stg Prod should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/env-matrix-dev-stg-prod/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How Env Matrix Dev Stg Prod Compares
| Feature / Agent | Env Matrix Dev Stg Prod | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Standards for managing environments (development, staging, production) including configs, data policies, and access controls that differ per environment. This skill enables environment parity, reduces
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Env Matrix Dev Stg Prod
## Skill Profile
*(Select at least one profile to enable specific modules)*
- [ ] **DevOps**
- [x] **Backend**
- [ ] **Frontend**
- [ ] **AI-RAG**
- [ ] **Security Critical**
## Overview
Standards for managing environments (development, staging, production) including configs, data policies, and access controls that differ per environment. This skill enables environment parity, reduces "works on my machine" issues, and ensures proper safety controls and compliance.
## Why This Matters
- **Parity**: Environments are as similar as possible, reducing "works on my machine"
- **Safety**: Production protected, staging for testing
- **Clarity**: Know what each environment can do
- **Compliance**: Proper access controls
---
## Core Concepts & Rules
### 1. Core Principles
- Follow established patterns and conventions
- Maintain consistency across codebase
- Document decisions and trade-offs
### 2. Implementation Guidelines
- Start with the simplest viable solution
- Iterate based on feedback and requirements
- Test thoroughly before deployment
## Inputs / Outputs / Contracts
* **Inputs**:
- Environment variable definitions (APP_ENV, environment-specific configs)
- Access control policies and role definitions
- Data sanitization/masking rules
- Secret manager configuration per environment
* **Entry Conditions**:
- Secret manager is configured for each environment
- Access control policies are defined
- Data sanitization pipeline is set up (for staging)
* **Outputs**:
- Environment-specific configuration files
- Access control matrix documentation
- Data policy documentation
- Deployment flow documentation
* **Artifacts Required (Deliverables)**:
- Environment configuration matrix
- Access control matrix
- Data policy document
- Secret manager setup scripts
* **Acceptance Evidence**:
- Staging deployment flow matches production
- Secrets are separated per environment
- Access controls are enforced
- Data policies are documented and implemented
* **Success Criteria**:
- Staging environment is production-like (same topology, config shape)
- Zero secret reuse across environments
- All production changes go through staging first
## Skill Composition
* **Depends on**: [config-distribution](../69-platform-engineering-lite/config-distribution/SKILL.md)
* **Compatible with**: [deployment-patterns](../69-platform-engineering-lite/deployment-patterns/SKILL.md), [observability-packaging](../69-platform-engineering-lite/observability-packaging/SKILL.md)
* **Conflicts with**: Sharing secrets across environments, using production data in dev/staging
* **Related Skills**: [secrets-key-management](../71-infrastructure-patterns/secrets-key-management/SKILL.md), [tenant-aware-ops](../69-platform-engineering-lite/tenant-aware-ops/SKILL.md)
---
## Quick Start / Implementation Example
1. Review requirements and constraints
2. Set up development environment
3. Implement core functionality following patterns
4. Write tests for critical paths
5. Run tests and fix issues
6. Document any deviations or decisions
```python
# Example implementation following best practices
def example_function():
# Your implementation here
pass
```
## Assumptions / Constraints / Non-goals
* **Assumptions**:
- Development environment is properly configured
- Required dependencies are available
- Team has basic understanding of domain
* **Constraints**:
- Must follow existing codebase conventions
- Time and resource limitations
- Compatibility requirements
* **Non-goals**:
- This skill does not cover edge cases outside scope
- Not a replacement for formal training
## Compatibility & Prerequisites
* **Supported Versions**:
- Python 3.8+
- Node.js 16+
- Modern browsers (Chrome, Firefox, Safari, Edge)
* **Required AI Tools**:
- Code editor (VS Code recommended)
- Testing framework appropriate for language
- Version control (Git)
* **Dependencies**:
- Language-specific package manager
- Build tools
- Testing libraries
* **Environment Setup**:
- `.env.example` keys: `API_KEY`, `DATABASE_URL` (no values)
## Test Scenario Matrix (QA Strategy)
| Type | Focus Area | Required Scenarios / Mocks |
| :--- | :--- | :--- |
| **Unit** | Core Logic | Must cover primary logic and at least 3 edge/error cases. Target minimum 80% coverage |
| **Integration** | DB / API | All external API calls or database connections must be mocked during unit tests |
| **E2E** | User Journey | Critical user flows to test |
| **Performance** | Latency / Load | Benchmark requirements |
| **Security** | Vuln / Auth | SAST/DAST or dependency audit |
| **Frontend** | UX / A11y | Accessibility checklist (WCAG), Performance Budget (Lighthouse score) |
## Technical Guardrails & Security Threat Model
### 1. Security & Privacy (Threat Model)
* **Top Threats**: Injection attacks, authentication bypass, data exposure
- [ ] **Data Handling**: Sanitize all user inputs to prevent Injection attacks. Never log raw PII
- [ ] **Secrets Management**: No hardcoded API keys. Use Env Vars/Secrets Manager
- [ ] **Authorization**: Validate user permissions before state changes
### 2. Performance & Resources
- [ ] **Execution Efficiency**: Consider time complexity for algorithms
- [ ] **Memory Management**: Use streams/pagination for large data
- [ ] **Resource Cleanup**: Close DB connections/file handlers in finally blocks
### 3. Architecture & Scalability
- [ ] **Design Pattern**: Follow SOLID principles, use Dependency Injection
- [ ] **Modularity**: Decouple logic from UI/Frameworks
### 4. Observability & Reliability
- [ ] **Logging Standards**: Structured JSON, include trace IDs `request_id`
- [ ] **Metrics**: Track `error_rate`, `latency`, `queue_depth`
- [ ] **Error Handling**: Standardized error codes, no bare except
- [ ] **Observability Artifacts**:
- **Log Fields**: timestamp, level, message, request_id
- **Metrics**: request_count, error_count, response_time
- **Dashboards/Alerts**: High Error Rate > 5%
## Agent Directives & Error Recovery
*(ข้อกำหนดสำหรับ AI Agent ในการคิดและแก้ปัญหาเมื่อเกิดข้อผิดพลาด)*
- **Thinking Process**: Analyze root cause before fixing. Do not brute-force.
- **Fallback Strategy**: Stop after 3 failed test attempts. Output root cause and ask for human intervention/clarification.
- **Self-Review**: Check against Guardrails & Anti-patterns before finalizing.
- **Output Constraints**: Output ONLY the modified code block. Do not explain unless asked.
## Definition of Done (DoD) Checklist
- [ ] Tests passed + coverage met
- [ ] Lint/Typecheck passed
- [ ] Logging/Metrics/Trace implemented
- [ ] Security checks passed
- [ ] Documentation/Changelog updated
- [ ] Accessibility/Performance requirements met (if frontend)
## Anti-patterns / Pitfalls
* ⛔ **Don't**: Log PII, catch-all exception, N+1 queries
* ⚠️ **Watch out for**: Common symptoms and quick fixes
* 💡 **Instead**: Use proper error handling, pagination, and logging
## Reference Links & Examples
* Internal documentation and examples
* Official documentation and best practices
* Community resources and discussions
## Versioning & Changelog
* **Version**: 1.0.0
* **Changelog**:
- 2026-02-22: Initial version with complete template structureRelated Skills
production-code-audit
Autonomously deep-scan entire codebase line-by-line, understand architecture and patterns, then systematically transform it to production-grade, corporate-level professional quality with optimizations
product-appeal-analyzer
Evaluate product desirability, market positioning, and emotional resonance—the complement to friction analysis. Assess whether users will WANT a product (not just use it), identity fit, trust signals, and value proposition clarity. Activate on "will they like it", "market positioning", "appeal analysis", "product desirability", "value proposition", "why would someone choose this", "landing page review", "conversion optimization", "messaging strategy". NOT for UX friction analysis (use ux-friction-analyzer), visual design implementation (use web-design-expert), or A/B test setup (use frontend-developer).
office-productivity
Office productivity workflow covering document creation, spreadsheet automation, presentation generation, and integration with LibreOffice and Microsoft Office formats.
nextjs-production-debugger
Advanced debugging guide for Next.js App Router production issues including SSR/CSR bugs, hydration errors, runtime mismatches, performance, and caching.
new-saas-production
Production-ready SaaS boilerplate generator. Creates complete project with public landing pages, client dashboard, admin panel, T-Bank payment integration, and v12-style design system. FastAPI + Jinja2 + PostgreSQL stack.
chatgpt-apps-production-checklist
Turn ChatGPT Apps implementation work into a production-ready checklist with concrete tasks, tests, widget changes, and tool-result patterns mapped by priority (P0/P1/P2). Use when designing or hardening Apps SDK products for shipping; do not use for generic web-only apps, static code review, or non-ChatGPT integration planning.
ai-wrapper-product
Expert in building products that wrap AI APIs (OpenAI, Anthropic, etc.) into focused tools people will pay for. Not just "ChatGPT but different" - products that solve specific problems with AI. Covers prompt engineering for products, cost management, rate limiting, and building defensible AI businesses. Use when "AI wrapper, GPT product, AI tool, wrap AI, AI SaaS, Claude API product, " mentioned.
prototype-to-production
Convert design prototypes (HTML, CSS, Figma exports) into production-ready components. Analyzes prototype structure, extracts design tokens, identifies reusable patterns, and generates typed React components. Adapts to existing project tech stack with React + TypeScript as default.
ai-product-evaluation-design
Transition from traditional PRDs to "Evals" (evaluations) to guide AI model behavior. Use this skill when launching new AI features, debugging unpredictable model outputs, or moving from a prompted prototype to a production-ready agent.
ai-native-product-building
Rapidly build, prototype, and deploy full-stack software using AI "text-to-app" tools. Use this when you need to create a greenfield application, build a high-fidelity working prototype for user testing, or bypass traditional engineering bottlenecks for internal tools.
access-control-matrix
Design RBAC/ABAC policies and permission boundaries.
Transition Failure Matrix
Identify failure hotspots in multi-step agent workflows using state transition analysis. Use when debugging agent pipelines, analyzing LLM orchestration failures, or systematically identifying where multi-step processes break down. Creates a grid mapping source states to failure points for targeted debugging.