Look before edit

From theheavenlyd3mon/hermes-profiles · View interactive version

Look before edit is an AI agent skill from the GitHub repository theheavenlyd3mon/hermes-profiles. Forces investigation before editing code. Prevents breaking things by checking who uses the file first. Inspired by ECC's GateGuard.

How to use this skill

Skill file

Look Before Edit

Before changing a file, check what connects to it. Prevents cascade failures.

When To Use

Before making any code change that isn't a brand-new file. Especially for:

Steps

1. Find Who Imports This File

# For JS/TS files
grep -rn "from.*['\"].*FILENAME\|require.*FILENAME\|import.*FILENAME" --include='*.{js,ts,jsx,tsx}' . | grep -v node_modules

# For Python files
grep -rn "import.*FILENAME\|from.*FILENAME" --include='*.py' . | grep -v __pycache__

2. Check What This File Exports

3. Check Data Flow

4. Read The User's Actual Request

5. Make The Change

Red Flags (Stop and Ask)

What NOT To Do

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.