Search for Slack users by username with intelligent caching. Returns user IDs for DMs and maintains a local cache to avoid repeated API calls. Can answer questions about cached users.
Search for Slack users by username, real name, or display name with intelligent caching. This skill maintains a local cache of users to speed up lookups and can answer questions about the cache.
Features:
jq for fast searches even with 50,000+ usersThis skill provides two executable scripts:
search-user.sh - Find a specific userSearch for a Slack user by username, real name, or display name. Returns the user ID on stdout and details on stderr.
When the user asks:
Run:
~/.claude/plugins/marketplaces/djalmaaraujo-claude-code-plugins/plugins/slack/skills/slack-search-user/search-user.sh <username>
Examples:
# Find user by exact username
~/.claude/plugins/marketplaces/djalmaaraujo-claude-code-plugins/plugins/slack/skills/slack-search-user/search-user.sh djalma
# Output: U01ULLNEM3Q
# Find user by real name
~/.claude/plugins/marketplaces/djalmaaraujo-claude-code-plugins/plugins/slack/skills/slack-search-user/search-user.sh "John Smith"
# Capture user ID in a variable
USER_ID=$(~/.claude/plugins/marketplaces/djalmaaraujo-claude-code-plugins/plugins/slack/skills/slack-search-user/search-user.sh fulano)
echo "User ID: $USER_ID"
How it works:
slack-status)jq (fast, even with 50,000+ users)name, real_name, display_nameMatching examples:
djalma matches user with username djalma.araujojohn matches John Smith in real namewill matches William in display namecache-utils.sh - Cache managementInspect and manage the user cache.
When the user asks:
Run:
~/.claude/plugins/marketplaces/djalmaaraujo-claude-code-plugins/plugins/slack/skills/slack-search-user/cache-utils.sh <command>
Commands:
# Count total cached users
~/.claude/plugins/marketplaces/djalmaaraujo-claude-code-plugins/plugins/slack/skills/slack-search-user/cache-utils.sh count
# Output: Total cached users: 12000
# List all cached users
~/.claude/plugins/marketplaces/djalmaaraujo-claude-code-plugins/plugins/slack/skills/slack-search-user/cache-utils.sh list
# Search for users matching a pattern
~/.claude/plugins/marketplaces/djalmaaraujo-claude-code-plugins/plugins/slack/skills/slack-search-user/cache-utils.sh search will
# Clear the cache
~/.claude/plugins/marketplaces/djalmaaraujo-claude-code-plugins/plugins/slack/skills/slack-search-user/cache-utils.sh clear
This skill uses the centralized Slack plugin configuration at:
~/.claude/plugins/marketplaces/djalmaaraujo-claude-code-plugins/plugins/slack/config.json
The config file contains:
workspace - Your Slack workspace domaintoken - Your session token (xoxc-...)cookie - Your session cookie (xoxd-...)users - Cached user array (auto-populated)Before searching, the skill automatically checks Slack status. If not configured:
ā ļø Slack is not properly configured
MISSING_CONFIG|Config file not found|Create config at: ~/.claude/plugins/marketplaces/djalmaaraujo-claude-code-plugins/plugins/slack/config.json
Please run: /slack:slack-setup
The slack-send-message skill uses this skill to find users for DMs.
jq for streaming, works well with 50,000+ usersjq is required (install with brew install jq on macOS)/slack:slack-setup if needed)| Error | Solution |
|---|---|
Slack is not properly configured |
Run /slack:slack-setup to configure credentials |
invalid_auth |
Token or cookie expired. Re-run /slack:slack-setup |
User 'X' not found |
User doesn't exist or doesn't match any name fields |
jq: command not found |
Install jq: brew install jq (macOS) or apt install jq (Linux) |
| Python JSON decode error | Config file corrupted. Re-run /slack:slack-setup |