Skip to content
Skills Library
Programming · Automation

setting-up

/setting-up

Configure the native-tools-enforcer plugin on this machine. Detects OS, package manager, and whether bfs/ugrep are installed. Offers to install missing binaries (brew on macOS; prints the sudo install command on Linux). Persists a setting so the plugin always enforces native tools, on request. Use when the user says "set up native-tools-enforcer", "install bfs ugrep", "configure native tools enforcer", or "why is native-tools-enforcer not blocking find/grep".

Repository
ai-tools ↗
Licence
MIT
Last repository change
26.10.2026

Assessment and security

90/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content25 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
2
Scripts
1
HTML comments
0
URLs in SKILL.md
2
Deprecation

No signals detected. Repository changed on 26.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What to check before installing
  • 1 scripts in this package. Review them before installing, as Claude may execute them.

Scripts: scripts/probe.sh

What it does and when to use it

Configure the native-tools-enforcer plugin on this machine. Detects OS, package manager, and whether bfs/ugrep are installed. Offers to install missing binaries (brew on macOS; prints the sudo install command on Linux). Persists a setting so the plugin always enforces native tools, on request. Use when the user says "set up native-tools-enforcer", "install bfs ugrep", "configure native tools enforcer", or "why is native-tools-enforcer not blocking find/grep".

Triggers from the description

set up native-tools-enforcerinstall bfs ugrepconfigure native tools enforcerwhy is native-tools-enforcer not blocking find/grep
Original author description

Configure the native-tools-enforcer plugin on this machine. Detects OS, package manager, and whether bfs/ugrep are installed. Offers to install missing binaries (brew on macOS; prints the sudo install command on Linux). Persists a setting so the plugin always enforces native tools, on request. Use when the user says "set up native-tools-enforcer", "install bfs ugrep", "configure native tools enforcer", or "why is native-tools-enforcer not blocking find/grep".

How it works

  1. Step 1 — Run the probe
  2. Step 2 — Classify the state and act
  3. Step 3 — Writing settings.json
  4. Step 4 — End with a summary
  5. Red flags — do not do these
Original SKILL.md headings · 150 lines, 1,123 words
SKILL.md preview
---
name: setting-up
version: 2.1.1
description: Configure the native-tools-enforcer plugin on this machine. Detects OS, package manager, and whether bfs/ugrep are installed. Offers to install missing binaries (brew on macOS; prints the sudo install command on Linux). Persists a setting so the plugin always enforces native tools, on request. Use when the user says "set up native-tools-enforcer", "install bfs ugrep", "configure native tools enforcer", or "why is native-tools-enforcer not blocking find/grep".
model: haiku
---

# Setting Up native-tools-enforcer

Help the user configure this plugin for their environment. The plugin has three runtime modes:

- **new** — blocks find/grep family in Bash, recommends `bfs`/`ugrep`.
- **classic** — blocks find/grep family, recommends the Claude Code Grep/Glob tools.
- **pass** — silent, no enforcement.

Your job is to run the probe, interpret the result, and help the user reach their preferred state without creating loops.

## Step 1 — Run the probe

Invoke the probe script and parse its JSON output:

    bash "${CLAUDE_PLUGIN_ROOT}/skills/setting-up/scripts/probe.sh"

The output is one JSON line with these fields:

- `os` — `"macos" | "linux" | "windows" | "unknown"`
- `pkg_manager` — `"brew" | "apt" | "dnf" | "pacman" | "none"`
- `bfs_present`, `ugrep_present`, `env_var_set`, `settings_file_exists` — boolean
- `env_var_value` — string (e.g. `"1"`, `"true"`) or empty when unset
- `settings_file` — absolute path to `~/.claude/settings.json`
- `resolved_mode` — `"new" | "classic" | "pass"`

If the script exits non-zero or emits `{"error": "..."}`, stop and report the error to the user.

## Step 2 — Classify the state and act

Match in this order, so explicit user intent always wins over state:

