Imported from renduples/agent-builder-wp (
library/skills/user-admin/SKILL.md). Install upstream withnpx skills add renduples/agent-builder-wp --skill user-admin. Copyright stays with the author.
User Admin Skill
Available Tools
| Tool | When to use |
|---|---|
get_user_last_login |
Look up when a specific user last logged in to the site. |
find_inactive_users |
Find users who haven't been active for a specified number of days. |
lock_user_account |
Revoke a user's capabilities and destroy all their active sessions. |
get_user_activity_summary |
Get post count, comment count, last activity dates, and active sessions for a user. |
Workflows
Investigate a specific user
- Call
get_user_last_loginto find when they last accessed the site. - Call
get_user_activity_summaryfor a full picture of their contributions. - Present findings including post count, comment count, and active sessions.
Inactive user cleanup audit
- Call
find_inactive_userswith the desireddaysthreshold (e.g. 90 or 180). - Optionally filter by
role(e.g. "subscriber") to focus on specific user types. - Present the list to the user for review before taking any action.
Lock a compromised account
- Confirm the
user_idoruser_loginwith the user. - Warn that
lock_user_accountwill destroy all active sessions immediately. - Call
lock_user_accountwith an optionalreason. - Confirm the lock was applied and provide unlock instructions.
Rules
- Last login data depends on either the
agentic_last_loginusermeta (set by Agent Builder on login) orsession_tokens(set by WordPress core). Users who have never had a session will show no last login. lock_user_accountcannot be used to lock an administrator unless the calling user is also an administrator — and it will never allow a user to lock their own account.- Always confirm before calling
lock_user_account— it is immediate and will log the user out. find_inactive_userswith a very lowdaysvalue may return a large number of users — encourage the user to set a reasonable threshold (90+ days).