rename-tool

rename-tool is a cursor rule for Cursor from golid-ai/golid. It costs 0 tokens per session (1,295 once invoked), scanned A, original, MIT.

Rules for a tool that renames an entire software project, including its files, module path, brand references, and domain name.

In plain words
What is it for?
Use it when rebranding a project, checking for leftover names, replacing starter copy, or updating module and domain settings.
Why use it?
It helps prevent missed old names while protecting domain addresses from being accidentally changed.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is go run ./cmd/rename <name> <module-path> [new-domain] [--strict] [--starter-copy-hint].

Good fit Use it when rebranding a project, checking for leftover names, replacing starter copy, or updating module and domain settings.

Compare 6 cursor rules from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/golid-ai/golid
agentmods
npx agentmods add rules/golid-ai/golid/rename-tool

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for rename-tool

README.md
[![agentmods](https://agentmods.dev/badge/rules/golid-ai/golid/rename-tool/github.svg)](https://agentmods.dev/rules/golid-ai/golid/rename-tool)
Your own site
<a href="https://agentmods.dev/rules/golid-ai/golid/rename-tool"><img src="https://agentmods.dev/badge/rules/golid-ai/golid/rename-tool/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for rename-tool

Your own site · 80×15
<a href="https://agentmods.dev/rules/golid-ai/golid/rename-tool"><img src="https://agentmods.dev/badge/rules/golid-ai/golid/rename-tool.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 1,295 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.01295
Opus 5 $0.00000 $0.00647
Sonnet 5 $0.00000 $0.00259
Haiku 4.5 $0.00000 $0.00129

Measured 9d ago against content hash 23e349838566, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

rename-tool scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/rename-tool.mdc · 90 lines

How it starts

The opening of the file, as written. The whole thing — 90 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Rename Tool Patterns

Thesis: A missed file means a downstream user ships with the wrong brand. A naive replacement corrupts domain URLs. Every rename must be domain-safe and total.

The rename tool (make rename / go run ./cmd/rename) rebrands the entire project. It's high-risk — a missed file means a downstream user ships with "Golid" in their app, and a naive replacement corrupts domain URLs.

CLI

go run ./cmd/rename <name> <module-path> [new-domain] [--strict] [--starter-copy-hint]
make rename name=myapp module=github.com/user/myapp/backend domain=myapp.com
  • new-domain — replaces golid.ai / https://golid.ai fallbacks; prints prod env checklist.
  • --strict — exit non-zero if survivor scan finds leftover golid in shipped paths.
  • --starter-copy-hint — lists files with starter marketing copy to rewrite manually.

Domain-Safe Replacement

replaceInFileSafe uses a null-byte placeholder to protect the project domain (golid.ai) from corruption. Without it, "golid"→"myapp" turns golid.ai into myapp.ai.

const placeholder = "\x00DOMAIN\x00"
protected := strings.ReplaceAll(content, oldDomain, placeholder)
updated := strings.ReplaceAll(protected, old, new)
final := strings.ReplaceAll(updated, placeholder, oldDomain)

Use replaceInFileSafe for any file that might contain the project domain (docker-compose, deploy scripts, env files, infra templates, CI configs). Use replaceInFile for files that only contain module paths or titled names (Go imports, package.json scope). When [new-domain] is passed, run a separate replaceDomain pass with plain replaceInFile on domain-bearing paths.

Self-preservation

Never edit backend/cmd/rename/main.go. Skip the file entirely in the Go walk so baseline oldModule / oldProjectName constants survive fork renames.

File Coverage

The tool must cover every file with hardcoded project names. Current categories:

# Target Function
1 go.mod Module path
2 All .go except cmd/rename/main.go Import paths + titled + safe lowercase
3 docker-compose.yml Container/DB names
4 package.json + lock npm scope
5 README.md GitHub repo + titled + safe lowercase (tree paths)
6 .cursor/rules/*.mdc Module path + titled + project name
7 docs/**/*.md except decisions/, plans/archive/ Module + safe lowercase + titled
8 frontend/src/**/*.{ts,tsx} Titled + safe lowercase + all-caps
8b frontend/src/**/*.css Branded class names
8c frontend/tests/**/*.{ts,tsx} Same as src (e2e + unit URLs/headings)
9 Community files + CODE_OF_CONDUCT.md (if present) GitHub + titled + safe lowercase
9b .github/ISSUE_TEMPLATE/*.md GitHub + titled + safe lowercase
10 codecov.yml Module path
11 All config/.env.* via glob APP_NAME + DB names (warn if .env.local missing)
12 scripts/*.sh + scripts/README.md Project name + titled (setup-domain.sh, init-test-db.sh)
13 Swagger docs, DevContainer, Dockerfiles Titled + project name
14 infra/**/*.yaml + .github/workflows/*.yml Safe lowercase + titled (descriptions)
15 Scaffold template + backend Makefile Titled name
16 testutil/testutil.go Default DB name
17 Entrypoint scripts Project + titled name
18 openapi.yaml Titled + project name
19 .gitignore All-caps project name in comments
20 CI overlay, dev tooling, drift scripts Safe + titled where branded
21 [new-domain] pass og-meta.tsx, entry-server.tsx, tests, setup-domain.sh, README link
22 Public assets Rename golid-og.png / meta.png when present; warn on favicons

Read the full file on GitHub · 90 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 90 lines · 0 tokens per session scan A 23e349838566

Subscribe to this mod's changes

rename-tool is a cursor rule published in the GitHub repository golid-ai/golid (40 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,295 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.