1. **If the user stated an intent** — "pin force-new", "unset force-new", "install bfs/ugrep" — match the intent-driven case first: D, E, or F.
2. **Otherwise** match the state-driven case: A, B, or C.

Apply only one case per invocation.

### Case A — Ready, no action needed

**When:** `os ∈ {macos, linux}` AND `bfs_present=true` AND `ugrep_present=true`.

**Action:** The plugin is already in a working state. Branch on `env_var_set`:

- `env_var_set=false`: tell the user the plugin will auto-activate new mode — no configuration needed. Offer to pin behavior by setting `NATIVE_TOOLS_ENFORCER_FORCE_NEW=1` in `~/.claude/settings.json` (optional, Case E). If they decline, stop.
- `env_var_set=true`: tell the user the plugin is already pinned to new mode and both binaries are present — nothing to do. Only offer to remove the pin (Case F) if the user asks.

### Case B — Binaries missing on macOS/Linux

**When:** `os ∈ {macos, linux}` AND (`bfs_present=false` OR `ugrep_present=false`).

**Action:** First, branch on `env_var_set`:

- `env_var_set=false`: the plugin currently resolves to `pass` mode (no enforcement). Offer to install bfs/ugrep; once installed, the plugin auto-activates new mode.
- `env_var_set=true`: **stale pin** — the hook currently resolves to `new` mode and will recommend binaries that do not exist on this machine, so every `find`/`grep` block points the user at tools they cannot run. Tell the user plainly, then offer two paths:
  1. Install bfs/ugrep to make the pin correct (continue below).
  2. Unset the pin via Case F — plugin falls back to `pass` mode, no enforcement.

Do not write anything to `settings.json` until the user picks.

Then install based on `pkg_manager`:

- `brew`: propose `brew install bfs ugrep`. On confirmation:
  1. Run `brew install bfs ugrep` via Bash.
  2. Re-run the probe (Step 1) — the state has changed.
  3. Re-classify against the cases and continue from the new match. Do not stop before reporting a final state to the user.
- `apt`: print `sudo apt-get install -y bfs ugrep` for the user to run. Do not run it yourself. Ask them to re-invoke the skill when done (say "set up native-tools-enforcer" again, or run `/native-tools-enforcer:setting-up`).
- `dnf`: print `sudo dnf install -y bfs ugrep`. Same instructions.
- `pacman`: print `sudo pacman -S --needed bfs ugrep`. Same instructions.
- `none`: print upstream URLs and stop:
  - bfs: https://tavianator.com/projects/bfs.html
  - ugrep: https://github.com/Genivia/ugrep

If the install fails because a package is not in the distro's repos (most common for `ugrep` on older Ubuntu/Debian), redirect the user to the upstream URLs listed in the `pkg_manager=none` path above.

Do not run `sudo` commands yourself.

### Case C — Windows

**When:** `os=windows`.

**Action:** Explain that on Windows the plugin stays in classic mode (Grep/Glob tools work). Warn that setting `NATIVE_TOOLS_ENFORCER_FORCE_NEW` would force new-mode messages suggesting `bfs`/`ugrep`, which are typically not installed on Windows and would cause block loops. Advise against setting the env var.

If `env_var_set=true` (stale pin from a prior macOS/Linux setup, a synced dotfile, or a mistake), the hook is right now suggesting `bfs`/`ugrep` on a machine where they do not exist. Offer to unset the pin via Case F so the plugin returns to classic mode. Stop.

### Case D — User explicitly asks to force new mode, but binaries are missing

**When:** User asks to set `NATIVE_TOOLS_ENFORCER_FORCE_NEW=1`, AND (`bfs_present=false` OR `ugrep_present=false`).

**Action:** Refuse to write the env var. Explain the loop risk. Redirect to Case B to install binaries first.

### Case E — Force-new pin requested and binaries are present

**When:** User wants to set the env var, AND `bfs_present=true` AND `ugrep_present=true`.

**Action:** Merge the env entry into `~/.claude/settings.json` using the write procedure in Step 3. Show the diff before writing.

### Case F — User asks to remove the env var

