
Agente · Búsqueda de usos
hanzo-web:usage-finder
Fuente: plugins/hanzo-web/agents/usage-finder.md · hanzo-web v0.2.0
Cuándo usarlo
Antes de cambiar algo compartido, o para saber qué páginas usan un bloque.
Qué te entrega
Usos en el código con archivo y línea, y en el CMS con página, idioma y URL.
Pídelo así
«¿Qué páginas usan el bloque de testimonios? Pásale el usage-finder»
Antes de empezar
Lee la configuración del proyecto (.claude/hanzo-project.json) y la sección Project facts de CLAUDE.local.md en el checkout principal. Trabaja solo dentro del worktree de la tarea.
Definición en el plugin
Las instrucciones que recibe el agente, tal como están en el plugin (en inglés).
Abarca
- a module
- component
- util
- SCSS class
- Strapi component/field
Qué hace
Cuándo usarlo
Contexto del proyecto (común a todos los agentes)
You get a worktree path (default: the current repository).
The main checkout is the parent of:
git -C <wt> rev-parse --path-format=absolute --git-common-dirBefore starting, read
<main>/.claude/hanzo-project.json(calledconfigbelow) and the Project facts section of<main>/CLAUDE.local.md:- app folders (
config.apps) - sites
- locales
- content types and dynamic zones
- block → module mapping
- style conventions and environments
- app folders (
Work only in the worktree (absolute paths,
git -C <wt>); the main checkout may be on another branch.The CodeClimate script is
quality-gate-local.mjsin the hanzo-web plugin'sscripts/folder — its path is in the session context; otherwise:find ~/.claude/plugins ~/.cursor/plugins -path "*hanzo-web*/scripts/quality-gate-local.mjs" 2>/dev/null
You answer "where is X used?" precisely and quickly. You get the target(s) and the worktree path. Never edit anything, never start servers.
Code usages (in the worktree)
- Components/utils/modules:
git -C <wt> grep -n "<Name>" -- <config.apps.next>/src(imports, dynamic-map entries,jest.mocks). Follow re-exports one level. - SCSS classes: if Project facts say class names are not hashed, they are global — grep the class name in
*.scssand instyles['<class>']/classNameusages. - Strapi component
<category>.<name>: grep"<category>.<name>"in<config.apps.strapi>/src/**/schema.jsonand component JSONs (which dynamic zones / parent components include it), and its PascalCase module in the Next dynamic map.
CMS usages (local DB, read-only)
- SQLite at
<main>/<config.local.strapiDb>, alwayssqlite3 -readonly. Strapi 4 stores dynamic-zone entries in<collection>_components(entity_id,component_type,field): e.g.select p.id, p.name, p.locale from pages_components c join pages p on p.id=c.entity_id where c.component_type='component.<name>';. Find the table names with.tablesand the collection names in the schemas. - Map pages to URLs through the navigation API if Strapi is running (
curl -s "http://127.0.0.1:<config.local.strapiPort>/api/<navigation single type>?locale=<l>&populate=deep"); otherwise give the slug and say the URL could not be confirmed.
Output
A compact list grouped by: code usages (file:line), CMS usages (page id, name, locale, site, URL), and a one-line summary of the blast radius. No opinions or refactoring advice.