agentleFS
edloidasedloidas/skills/skills/editor-config/SKILL.md

editor-config

Skill2 starsChanged 13 days agoMITView on GitHub

Initialize a project with canonical editor configurations (Zed, VSCode). Asks which editors to set up, then writes or merges the bundled settings into the repo. On conflict our values win; keys we do not define are preserved.

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Every question in this skill is written as AskUserQuestion options.

    line 66
  2. Very specific:

    If arguments include zed and/or vscode, use those.

    line 75

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Editor Config

Local writes only. It creates or merges .zed/ and .vscode/ files in the target repo. It never stages, commits, pushes, or calls a remote service.

Purpose

Drops a small, opinionated set of editor configuration files into a project. The bundled assets/ are the source of truth; changing them is maintainer work, described in references/maintaining.md.

Canonical Set

Two editors, each with one or more target files:

EditorTargetSource
Zed.zed/settings.jsonassets/zed/settings.json
VSCode.vscode/settings.jsonassets/vscode/settings.json
VSCode.vscode/extensions.jsonassets/vscode/extensions.json

Sync Algorithm

For each target file:

  • Missing in target → write our copy verbatim.
  • Already exists in target →
    • settings.json files: deep-merge with our values winning every conflict. Keys the user has that we do not define are preserved.
    • extensions.json: union the recommendations and unwantedRecommendations arrays, de-duplicated (the result is sorted).

Existing files are read tolerantly — // line comments and /* … */ block comments (valid in JSONC) are stripped before parsing. The output is always plain JSON.

The skill prints a per-file plan (Write, Merge, Identical) and asks for confirmation before writing.

Edit mechanic

scripts/editor-config.sh owns every write to a target repo, and it generates each target file whole from the merge result — that is correct here, because the merge already carries the user's own keys forward. Do not hand-edit a target file instead of re-running the script.

Asking the User

Every question in this skill is written as AskUserQuestion options. Use that tool where the host offers it, or the host's nearest structured-choice equivalent. Where the host has neither, ask the same question in normal chat as a numbered list of 2–5 options — recommended first, one short line of description each — and wait for the user to reply with a number.

Workflow

  1. Determine editor selection.
    • If arguments include zed and/or vscode, use those.
    • Otherwise ask per Asking the User, accepting more than one pick:

      Question: Which editor configs should I set up?
      Header:   Editors
      Options:
        - Zed (Recommended) — Apply .zed/settings.json
        - VSCode            — Apply .vscode/settings.json and .vscode/extensions.json

      In chat, accept one or more numbers comma-separated (e.g. 1,2).

  2. Run the script with --dry-run for the selection — without --yes the script waits on a terminal prompt an agent cannot answer.

    bash <skill-dir>/scripts/editor-config.sh [--dry-run] [--yes] <editor> [<editor> ...]

    <editor> is one of zed, vscode. Flags:

    • --dry-run — print the plan and exit
    • --yes / -y — skip the per-run confirmation
    • -h, --help — usage
  3. Review the plan. The script prints Target, Editors, then a per-file action (Write, Merge, Identical). Show that table and end the phase with one line carrying the counts: 3 targets: 1 write, 1 merge, 1 identical.
  4. Confirm, per Asking the User, then re-run the same command with --yes in place of --dry-run. A Merge drops JSONC comments from that file; say so in the question. A ParseError row blocks the whole run — report which file failed and stop; do not repair the file to get past it unless the user asks.
  5. Report the changed files the script lists, then stop. Do not stage or commit them, and do not reopen them to reformat.

Example plan

Target: /Users/edloidas/repo/voidvigil
Editors: zed vscode

Action     File
------     ----
Merge      .zed/settings.json
Write      .vscode/settings.json
Identical  .vscode/extensions.json

Then the phase line: 3 targets: 1 write, 1 merge, 1 identical.

Edge Cases

  • jq missing, or a target with trailing commas. The script needs jq, and reports a trailing comma as a parse error without writing — report either and stop.
  • Existing recommendations array contains a string we also define. The union de-duplicates by exact string match, so no double entries appear.
  • The user has set a key we also define to a different value. Ours wins — this is the explicit design. If a user customization needs to survive, remove that key from assets/<editor>/settings.json (see references/maintaining.md).

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.