| name | subconverter-toml |
| description | Use when working in this repository to maintain a reusable Subconverter TOML setup, convert ACL4SSR-style INI rules into TOML snippets, preserve external raw GitHub ruleset URLs, or update deployment files like pref.toml, snippets, docker-compose, and README. |
Subconverter TOML
Use this skill when the task is to add, remove, or update rulesets/groups in this repository.
Source of truth
source/Clash-Full.ini is the ACL4SSR-style source file.
overlay/snippets/liandu-rulesets.toml is the ruleset snippet loaded by pref.toml.
overlay/snippets/liandu-groups.toml is the custom group snippet loaded by pref.toml.
Required workflow
- If the user edits the ACL4SSR-style source, regenerate the TOML snippets:
python scripts/ini_to_subconverter_toml.py \
source/Clash-Full.ini \
overlay/snippets/liandu-rulesets.toml \
overlay/snippets/liandu-groups.toml
- Keep external
raw.githubusercontent.com ruleset URLs unless the user explicitly asks to vendor or pin them.
- If you add a new
[[rulesets]] entry that should be selectable, also add a matching [[custom_groups]] entry.
- Keep
scripts/bootstrap_base.sh aligned with the snippets names it patches into pref.toml.
- Keep
README.md in Chinese and update the examples when the default profile changes.
Validation
- Run
python scripts/ini_to_subconverter_toml.py ... after changing source/Clash-Full.ini.
- Check that the expected group names exist in
overlay/snippets/liandu-groups.toml.
- If deployment files changed, ensure
docker-compose.yml still mounts /base and bootstrap_base.sh still patches pref.toml.
Important constraints
- Do not switch this repo back to the old
config= workflow unless the user explicitly asks for it; the verified stable path here is pref.toml + snippets/*.toml.
- Prefer editing the source INI and regenerating TOML over hand-editing large TOML files when the change touches many groups.