Skip to content
Skills Library
Programming · Automation

rename

/rename

Rename a file with full reference cascade — `git mv` the file, then update every non-archive reference across the project. Use when the user says: "rename X to Y", "move X to Y", "X should be called Y", "the file should be Z instead", or signals a path/name change. Catches the dozen-references-cascade problem (renames that work in one place but leave stale pointers everywhere else).

Repository
skills ↗
Licence
MIT
Last repository change
27.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
1
Scripts
0
HTML comments
1
URLs in SKILL.md
0
Deprecation

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

Licence

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

What to check before installing
  • SKILL.md zawiera komentarze HTML (1). Nie widać ich w podglądzie Markdown, a model je czyta.

What it does and when to use it

Rename a file with full reference cascade — `git mv` the file, then update every non-archive reference across the project. Use when the user says: "rename X to Y", "move X to Y", "X should be called Y", "the file should be Z instead", or signals a path/name change. Catches the dozen-references-cascade problem (renames that work in one place but leave stale pointers everywhere else).

Triggers from the description

rename X to Ymove X to YX should be called Ythe file should be Z instead
Original author description

Rename a file with full reference cascade — `git mv` the file, then update every non-archive reference across the project. Use when the user says: "rename X to Y", "move X to Y", "X should be called Y", "the file should be Z instead", or signals a path/name change. Catches the dozen-references-cascade problem (renames that work in one place but leave stale pointers everywhere else).

How it works

  1. When invoked
  2. Reference scan locations (don't miss any)
  3. Reference update strategies
  4. When to NOT use this skill
  5. Common gotchas
  6. What NOT to do
Original SKILL.md headings · 71 lines, 510 words
SKILL.md preview
---
name: rename
description: >-
  Rename a file with full reference cascade — `git mv` the file, then update every non-archive
  reference across the project. Use when the user says: "rename X to Y", "move X to Y", "X should be
  called Y", "the file should be Z instead", or signals a path/name change. Catches the
  dozen-references-cascade problem (renames that work in one place but leave stale pointers
  everywhere else).
---

# Rename

Renaming a file is rarely just a `mv`. There are usually 5-15 references across docs, skills,
scripts, and config that all need updating. This skill handles the cascade.

## When invoked

The user wants to rename or move a file. The flow:

1. **Confirm source and target paths** if not 100% clear from context.
2. **Pre-scan** — grep all non-archive text files for the source path. Show the count by file type.
3. **Show the user the impact** — "Renaming X → Y will update N references across M files. Proceed?"
   Skip if obvious.
4. **Execute**:
   - `git mv <source> <target>` — preserves history.
   - For each non-archive reference, update the path. Use `sed -i '' 's|<old>|<new>|g'` for bulk
     replacement; verify with grep after.
   - Don't touch archive/frozen folders (e.g. `*/archive/`) or archive FILES (names matching
     `*archive*.md`, e.g. `worktrees-archive.md`) — they're historical record.
5. **Verify** — re-grep for the old path; only archive matches should remain.
6. **Single commit**: `rename {old} → {new}; update N references across M files`.

## Reference scan locations (don't miss any)

Scan all non-archive text files for the old path — Markdown, JSON, shell, YAML, and source
(`.md .json .sh .yml .yaml .ts .tsx .js .jsx`). The usual reference homes:

- `CLAUDE.md`, root `README.md`
- `.agent/*.md`, `.docs/**/*.md`
- `.claude/**/*.md` (skills, commands, agents)
- `.todo` and any planning dirs the project keeps (`.agent/plan/`, `.agent/milestone/`, …)
- `bin/*.sh`, scripts, and config (`package.json`, `tsconfig.json`, …) when relevant
- Source code (`packages/`, `apps/`, `src/`) — only if the rename involves a code path

Skip archive/frozen folders (`*/archive/`) AND archive files (names matching `*archive*.md`, e.g.
`worktrees-archive.md`) — they're a frozen historical record, not live references.

## Reference update strategies

- **Bare filename** (`status.md` → `README.md`): bulk replace, verify each occurrence is in the
  right context (could match unrelated text).
- **Full path** (`.docs/status.md` → `.docs/README.md`): bulk replace, simpler — path is more
  specific.
- **Directory rename**: `git mv` the directory; update path references; check imports/aliases.

## When to NOT use this skill

- Renaming a code symbol (variable, function, class) — that's a refactor, not a file rename. Use
  editor/LSP refactoring.
- Reorganizing many files at once — chain individual renames, or use a custom script. This skill is
  for one source → one target.

## Common gotchas

- **Bare-name collisions**: renaming `status.md` to `README.md` when a root `README.md` already
  exists makes `` `README.md` `` references ambiguous. Use full paths in that case.
- **Old name in HTML comments / hidden text**: grep is sufficient as long as you don't restrict to
  `.md` only. Include `.html` if relevant.
- **Symlinks**: rare; if found, follow them (they're usually obsolete and should be removed).
- **`<!-- source: foo.md -->` markers**: from old file consolidation. Remove if the source file no
  longer exists.

## What NOT to do

- Don't touch archive folders or archive-named files (`*archive*.md`). Ever.
- Don't rewrite commit messages from history.
- Don't auto-update if grep returns >50 matches — that's an unusual rename, surface to the user
  first.
- Don't rename without `git mv` (loses history).

Versions

RepositoryScoreLicence
This page · optimiziramsi/skills90MIT
bitwize-music-studio/claude-ai-music-skills100CC0-1.0

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

Downloads in the last 30 days: 4 · ranking

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

Similar skills

  • 100code-rename
    Rename symbols across a codebase safely. Use when renaming functions, variables, classes, or other symbols and need to update all references.
  • 84rename-references
    Sweep stale references after a rename, including forms token-only grep misses (slash-tokens, paths, chain prose, table rows, frontmatter globs). Use when: 'rename X to Y', 'I renamed X', 'audit rename', 'find stale refs', 'check for stragglers', 'after git mv', 'sweep…
  • 100rename-skill
    Rename an existing agent skill (internal or external), updating its directory name, frontmatter name, and codebase-wide references. Use when the user requests to rename a skill, change a skill's identifier, or restructure a skill's folder.
  • 84realign-file-names
    Apply a file-name rename plan one file at a time, one human acceptance each: git mv, rewrite only the reference shapes each citing file's tier allows, rebuild generated records, and sweep for stragglers. Refuses a blanket yes, a range, a glob, and 'all'. Use when: 'apply the…
  • 100rename-sql-table
    TRIGGER when user asks to rename the database table used by a SQL CRUD microservice.
  • 95lov-rename-project
    在保留兼容键与运行连续性的前提下重命名项目、路径和仓库。支持明确输入与结果回读。Use to rename a project and preserve compatibility.

Feedback and reports

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