| name | configuration-file-parsing |
| description | > Use when this capability is needed. |
Configuration File Parsing Skill
Overview
The Configuration File Parsing skill enables the Render Deployment Specialist agent to effectively parse, validate, modify, and generate configuration files essential for cloud deployments. This skill covers Render-specific YAML, Docker configurations, shell scripts, and general structured data formats.
Capabilities
YAML Configuration (render.yaml)
- Service Definition: Define web services, background workers, and cron jobs
- Environment Variables: Configure env vars, secrets, and build-time variables
- Build & Start Commands: Set up build pipelines and runtime commands
- Scaling & Resources: Configure instance types, autoscaling, and resource limits
Docker Configuration (Dockerfile)
- Base Image Selection: Choose appropriate base images for the runtime
- System Dependencies: Install required packages (curl, git, jq, build-essential)
- Multi-stage Builds: Optimize image size with multi-stage builds
- Health Check Integration: Add Dockerfile HEALTHCHECK instructions
Shell Scripts (entrypoint.sh)
- Process Management: Start multiple processes and keep container alive
- Health Checks: Implement curl-based health check loops with timeouts
- Error Handling: Add trap handlers, set -euo pipefail, and exit code management
- Logging: Prefix logs by process (e.g.,
[API], [WORKER]) for clarity
JSON Configuration
- API Config Files: Parse and generate API server configuration
- Package Files: Read and update package.json, requirements.txt, etc.
- Secret Management: Handle encrypted or templated JSON configs
Common Patterns
render.yaml Template
services:
- type: web
name: paperclip-app
runtime: docker
dockerfilePath: ./Dockerfile
envVars:
- key: NODE_ENV
value: production
- key: PORT
value: 8000
- key: HERMES_MODE
value: both
- key: OPENROUTER_API_KEY
fromSecret: openrouter_api_key
- key: SUPABASE_URL
fromSecret: supabase_url
- key: SUPABASE_SERVICE_ROLE_KEY
fromSecret: supabase_service_role_key
- key: GITHUB_TOKEN
fromSecret: github_token
healthCheckPath: /health
disk:
name: tmp
mountPath: /tmp
sizeGB: 1
Dockerfile with All Dependencies
FROM python:3.11-slim
# Install system dependencies required for health checks and git operations
RUN apt-get update && apt-get install -y \
curl \
git \
jq \
build-essential \
&& rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
# Copy and install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY . .
# Make entrypoint executable
RUN chmod +x docker/entrypoint.sh
# Expose port
EXPOSE 8000
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \
CMD curl -f http://localhost:8000/health || exit 1
# Start command
CMD ["./docker/entrypoint.sh"]
entrypoint.sh with Dual Process Management
#!/bin/bash
set -euo pipefail
API_PORT="${API_PORT:-8000}"
API_HOST="${API_HOST:-0.0.0.0}"
HEALTH_CHECK_URL="http://${API_HOST}:${API_PORT}/health"
MAX_HEALTH_CHECK_ATTEMPTS=30
HEALTH_CHECK_INTERVAL=5
log() {
echo "[$(date -Iseconds)] $1"
}
log "Checking required environment variables..."
required_vars=("OPENROUTER_API_KEY" "GITHUB_TOKEN" "SUPABASE_URL" "SUPABASE_SERVICE_ROLE_KEY")
missing_vars=()
for var in "${required_vars[@]}"; do
if [[ -z "${!var:-}" ]]; then
missing_vars+=("$var")
fi
done
if [[ ${#missing_vars[@]} -gt 0 ]]; then
log "ERROR: Missing required environment variables: ${missing_vars[*]}"
exit 1
fi
log "All required environment variables are present."
log "Starting API server on :..."
hermes serve --host --port &
API_PID=$!
attempt=0
[ -lt ];
curl -sf > /dev/null 2>&1;
attempt=$((attempt + ))
[ -eq ];
2>/dev/null ||
1
python -m worker.main &
WORKER_PID=$!
() {
2>/dev/null ||
2>/dev/null ||
0
}
shutdown SIGTERM SIGINT
Validation Procedures
YAML Validation
python -c "import yaml; yaml.safe_load(open('render.yaml'))"
yamllint render.yaml
Dockerfile Validation
docker build -t test-build .
hadolint Dockerfile
Shell Script Validation
bash -n entrypoint.sh
shellcheck entrypoint.sh
Success Metrics
- Syntax Accuracy: 100% of generated config files pass validation on first attempt
- Completeness: All required environment variables and dependencies documented
- Security: No secrets hardcoded in configuration files
- Compatibility: Configurations work with target deployment platform (Render, Docker, etc.)
Skill Level: Expert
Last Updated: 2026-04-23
Version: 1.0
Source: Construct-AI-primary/z-docs-paperclip — distributed by TomeVault.