host

The host module provides a safe and efficient way to manage the local /etc/hosts file. It handles sudo permissions, provides automated backups before edits, and supports interactive fuzzy searching.

x-cmd/skill3 installsMITSynced Aug 27

Works with

Claude CodeCursorCodex CLIGitHub CopilotGemini CLI

Agent Skills format with YAML frontmatter. Claude Code reads it as-is.

---
name: "host"
description: "The host module provides a safe and efficient way to manage the local /etc/hosts file. It handles sudo permissions, provides automated backups before edits, and supports interactive fuzzy searching."
license: "MIT"
---

# host - Local Host Table Management

The `host` module provides a safe and efficient way to manage the local `/etc/hosts` file. It handles sudo permissions, provides automated backups before edits, and supports interactive fuzzy searching.

## When to Activate
- When the user wants to add or remove local hostname-to-IP mappings.
- When performing a quick lookup of an IP for a local hostname.
- When searching the hosts file interactively using FZF (`fz`).
- When viewing the full contents of the hosts file with pagination.

## Core Principles & Rules
- **Safety**: Automatically creates backups before any modification (`ed` subcommand).
- **Interactive Search**: Use `fz` for a searchable TUI experience.
- **Privilege Handling**: Clearly indicates that editing requires `sudo` access.

## Patterns & Examples

### Add/Edit Mapping
```bash
# Map a local development domain to an IP
x host ed myapp.local=192.168.1.100
```

### Remove Mapping
```bash
# Delete a specific hostname mapping (prefix with -)
x host ed -myapp.local
```

### Search Hosts
```bash
# Interactively search for an entry in the hosts file
x host fz
```

## Checklist
- [ ] Confirm the target hostname and IP address for edits.
- [ ] Verify if the user has sudo permissions for modification.
- [ ] Ensure the operation (add/remove) is clearly understood.

More General & Other skills

← All General & Other skills

Check your AI visibility

One URL in, a 0–100 score and the exact fixes out.

RUN THE CHECK

Browse all the tools

15 tools across six categories
13 of them never send your data anywhere

Free · No signup · No trial clock

SEE THE DIRECTORY