From wordpress-expert
Gathers structured context on symptoms, timeline, environment, scope, urgency, and prior diagnostics before running skills to produce focused investigation plans. For troubleshooting sessions.
npx claudepluginhub dr-robert-li/cowork-wordpress-expertThis skill uses the workspace's default tool permissions.
You gather context from the user before running diagnostics. This produces a structured understanding of what's wrong, what matters, and what to focus on — so diagnostic skills run smarter, not just harder.
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Guides building MCP servers enabling LLMs to interact with external services via tools. Covers best practices, TypeScript/Node (MCP SDK), Python (FastMCP).
Generates original PNG/PDF visual art via design philosophy manifestos for posters, graphics, and static designs on user request.
You gather context from the user before running diagnostics. This produces a structured understanding of what's wrong, what matters, and what to focus on — so diagnostic skills run smarter, not just harder.
Ask conversationally, not as a checklist. Extract what you need from what the user already said. Only ask about gaps. If the user says "just scan it" or "skip", bypass entirely and proceed with defaults.
Before asking anything, check for prior diagnostic history on this site.
SITE_NAME="${1:-default-site}"
MEMORY_DIR="memory/${SITE_NAME}"
CASE_LOG="${MEMORY_DIR}/case-log.json"
# Check for prior cases
if [ -f "$CASE_LOG" ]; then
LAST_CASE=$(jq -r '.cases[-1]' "$CASE_LOG" 2>/dev/null)
LAST_DATE=$(echo "$LAST_CASE" | jq -r '.date // empty')
LAST_CONCERN=$(echo "$LAST_CASE" | jq -r '.concern // empty')
LAST_GRADE=$(echo "$LAST_CASE" | jq -r '.health_grade // empty')
OPEN_ITEMS=$(echo "$LAST_CASE" | jq -r '.open_items[]? // empty')
fi
If prior context exists, reference it naturally:
If no prior context, skip this step entirely.
Gather information across these six dimensions. You do NOT need to ask about all of them — extract what you can from the user's initial message and only probe gaps.
What to understand: What's happening vs. what the user expected.
Probe questions (use 1-2, not all):
Extract: symptom description, error messages, affected functionality.
What to understand: When it started and what changed.
Probe questions:
Extract: onset date, recent changes, correlation with events.
What to understand: Hosting, caching, CDN, and infrastructure context.
Probe questions:
Extract: host provider, caching layers, CDN, environment count.
Note: Much of this can be discovered automatically by site-scout. Only ask if it directly affects diagnostic approach.
What to understand: How widespread the issue is.
Probe questions:
Extract: affected pages/areas, user segments, frontend vs backend.
What to understand: Is this an emergency or a proactive review?
Detection patterns:
If emergency detected: Skip remaining questions, proceed immediately with full security scan.
Extract: urgency level (emergency / urgent / routine / proactive).
What to understand: What the user has already tried.
Probe questions:
Extract: actions taken, tools used, results observed.
Key principle: Don't ask questions the user already answered.
When the user invokes /investigate with context (e.g., "investigate security on mysite — it got hacked last week"), extract:
Then only ask about gaps: scope, environment, prior work.
If the user says any of these, bypass intake entirely:
When skipped, proceed with default full scan and note: "Proceeding with standard full scan. No specific concerns noted."
Before proceeding to diagnostics, present a summary for confirmation.
Template:
Based on what you've told me, here's my understanding:
**Concern:** {1-2 sentence summary of the problem/goal}
**Urgency:** {Emergency / Urgent / Routine / Proactive}
**Focus areas:** {Which diagnostic categories to prioritize}
**Assumptions:** {What I'm assuming based on gaps}
Shall I proceed, or want to adjust anything?
If user confirms: Proceed to diagnostic planning. If user adjusts: Update understanding and re-present gate.
Write the structured context to memory/{site}/active-case.json:
{
"case_id": "case-{YYYY-MM-DD}-{NNN}",
"created": "{ISO8601 timestamp}",
"site": "{site-name}",
"concern": {
"summary": "Site was hacked last week, user wants security verification",
"type": "security",
"urgency": "emergency",
"keywords": ["hacked", "security", "breach"]
},
"context": {
"symptoms": "Unknown modifications detected by hosting provider",
"timeline": "Noticed last week after hosting provider alert",
"environment": "Shared hosting, no CDN, single production site",
"scope": "Entire site potentially affected",
"prior_work": "Hosting provider ran basic malware scan, found nothing"
},
"diagnostic_focus": {
"priority_skills": ["diagnostic-core-integrity", "diagnostic-malware-scan", "diagnostic-config-security"],
"secondary_skills": ["diagnostic-user-audit", "diagnostic-code-quality"],
"skip_skills": [],
"focus_areas": ["Modified core files", "Backdoor detection", "User account compromise"]
},
"prior_case_reference": "case-2026-02-10-001"
}
# Generate sequential case ID for the day
DATE=$(date +%Y-%m-%d)
EXISTING=$(jq -r "[.cases[] | select(.case_id | startswith(\"case-${DATE}\"))] | length" "$CASE_LOG" 2>/dev/null || echo "0")
NEXT_NUM=$(printf "%03d" $((EXISTING + 1)))
CASE_ID="case-${DATE}-${NEXT_NUM}"
Map user concerns to diagnostic skill priorities:
| Concern Type | Priority Skills | Secondary Skills |
|---|---|---|
| security | core-integrity, malware-scan, config-security, user-audit | code-quality |
| performance | code-quality, config-security | version-audit |
| code-quality | code-quality, malware-scan | config-security |
| updates | version-audit | config-security |
| general / proactive | all skills equally | — |
| unknown | all skills equally | — |
if [ ! -f sites.json ]; then
echo "ERROR: No sites configured. Run /connect first."
exit 1
fi
If the user invokes /investigate with no additional context and doesn't respond to questions after two attempts, proceed with default full scan.
If memory/{site}/active-case.json cannot be written (permissions, disk full), warn but continue — the diagnostic planning step can work without it by using inline context.