# Editor Config

> >

- **Type:** Skill
- **Install:** `agentstack add skill-edloidas-skills-editor-config`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [edloidas](https://agentstack.voostack.com/s/edloidas)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [edloidas](https://github.com/edloidas)
- **Source:** https://github.com/edloidas/skills/tree/master/maintain/editor-config

## Install

```sh
agentstack add skill-edloidas-skills-editor-config
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Editor Config

## Purpose

Drop a small, opinionated set of editor configuration files into a project. The
skill is the **source of truth** — its bundled configs in `assets/` are what
every target repo gets. To update the canonical configs, edit the files in this
skill and commit; the next run propagates the change everywhere else.

## When to Use This Skill

Trigger phrases: "editor config", "editor-config", "init editor", "setup editor",
"apply editor config", "sync editor config", "init zed", "init vscode", "set up
.zed", "set up .vscode", "configure editor".

## Canonical Set

Two editors, each with one or more target files:

| Editor | Target | Source |
|--------|--------|--------|
| Zed    | `.zed/settings.json`        | `assets/zed/settings.json` |
| VSCode | `.vscode/settings.json`     | `assets/vscode/settings.json` |
| VSCode | `.vscode/extensions.json`   | `assets/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. No duplicates, order preserved with our
    entries appended first.

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.

## Workflow

1. **Determine editor selection.**
   - If arguments include `zed` and/or `vscode`, use those.
   - Otherwise ask via `AskUserQuestion` with `multiSelect: true`:

     ```
     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
     ```

     If `AskUserQuestion` is unavailable (Codex / plain chat), ask in normal
     chat with this short numbered list and wait for the user's reply. Accept
     one or more numbers comma-separated (e.g. `1,2`).

     ```
     Which editor configs should I set up? (pick one or more)
     1. Zed     — apply .zed/settings.json
     2. VSCode  — apply .vscode/settings.json and .vscode/extensions.json
     ```

2. **Run the apply script** for each selection.

   ```bash
   bash /scripts/editor-config.sh [--dry-run] [--yes]  [ ...]
   ```

   `` 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`, then a per-file action
   (`Write`, `Merge`, `Identical`).

4. **Confirm.** Type `y` to apply. Anything else aborts.

5. **Verify.** After apply, the changed files are listed. Run `git status` /
   `git diff` in the target repo to inspect.

## Edge Cases

- **`jq` missing.** The script requires `jq` for parsing and merging. Install
  with `brew install jq` (or your package manager).
- **JSONC with non-standard syntax.** The comment stripper handles `//` and
  `/* … */`. Trailing commas are not handled — if the existing file has them,
  the script reports a parse error and exits without writing. Remove trailing
  commas and re-run.
- **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//settings.json` in this skill (the
  canonical set).

## Updating the Canonical Configs

The bundled files in `assets/` are the source of truth. Edit them in place and
commit; the next run in any other repo picks up the new content.

When adding a brand-new target file:

1. Drop the file into `assets//`.
2. Add a row to the **Canonical Set** table above.
3. Extend the editor block in `scripts/editor-config.sh` (the `apply_`
   function and the `TARGETS_` array).

When adding a brand-new editor:

1. Create `assets//` with the relevant files.
2. Add the editor to the script's `KNOWN_EDITORS` list and add an
   `apply_` function.
3. Add it to the **Canonical Set** table and the `AskUserQuestion` options.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [edloidas](https://github.com/edloidas)
- **Source:** [edloidas/skills](https://github.com/edloidas/skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-edloidas-skills-editor-config
- Seller: https://agentstack.voostack.com/s/edloidas
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
