Interactively create or merge-update the user-global `$XDG_CONFIG_HOME/issues/user-config.md` (machine-wide; all repos on this machine).
Install
npx skillscat add thevoskamps/claude-plugins-marketplace/global-user-config Install via the SkillsCat registry.
You are running the /global-user-config skill. Your job is to create
or merge-update the user-global user-config file at$XDG_CONFIG_HOME/issues/user-config.md by interviewing the user.
This file records machine-wide per-user settings that apply to
every repo this user works in on this machine. It is the user-global
counterpart to the repo-level .issues/user-config.md written
by the sibling skill /user-config. See skills/lib/user-config.md
for the shared schema, the read contract, and the two-scope model.
Scope and the filename collision — read this first
Both user-config files are named user-config.md. This skill writes
only the user-global one at$XDG_CONFIG_HOME/issues/user-config.md, resolved asskills/lib/user-config.md → "Where $XDG_CONFIG_HOME resolves"
defines it. It never touches a repo-level<repo-root>/.issues/user-config.md — that is /user-config's job.
Be unambiguous about scope at every step.
identity-key is repo-level only (a per-repo-per-user binding),
so this user-global skill does not interview for it. Keys here are
machine-wide defaults that make sense across all repos.
Merge, not full-rewrite — read this too
/repo-config is full-rewrite. /global-user-config is merge,
exactly like /user-config, because the user-global file is also
multi-writer: different skills own different keys. So this skill:
- Reads the existing file's full front-matter into memory.
- Replaces only the keys it owns and that the user changed in this
run. - Preserves every other key verbatim, including keys this skill
does not recognize. - Re-stamps
schema-versionto the current version.
If the file does not exist yet, "merge" degenerates to "create a new
file with this run's keys plus the version stamp".
Follow the steps below in order. Do not write the file until the user
has explicitly approved the proposed content.
Step 1: Pre-flight
This skill writes under the user's config home, not a repo, so there
is no git-working-tree precondition. Resolve the target path asskills/lib/user-config.md → "Where $XDG_CONFIG_HOME resolves"
defines it:
$XDG_CONFIG_HOME/issues/user-config.mdThe directory may not exist on a machine that has never run this
skill. The Write tool creates it; if your tool path does not, runmkdir -p on the parent first.
The path sits outside every git clone, so a user's private values
are never committed or mirrored by construction. There is no.gitignoreentry to add, and this skill adds none.
Step 2: Detect existing config and read it for merge
Check whether $XDG_CONFIG_HOME/issues/user-config.md exists.
- If it exists: read its full contents and parse the front-matter
YAML so you can preserve sibling keys and pre-fill the interview
with current values as recommended defaults.- Check
schema-version. If absent or stale (less than current
version1), note the merge will migrate the stamp up. Do not
abort — this skill is the tool that fixes a stale user-global
stamp.
- Check
- If it does not exist: nothing to read; recommended values are
this skill's built-in defaults and the merge degenerates to a
create.
The current schema-version constant baked into this writer is:
SCHEMA_VERSION = 1See skills/lib/user-config.md for the reader contract.
Step 3: Interview
Use AskUserQuestion. The user-global user-config has no required
keys — at schema-version 1 every key is optional and the file may
contain only schema-version. The interview is an offer, not a
gauntlet.
Ask which machine-wide per-user settings to record. Present the keys
this skill knows about, each with a "leave unset" option, plus an
"Other" branch:
default-assignee— an optional assignee identifier in the
form the tracker accepts wherever it is used (a GitHub login on
GitHub; an Atlassian account identifier on Jira), used as a
machine-wide self-assign default by the example consumer inskills/lib/user-config.md. One value serves every repo on this
machine, so a user whose repos span both trackers sets the
repo-level key with/user-configinstead. Recommended: leave
unset.branch-prefix-initials— the initials an issue-branch name
carries in front of/in every repo whose repo-config setsissue-branch-naming-prefix: initials, unless that repo's
repo-level user-config overrides it. No/and no whitespace.
Recommended: leave unset unless a repo uses that mode.branch-prefix-name— the same, forissue-branch-naming-prefix: name.- Other — any
key: valuepair the user wants as a machine-wide
personal setting (preferred-editor,default-reviewer, etc.).
Capture key and value as strings. Repeat until done.
This skill does not offer identity-key — that is repo-level
only (use /user-config).
For each key:
- If the file already defined it (Step 2), show the current value
as the recommended option so the user can keep it. - Otherwise recommend leave unset.
- Always allow free-text via "Other".
A "leave unset" answer for a key that already exists means "do
not change it" — never delete a sibling on "leave unset". Deletion
requires an explicit user request.
If the user wants nothing recorded and the file does not exist,
confirm they still want a stub (schema-version: 1 only) so future
skills have something to merge into. A stub is valid.
Step 4: Compute the merged front-matter
Merge the same way /user-config does:
- Start from the existing front-matter map (empty if no file).
- Overwrite each key the user changed/set in Step 3.
- Leave every other existing key untouched (sibling preservation).
- Set
schema-version: 1(first key in output).
Render order: schema-version first, then remaining keys —
pre-existing keys keep their relative order, newly-added keys append
after. Quote any value YAML would misparse.
Step 5: Show the proposed file and wait for approval
Render the full merged file exactly as it will appear on disk:
front-matter (schema-version: 1 first, all preserved + changed
keys) plus the canonical body template from Step 6. For an existing
file, also show a short diff summary: which keys this run changes,
which it preserves untouched.
Then ask explicitly:
Write
$XDG_CONFIG_HOME/issues/user-config.md(merged) as shown? (y to
proceed, or tell me what to change)
Wait for explicit approval. If the user asks for changes, loop back
to Step 3, then re-render here.
Step 6: Write the file
On approval, use the Write tool to write the full merged content
(front-matter from Step 4 + body template below) in one call. The
content is a merge even though the write replaces the file; never
use Edit to surgically rewrite one key — recompute the whole merged
front-matter so the version stamp and key order stay consistent.
Compose in this order:
- The merged YAML front-matter (
schema-version: 1first, then
preserved + changed keys). - A blank line.
- The canonical body template (below), starting with
# User Config (user-global).
The canonical body template:
# User Config (user-global)
Machine-wide per-user config: **this user, all repos, this machine.**
Private — never committed. Lives outside every git clone, so values
never get committed or mirrored. The per-repo-per-user counterpart is
`<repo-root>/.issues/user-config.md` (written by `/user-config`).
Read via the contract in `skills/lib/user-config.md`. Written and
merge-updated by `/global-user-config` — the file is
**multi-writer**, so the skill replaces only the keys it owns and
preserves keys written by other skills.
## Keys
- **schema-version**: integer naming the file's schema version.
Current version is `1`. Writers stamp it; readers (see
`skills/lib/user-config.md`) gate on it. Do not edit by hand.
- **branch-prefix-initials** *(optional)*: the initials an
issue-branch name carries in front of `/` in every repo whose
repo-config sets `issue-branch-naming-prefix: initials`, unless that
repo's repo-level user-config overrides it. No `/` and no
whitespace.
- **branch-prefix-name** *(optional)*: the same, for
`issue-branch-naming-prefix: name`.
- *(other keys)*: any machine-wide per-user value future skills
record. Unknown keys are preserved on merge and ignored by readers
that do not consume them.
There are **no required keys** beyond `schema-version`. A file
containing only the version stamp is valid — these files are
forward-looking and start mostly empty.
`identity-key` does **not** live here — it is a per-repo-per-user
binding and lives only in the repo-level user-config.
## Resolution against the repo-level file
Readers that consult both scopes use **repo-level overrides
user-global** (see `skills/lib/user-config.md`). A value here is the
machine-wide default; a repo-level user-config can override it for
one repo.Verification
After the Write call, re-read the file and confirm the points
below. This re-read is content verification, not write
verification: Write already errors if the bytes did not land, so
the goal here is to confirm the merge produced the intended
content — schema-version stamped, owned keys updated, siblings
preserved — which a successful Write alone does not guarantee.
Keep this step even though it looks redundant with Write success.
- The front-matter parses as YAML, with
schema-version: 1first. - Every key that existed before the run (and was not intentionally
changed) is still present with its prior value. - The canonical body template is present below the front-matter.
If verification fails, surface the discrepancy and stop — do not
attempt a corrective second write.
Step 7: Summarize
Report back:
- The absolute path written —
$XDG_CONFIG_HOME/issues/user-config.md
with the variable resolved. - Which keys were changed, which were preserved (merge summary), and
the finalschema-version. - A reminder that this file is the user-global scope and lives
outside every git clone, so it is never committed.
Hard constraints
- Merge, never full-rewrite. Read existing keys, replace only the
keys this run changes, preserve all siblings. Re-stampschema-version. - Never delete a sibling key on a "leave unset" answer.
- Never offer or write
identity-key— that is repo-level only.
Direct the user to/user-configfor it. - Never write the file without explicit approval in Step 5.
- Write exactly one file:
$XDG_CONFIG_HOME/issues/user-config.md. This skill does not touch
any repo, does not edit.gitignore(the path is in no clone), and
does not run git commands.