json-config-loader-4-multi-section-ini-parsing
Sub-skill of json-config-loader: 4. Multi-Section INI Parsing.
Best use case
json-config-loader-4-multi-section-ini-parsing is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Sub-skill of json-config-loader: 4. Multi-Section INI Parsing.
Teams using json-config-loader-4-multi-section-ini-parsing 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/4-multi-section-ini-parsing/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How json-config-loader-4-multi-section-ini-parsing Compares
| Feature / Agent | json-config-loader-4-multi-section-ini-parsing | 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?
Sub-skill of json-config-loader: 4. Multi-Section INI Parsing.
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
# 4. Multi-Section INI Parsing
## 4. Multi-Section INI Parsing
Parse INI-style files with sections:
```bash
#!/bin/bash
# ABOUTME: Parse INI-style configuration with sections
# ABOUTME: Supports [section] headers and section.key access
declare -A INI_CONFIG
declare -a INI_SECTIONS=()
parse_ini() {
local file="$1"
local current_section="default"
if [[ ! -f "$file" ]]; then
echo "Error: INI file not found: $file" >&2
return 1
fi
INI_SECTIONS=("default")
while IFS= read -r line || [[ -n "$line" ]]; do
# Skip comments and empty lines
[[ "$line" =~ ^[[:space:]]*[#\;] ]] && continue
[[ -z "${line// /}" ]] && continue
# Section header
if [[ "$line" =~ ^\[([^\]]+)\] ]]; then
current_section="${BASH_REMATCH[1]}"
INI_SECTIONS+=("$current_section")
continue
fi
# Key=value within section
if [[ "$line" =~ ^([^=]+)=(.*)$ ]]; then
local key="${BASH_REMATCH[1]}"
local value="${BASH_REMATCH[2]}"
# Trim whitespace
key="${key#"${key%%[![:space:]]*}"}"
key="${key%"${key##*[![:space:]]}"}"
value="${value#"${value%%[![:space:]]*}"}"
value="${value%"${value##*[![:space:]]}"}"
# Store as section.key
INI_CONFIG["${current_section}.${key}"]="$value"
fi
done < "$file"
}
# Get INI value
ini_get() {
local section="$1"
local key="$2"
local default="${3:-}"
echo "${INI_CONFIG["${section}.${key}"]:-$default}"
}
# Get all keys in a section
ini_section_keys() {
local section="$1"
local prefix="${section}."
for key in "${!INI_CONFIG[@]}"; do
if [[ "$key" == "${prefix}"* ]]; then
echo "${key#$prefix}"
fi
done
}
# List all sections
ini_sections() {
printf '%s\n' "${INI_SECTIONS[@]}" | sort -u
}
# Usage
parse_ini "settings.ini"
# Access values
DB_HOST=$(ini_get "database" "host" "localhost")
DB_PORT=$(ini_get "database" "port" "5432")
LOG_LEVEL=$(ini_get "logging" "level" "INFO")
echo "Database: $DB_HOST:$DB_PORT"
echo "Log Level: $LOG_LEVEL"
# Iterate section keys
echo "Database settings:"
for key in $(ini_section_keys "database"); do
echo " $key = $(ini_get "database" "$key")"
done
```Related Skills
toml-section-scoping-debug
Identify and fix TOML configuration errors caused by misplaced keys inside section headers
toml-section-scoping-config-debug
Diagnose TOML config errors caused by misplaced keys in table sections
portable-config-baseline-pattern
Extract machine-agnostic settings into portable template files while keeping machine-specific hooks and plugins separate
portable-baseline-configuration-pattern
Separate portable/universal config from machine-specific settings to enable safe template reuse across environments
portable-baseline-config-pattern
Separate machine-portable baseline config from environment-specific hooks and plugins
multi-year-tax-filing-verification-workflow
Verify and reconcile complex multi-form tax filings by cross-referencing source documents, identifying data dependencies, and validating line-by-line against authoritative records.
multi-source-tax-document-reconciliation
Verify generated tax forms against source documents by line-by-line comparison, not just totals
multi-role-agent-contract-review-pipeline
Execute a 4-role agent team (Planner/Architect/Reviewer/Integrator) pipeline for self-reviewing knowledge artifacts before delivery
multi-repo-sync-diagnosis-repair
Diagnose and repair failed pulls across multi-repo ecosystems with stale locks, submodule conflicts, and untracked files
multi-repo-sync-diagnosis-and-repair
Systematic approach to diagnosing and repairing failures across a multi-repo workspace
multi-repo-stale-lock-recovery
Diagnose and recover from stale git lock files in multi-repo workspaces, especially with submodules
multi-repo-pull-with-untracked-conflict-recovery
Diagnose and resolve multi-repo pull failures caused by untracked files conflicting with remote changes