**When:** User asks to unset `NATIVE_TOOLS_ENFORCER_FORCE_NEW`.

**Action:** Remove the key via `jq 'del(.env.NATIVE_TOOLS_ENFORCER_FORCE_NEW) | if .env == {} then del(.env) else . end'`. Show the diff before writing. Follow the write procedure in Step 3.

## Step 3 — Writing settings.json

**Before running any write block below:**

1. Show the user the exact JSON that will result from the write.
2. Wait for explicit confirmation ("yes", "go ahead", "ok").
3. Only then execute the write block.

No silent writes. If the user has not confirmed, stop and ask — even if a previous turn implied consent.

Always preserve every existing key. Always write atomically.

**To set the env var:**

    settings="${HOME}/.claude/settings.json"
    tmp="$(mktemp "${settings}.XXXXXX")"
    if [[ -f "$settings" ]]; then
        jq '.env.NATIVE_TOOLS_ENFORCER_FORCE_NEW = "1"' "$settings" > "$tmp"
    else
        mkdir -p "$(dirname "$settings")"
        printf '{"env":{"NATIVE_TOOLS_ENFORCER_FORCE_NEW":"1"}}' | jq '.' > "$tmp"
    fi
    mv "$tmp" "$settings"

**To remove the env var:**

    settings="${HOME}/.claude/settings.json"
    tmp="$(mktemp "${settings}.XXXXXX")"
    jq 'del(.env.NATIVE_TOOLS_ENFORCER_FORCE_NEW) | if .env == {} then del(.env) else . end' "$settings" > "$tmp"
    mv "$tmp" "$settings"

**If `jq` fails** (malformed JSON, syntax error), stop. Report the error to the user and ask them to fix settings.json manually. Do not overwrite a malformed file.

## Step 4 — End with a summary

Always close with one or two sentences naming:
- The mode the plugin will now resolve to.
- Whether the user needs to restart Claude Code (required if settings.json was modified or bfs/ugrep were freshly installed).

## Red flags — do not do these

- Do not run `sudo` commands yourself.
- Do not write `NATIVE_TOOLS_ENFORCER_FORCE_NEW` when bfs or ugrep are missing (Case D).
- Do not write to `settings.json` without first showing the user the resulting JSON and getting explicit confirmation.
- Do not write to the project-level `.claude/settings.json` — this skill is user-level (`~/.claude/settings.json`) only.
- Do not rewrite settings.json. Always merge via `jq`.
- Do not create a `.bak` file. The atomic `mv` is the safety net.
Files in this package (2)
  • SKILL.md 8 KB
  • scripts/probe.sh 3 KB

Versions

The database has no other skills named setting-up.

Database snapshot: 13.11.2026 · package version 2f494d728ccb (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100test-naming-enforcer
    Test Naming Enforcer - Auto-activating skill for Test Automation. Triggers on: test naming enforcer, test naming enforcer Part of the Test Automation skill category. Use when writing or running tests. Trigger with phrases like "test naming enforcer", "test enforcer", "test".
  • 100cli-tools
    Use when ANY command fails with 'command not found', when installing CLI tools (ripgrep, fd, jq, yq, bat, etc.), auditing project environments, or batch-updating tools. Triggers on: command not found, install tool, missing binary, environment audit, update tools, which, apt install, brew install.
  • 100auto-enforcer-action
    Use when setting up automatic PR constraint enforcement via GitHub Actions — covers the advisory-vs-blocking split, workflow installation, configuration options, and reading the output
  • 90deprecation-lifecycle-enforcer
    Apply deprecation lifecycle rules while preserving compatibility and documenting replacement owners/paths. Use when requests deprecate packages/APIs or retire legacy runtimes.
  • 95nextjs-import-enforcer
    Automatically enforce consistent import patterns using Next.js path aliases and proper organization. Use when writing imports, creating new files, or organizing code structure.
  • 95django-import-enforcer
    Automatically validate and fix Django import patterns to use absolute modular imports with aliases. Use when writing imports, creating new Python files, modifying existing files, or seeing import statements in code.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.