---
name: glab-user-find
description: >
  Find a GitLab user in the Pysae group by name (first, last, or partial), with
  case-insensitive, accent-folded fuzzy matching against group members. Use when the user says
  /glab-user-find, 'qui est <nom>', 'trouve l'utilisateur', 'cherche l'utilisateur',
  'username de <nom>', 'le username de <nom>', 'quel est le compte GitLab de <nom>',
  'trouve le user GitLab', 'who is <name>', 'find the GitLab user', 'username of <name>',
  "what's <name>'s GitLab handle", 'look up the GitLab account for <name>', or when another skill
  needs to resolve a person name to a GitLab username. Distinct from /glab-issue-find and
  /glab-mr-find, which locate issues/MRs rather than people.
argument-hint: "<first name, last name, or partial name>"
allowed-tools:
  - Bash
---

Resolve a person's name to their GitLab username in the Pysae group.

```bash
pysae-ai-tools glab find-issue --help 2>/dev/null  # Uses resolve_username internally
```

The `pysae_ai_tools.common.glab.fetch_issues` module already has `resolve_username()` which does fuzzy matching against Pysae group members. Use it directly:

```bash
MEMBERS=$(glab api "groups/pysae/members/all?per_page=100")
```

Match `$ARGUMENTS` against each member's `name` (display name) and `username`:
- Case-insensitive
- Partial match (first name, last name, or substring)
- Unicode-normalized (é=e, ç=c, etc.)

If one match: print the username and full name.
If multiple matches: list them all for the user.
If no match: inform the user.

$ARGUMENTS

## Required tools

- `glab`

Run `pysae-ai-tools tools require <tools>` before starting; if it exits non-zero, abort and report the install command from stderr to the user.

