一键导入
ddev-xhgui-analyze
Analyze an xhgui/xhprof profile run from a DDEV environment. Provide one run ID for standalone analysis, or two for before/after comparison.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Analyze an xhgui/xhprof profile run from a DDEV environment. Provide one run ID for standalone analysis, or two for before/after comparison.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when asked to record demo videos or screenshots of a Drupal site (running under DDEV) to share with people — e.g. "make a demo video of <feature>", "record a walkthrough", "capture screenshots of this flow for the team", "show this working". Produces 1080p, narrated, validated, presentable captures driven through the real UI with e0ipso/ddev-playwright-cli. Do NOT use for writing automated/CI Playwright tests (use the playwright-cli skill) or for non-Drupal / non-DDEV recording.
Generate, compare, select, and refine multiple distinct ideas using the Idea Crucible Method. Use when the user wants to brainstorm several options for a task, weigh alternatives against criteria, pick the strongest one with clear justification, and iteratively refine it. Triggers on ideation, brainstorming, comparing options/approaches, decision-making between alternatives, and strategic problem-solving — even when the user doesn't name the method.
Produces a downloadable Markdown security review report evaluating a SaaS application or product for possible use at Lullabot, anchored to Lullabot's SaaS service evaluation guidance. Use this whenever someone asks for a Lullabot security review, a SaaS/vendor/tool security review for Lullabot, asks to evaluate or vet a cloud service or app for Lullabot use, or asks to revise/update an existing Lullabot security review. Trigger on phrases like "security review", "vendor review", "vet this tool", "is X safe to use at Lullabot", or references to the security review submissions spreadsheet, even when the word "skill" is not used.
Remove signs of AI-generated writing from text. Use when editing or reviewing text to make it sound more natural and human-written. Based on the comprehensive Wikipedia "Signs of AI writing" guide. Detects and fixes patterns including inflated symbolism, promotional language, superficial -ing analyses, vague attributions, em dash overuse, rule of three, AI vocabulary words, negative parallelisms, excessive conjunctive phrases, and conversational tells like emphatic "real", announcing the rhetorical move, and anthropomorphized objects.
Reviews a Claude Code skill against skill-authoring best practices and produces a prioritized, non-blocking report. Use when creating, editing, or reviewing a SKILL.md, a skill's meta.yml, or a skill directory, or when asked whether a skill follows best practices.
Turn a Screaming Frog 'All Outlinks' CSV export into a clean broken-links report (Excel workbook). Use whenever the user has a Screaming Frog outlinks export and wants to find, triage, report on, or clean up broken links — including phrasings like 'broken link report', 'dead links', 'find the 404s', 'clean up this outlinks export', 'which links are broken', or 'report on bad links from this crawl'. Trigger even if the user hands over a CSV with From/To/Status Code columns and asks what's broken.
| name | ddev-xhgui-analyze |
| description | Analyze an xhgui/xhprof profile run from a DDEV environment. Provide one run ID for standalone analysis, or two for before/after comparison. |
| argument-hint | <run_id> [compare_run_id] |
| disable-model-invocation | true |
You are a performance analysis specialist. Your job is to fetch xhprof profile data from the xhgui service in a DDEV environment, analyze it, and present a clear summary of where time is being spent.
This skill requires:
.ddev/ config). All commands below use ddev exec.https://<project>.ddev.site:8143) or by querying the database directly:
ddev exec mysql -u db -pdb xhgui -e "SELECT id, url, request_ts FROM results ORDER BY request_ts DESC LIMIT 10"
If any prerequisite is not met, inform the user and point them to the DDEV docs linked above.
The user provides: $ARGUMENTS
Parse the arguments:
Query the xhgui MySQL database for run-level summary data. The xhgui DDEV add-on stores profiling data in the xhgui database on the db service using PDO/MySQL.
ddev exec mysql -u db -pdb xhgui -e "SELECT id, url, simple_url, request_ts, main_wt, main_ct, main_cpu, main_mu, main_pmu FROM results WHERE id = '<run_id>'"
Do this for each run ID provided. Verify the run exists before proceeding.
Export the full profile JSON (stored as longtext in the profile column) to /tmp inside the container:
ddev exec bash << 'EOF'
mysql -u db -pdb xhgui -N -e "SELECT profile FROM results WHERE id = '<run_id>'" > /tmp/xhgui_profile_<run_id>.json
EOF
Pipe a PHP script into the container via ddev exec php using a heredoc. The script reads the exported JSON from the container's /tmp. PHP is always available in DDEV containers.
ddev exec php << 'PHPEOF'
<?php
$profile = json_decode(file_get_contents('/tmp/xhgui_profile_<run_id>.json'), true);
// ... analysis code ...
PHPEOF
The analysis should produce:
The profile is a dictionary keyed by "caller==>callee" with values {wt, ct, cpu, mu, pmu}. Aggregate inclusive wall time per callee across all callers.
Filter for functions containing: guzzle, curl, http, stream_. Show the top entries by wall time.
Look for functions that belong to the project's own codebase (non-vendor, non-core). Identify custom modules, services, or controllers that appear in the top functions by wall time. Cross-reference with the project directory structure to categorize them.
Also look for hotspots in these common areas:
For the top time-consuming leaf functions (functions where most time is actually spent, not just passed through), trace the caller chain by examining caller==>callee keys.
For the most expensive custom (non-vendor) functions found in the profile, use Grep/Glob to find them in the codebase and understand what the code is actually doing. This provides context for the recommendations.
Present a structured summary:
Include everything above for the "after" run, plus:
wt) is in microseconds in the profile data. Convert to milliseconds or seconds for display.ct) indicates how many times a function was invoked.main_wt in the results table is also in microseconds.request_ts is a Unix timestamp.==> as the caller/callee separator.mu, pmu) are in bytes.