home / skills / philipp-spiess / ai / tweak
This skill opens your default editor at a targeted file and line to manually tweak code or styles after edits.
npx playbooks add skill philipp-spiess/ai --skill tweakReview the files below or copy the command above to add this skill to your agents.
---
name: tweak
description: Open the user's default editor at a specific line to manually tweak styles or code. Use when the user wants to make manual adjustments after you've made changes.
---
# Tweak
Opens the user's default editor at a specific file and line number, allowing them to manually tweak the code.
## Usage
After making changes to a file, if the user invokes `/tweak`, run the `open-editor.sh` script from this skill directory:
```bash
~/.claude/skills/tweak/open-editor.sh <file_path> <start_line> [end_line]
```
## Instructions
1. When the user says `/tweak`, identify the **last file and line range you edited** in the conversation
2. Run the script with the file path, start line, and end line (for multi-line edits)
3. The script auto-detects which GUI editor is running (Cursor, VS Code, Zed, etc.) and opens the file with the range selected
## Example
Single line edit at line 42:
```bash
~/.claude/skills/tweak/open-editor.sh /Users/philipp/dev/app/src/Button.tsx 42
```
Multi-line edit from line 42 to 58 (opens at start line; range selection only works in Zed):
```bash
~/.claude/skills/tweak/open-editor.sh /Users/philipp/dev/app/src/Button.tsx 42 58
```
This skill opens your default GUI editor at a specific file and line to let you manually tweak code or styles. It is designed to be invoked after automated edits so you can make precise manual changes. The skill calls a local script that detects the active editor and navigates to the requested location.
When you invoke the tweak command, the skill identifies the last file and line range you edited in the conversation. It runs a small local script with the file path and start (and optional end) line. The script detects common GUI editors (VS Code, Zed, Cursor, etc.) and opens the file with the cursor positioned at the requested line, optionally selecting a range.
What if my editor is not detected?
Make sure the editor is running. If detection still fails, open the file manually or configure your editor to be the system default editor.
Does the script change files?
No. The script only opens the file in your editor at the specified line. Manual edits are still performed by you.