Agent skill
wordpress-hook-generator
Generate WordPress actions and filters with proper naming conventions. Use when creating hooks for the login page or plugin functionality.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/wordpress-hook-generator
SKILL.md
WordPress Hook Generator
Instructions
When the user wants to add a WordPress hook:
-
Determine hook type:
- Action (
add_action): Performs an action, no return value - Filter (
add_filter): Modifies data, must return a value
- Action (
-
Apply naming convention:
- Prefix:
retrologin_ - Example:
retrologin_login_head,retrologin_custom_message
- Prefix:
-
Create callback function:
- Use namespace:
Retrologin\ - Or use string callback:
'retrologin_callback'
- Use namespace:
-
Register the hook:
- Actions:
add_action('hook_name', 'callback', priority, args) - Filters:
add_filter('hook_name', 'callback', priority, args)
- Actions:
Example
// Action: Enqueue assets on login page
add_action('login_enqueue_scripts', 'retrologin_enqueue_assets');
function retrologin_enqueue_assets(): void {
wp_enqueue_style('retrologin-login', plugins_url('dist/assets/login.css', __FILE__));
}
// Filter: Change logo URL
add_filter('login_headerurl', 'retrologin_login_logo_url');
function retrologin_login_logo_url(): string {
return home_url('/');
}
Common Login Hooks
| Hook | Type | Purpose |
|---|---|---|
login_enqueue_scripts |
Action | Enqueue CSS/JS |
login_headerurl |
Filter | Logo link URL |
login_headertitle |
Filter | Logo title text |
login_message |
Filter | Message above form |
login_footer_text |
Filter | Footer text |
login_redirect |
Filter | Redirect after login |
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?