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.
git clone --depth 1 https://github.com/golid-ai/golidnpx agentmods add rules/golid-ai/golid/rename-toolWrote 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.
[](https://agentmods.dev/rules/golid-ai/golid/rename-tool)<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.
<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>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.
| Model | Per session | Once 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 |
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.
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— replacesgolid.ai/https://golid.aifallbacks; prints prod env checklist.--strict— exit non-zero if survivor scan finds leftovergolidin 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 |
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.
- 9d ago First seen · 90 lines · 0 tokens per session scan A 23e349838566
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.
Other cursor rules, from other repositories
adapter-features
Database-specific features must be implemented in the specialized adapter only. Base adapters (postgres, mysql, etc.) must remain database-agnostic.
unit-tests-tdd
TDD required for behavior changes; ≥80% package coverage on touched packages; unit-test conventions.
integration-tests
Human-readable integration test requests; helpers vs httptest; suites/ vs per-DB placement.
state-management
Use the following stack. Do not introduce or recommend Redux or React Context for shared/global state.
backend
You are an expert in Go, Gin, Gorm, Gen, Cosy (https://cosy.uozi.org/) with a deep understanding of best practices and performance optimization techniques in these technologies.
core
Core token-efficiency and response discipline rules. Always active.