ini-parser

Parse and edit 3DMigoto INI files line-by-line with regex and atomic writes.

Updated Feb 15, 2026
One-click install
npx skills add https://github.com/reynalivan/EMMM2 --skill ini-parser
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ini-parser
Source: https://github.com/reynalivan/EMMM2/tree/main/.agent/skills/ini-parser
Command: npx skills add https://github.com/reynalivan/EMMM2 --skill ini-parser

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Line-based parsing and safe editing of 3DMigoto INI files to prevent corruption when standard parsers fail to preserve duplicates, comments, and original formatting.

Core Features & Use Cases

  • Read as Vec<String> preserving duplicates, comments, and formatting.
  • Modify with Regex targeting lines for variables and key-values.
  • Write back atomically using atomic-fs to ensure safety.
  • Reference: See references/syntax_guide.md for syntax rules and edge cases.

Quick Start

Read a d3dx.ini file line by line, apply regex-based modifications, and atomically write back the result.

Frequently Asked Questions about ini-parser

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

FAQPage Schema
How do I parse and edit a 3DMigoto INI file without losing comments and formatting?

Line-based parsing reads the INI file as a Vec<String> to preserve duplicates, comments, and original formatting. You can then apply regex modifications to specific lines and write the result back atomically using atomic-fs to prevent file corruption.

Why does my standard INI parser corrupt 3DMigoto config files with duplicate keys?

Standard INI parsers often overwrite duplicate keys and strip comments, corrupting 3DMigoto configs. A line-based parsing approach treats the file as a list of strings, preserving all duplicates and formatting while allowing safe regex-based modifications to variables.

What is the best way to safely update variables in a d3dx.ini file?

The best way to safely update variables in a d3dx.ini file is using regex patterns to target specific lines for modification. This line-based approach ensures original formatting is preserved, and writing back atomically using atomic-fs guarantees the file remains safe from corruption.

Can I use regex to modify specific key-values in an INI file while keeping everything else intact?

Yes, you can use regex to target and modify specific key-values within an INI file. By reading the file line by line as a Vec<String>, the parser applies regex changes only to matching lines while keeping all other lines, comments, and duplicates completely intact.

Does lossless INI editing support atomic write-back for large configuration files?

Yes, lossless INI editing supports atomic write-back for configuration files. After reading the file line by line and applying regex-based modifications, the results are written back atomically using the atomic-fs dependency, ensuring file safety and preventing data corruption during the write process.

When should I use a line-based INI parser instead of a standard key-value parser?

You should use a line-based INI parser when your config files contain duplicates, comments, or specific formatting that standard key-value parsers would destroy. It is specifically designed for safe editing of 3DMigoto INI files where preserving the original structure is critical.