wp-introspect
Skill1 starsChanged 6 months agoMITView on GitHub
Read-only runtime snapshot of WordPress internals via the companion's `/introspect` endpoint — hooks, transients, options, request_state, hook callbacks. Phase = Debug.
In this repository14 other files it gives its agents.
- wp-changesSkill
- wp-connectSkill
- wp-contentSkill
- wp-diagnoseSkill
- wp-edit-designSkill
- wp-edit-pluginSkill
- wp-edit-themeSkill
- wp-execute-phpSkill
- wp-fullSkill
- wp-health-checkSkill
- wp-migrateSkill
- wp-pair-setupSkill
- wp-recoverySkill
- wp-scaffoldSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 2 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 11
Read-only runtime visibility into WordPress.
- Very specific: line 16
NEVER set include_values: true on production-matched siteurl — option/transient values may contain API keys, third-party tokens, or PII.
- Very specific: line 17
NEVER call introspect repeatedly in a tight loop — every call is a full PHP request.
- Very specific: line 18
ALWAYS pair the right scope to the question — hooks answers "who is listening", options_full answers "what is stored", transients answers …
- Very specific: line 38
Read-only access to the companion /introspect endpoint.
- Very specific: line 72
If the introspect reveals a problem worth diagnosing in depth → wp-diagnose.
- Distinctive: line 88
No durable artifact. The introspect response is the value — surface it directly.
- Distinctive: line 92
No examples file. The four scopes are documented in references with concrete inputs/outputs.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
WP Introspect
Read-only runtime visibility into WordPress. Covers four scopes via the companion /introspect endpoint plus hook_state for callback enumeration. Pure read — never writes, never evaluates code (that is wp-execute-php).
Iron Rule
<EXTREMELY-IMPORTANT>
1. NEVER set `include_values: true` on production-matched siteurl — option/transient values may contain API keys, third-party tokens, or PII; the production guard fires server-side but client should self-gate first.
2. NEVER call `introspect` repeatedly in a tight loop — every call is a full PHP request; for repeated polling use `request-observer` instead (see `references/introspect-scopes.md`).
3. ALWAYS pair the right scope to the question — `hooks` answers "who is listening", `options_full` answers "what is stored", `transients` answers "what is cached", `request_state` answers "what's the current request"; using `options_full` for a hook question wastes context.
</EXTREMELY-IMPORTANT>When to use
- "Why is filter X not firing?" →
hooksscope +hook_stateon that hook. - "Why is the transient cache cold?" →
transientsscope. - "What option does plugin X store?" →
options_full(names only, then targeted lookup). - "What's the current request lifecycle state?" →
request_state.
Skip when:
- The question needs PHP-level mutation (run a function, set a variable) →
wp-execute-php. - The question is a multi-probe diagnostic (slow queries + plugin conflicts + PHP errors) →
wp-diagnose. - The question is post/page content → core REST via
wp-content.
Boundary
Owns:
rolepod_wp_introspect(all 4 scopes).rolepod_wp_hook_state(specific hook → callbacks listed).- Read-only access to the companion
/introspectendpoint.
Does not own:
- Mutation of any runtime state →
wp-execute-php(with safety chain). - Analysis / ranking / report (turning raw introspect data into ranked findings) →
wp-diagnose. - File-level reads →
file_read.
Return / hand off:
- Question requires writing →
wp-execute-php. - Question requires CPU-deep probe (slow queries, php_errors) →
wp-diagnose.
Inputs to gather
- target_id.
scope(hooks / transients / options_full / request_state).include_values: trueONLY on non-production targets, and only with explicit user OK.- For
hook_state: the hook name (e.g.wp_head,save_post,woocommerce_checkout_order_processed).
Workflow
1. Pick the scope
See references/introspect-scopes.md for the per-scope decision tree.
2. Call
Single rolepod_wp_introspect { target_id, scope, include_values? } OR rolepod_wp_hook_state { target_id, hook }.
3. Surface
Print the result raw. Do not summarize. The user is debugging — they need verbatim.
4. Hand off if needed
If the introspect reveals a problem worth diagnosing in depth → wp-diagnose. If it reveals a fix that needs runtime PHP → wp-execute-php.
If a matching Rolepod agent is available
rolepod:debug-issue(Rolepod parent skill) for the broader debug workflow this introspect feeds into.rolepod:rolepod-builderfor hook-callback investigation.
If no matching agent is available
- Pick the scope.
- Call.
- Surface verbatim.
- Suggest the next phase if the result requires action.
Output
No durable artifact. The introspect response is the value — surface it directly.
Examples
No examples file. The four scopes are documented in references with concrete inputs/outputs.
References
Load when picking a scope or when an introspect result is unfamiliar:
references/introspect-scopes.md— per-scope decision tree, sample output shape, common pitfalls (transients with sub-resources, options_full size, hook priority sort, request_state during REST vs admin-ajax).
Hard stops
include_values: trueAND target is production-matched → STOP, refuse client-side, do not pass to server (server would refuse too but the request leaks intent).- Companion not installed → STOP, hand off to user with companion install URL.
- Scope mistyped (not in {hooks, transients, options_full, request_state}) → STOP, surface the schema error.
Full Rolepod enhancement
Full Rolepod adds historical introspect diffing (compare today's hook map to yesterday's) using per-site ~/.config/rolepod-wplab/memory/. Standalone, each call is point-in-time.
Next phase
- Result + intent to fix →
wp-execute-php(PHP eval) ORwp-content(REST write) ORwp-edit-plugin(plugin config). - Result is concerning →
wp-diagnosefor the full multi-probe view. - Result is benign → done.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

