classname-search

A CLI tool that searches inside class and className attributes and matches against each class name individually. Use this instead of grep when searching or replacing class names.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "classname-search" with this command: npx skills add yuichiroharai/classname-search/yuichiroharai-classname-search-classname-search

Class Name Search Guide

Windows CLI Setup

  1. Run echo --%
  2. If output is empty (PowerShell): Add --% before arguments (e.g., --% '^flex$')
  3. If not PowerShell: Run npx -y node -e "console.log(process.argv[1])" "^test". If output is test instead of ^test, escape ^ as ^^ (e.g., ^flex$^^flex$)

See CLI Reference for details.

Count matched class names per file

[!WARNING]
AI manual counting is unreliable. Always use this command to count class names.

Command:

npx classname-search stats 'src/**/*.jsx' 'text-'

Output:

src/components/Header.jsx: 3 matches
src/components/Main.jsx: 4 matches

Total: 7 matches in 2 files

[!NOTE]
By default, only files containing matched class names are listed.
Use the --verbose option if you want to include files with 0 matches in the output.

Search for class names

Command:

npx classname-search search 'src/components/**/*.jsx' 'flex'

Output (search):

<!-- prettier-ignore-start -->
{"file":"src/components/Header.jsx","line":3,"matched":"flex","className":"flex","classValue":"flex flex-col"}
{"file":"src/components/Header.jsx","line":3,"matched":"flex","className":"flex-col","classValue":"flex flex-col"}
{"file":"src/components/Header.jsx","line":4,"matched":"flex","className":"inline-flex","classValue":"inline-flex"}
<!-- prettier-ignore-end -->

[!IMPORTANT]
matched is the regex match; className is the full class name containing that match.

File output:

Redirect output to a file for large results or when requested by the user.
Working from file output is strongly recommended to avoid truncation and hallucination.

npx classname-search search 'src/components/**/*.jsx' 'flex' > 'filename.jsonl'

Search and replace class names

Command:

npx classname-search replace 'src/components/**/*.jsx' -- '-slate-(\d+)$' '-neutral-$1'

Output:

Replaced 8 matches of "-slate-(\d+)$" with "-neutral-$1" in 3 files.

Remove class names

Command:

npx classname-search remove 'src/components/**/*.jsx' '^font-normal$'

Output:

Removed 5 matches of "^font-normal$" with "" in 2 files.

CLI Reference

Fetch https://raw.githubusercontent.com/yuichiroharai/classname-search/main/README.md

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

bulk-remove-classname

No summary provided by upstream source.

Repository SourceNeeds Review
General

figma-mcp-downloader

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

openclaw-version-monitor

监控 OpenClaw GitHub 版本更新,获取最新版本发布说明,翻译成中文, 并推送到 Telegram 和 Feishu。用于:(1) 定时检查版本更新 (2) 推送版本更新通知 (3) 生成中文版发布说明

Archived SourceRecently Updated
Coding

ask-claude

Delegate a task to Claude Code CLI and immediately report the result back in chat. Supports persistent sessions with full context memory. Safe execution: no data exfiltration, no external calls, file operations confined to workspace. Use when the user asks to run Claude, delegate a coding task, continue a previous Claude session, or any task benefiting from Claude Code's tools (file editing, code analysis, bash, etc.).

Archived SourceRecently Updated