From wp-agent-skills
Upload, optimize, and register images or video to the WordPress media library. Use when adding photos to the site, uploading a new profile picture, resolving IMAGE: placeholders left after wp-new-page, or when the user says "add this photo", "upload my picture", or "use this image on the site". Also handles bulk placeholder resolution after a page is created.
npx claudepluginhub antonysilverhand/wp-agent-skills --plugin wp-agent-skillsThis skill is limited to using the following tools:
Upload and optimize images. Resolve `IMAGE:` placeholders across pages.
Acquire memory dumps from live systems/VMs and analyze with Volatility 3 for processes, networks, DLLs, injections in incident response or malware hunts.
Provides x86-64/ARM disassembly patterns, calling conventions, control flow recognition for static analysis of executables and compiled binaries.
Identifies anti-debugging checks like IsDebuggerPresent, NtQueryInformationProcess in Windows binaries; suggests bypasses via patches/hooks/scripts for malware analysis, CTFs, authorized RE.
Upload and optimize images. Resolve IMAGE: placeholders across pages.
SOURCE — a local file path, a public image URL, or resolve-placeholdersALT_TEXT — (optional) descriptive alt text. Generated from filename if omitted.If a local file: check it exists and is an image (jpg, png, webp, gif, svg).
If a URL: fetch headers and confirm Content-Type: image/*.
Target: under 400KB for standard images, under 800KB for hero/full-width. If the image is larger or not WebP:
# Convert to WebP with quality 85
cwebp -q 85 input.jpg -o output.webp
If cwebp is unavailable, note the original size and proceed without conversion.
curl -s -X POST "$WP_SITE_URL/wp-json/wp/v2/media" \
-H "Authorization: Basic $(echo -n "$WP_USER:$WP_APP_PASSWORD" | base64)" \
-H "Content-Disposition: attachment; filename=\"<filename>\"" \
-H "Content-Type: image/webp" \
--data-binary @output.webp
Capture the response: extract id, source_url, media_details.sizes.thumbnail.source_url.
curl -s -X POST "$WP_SITE_URL/wp-json/wp/v2/media/<id>" \
-H "Authorization: Basic $(echo -n "$WP_USER:$WP_APP_PASSWORD" | base64)" \
-H "Content-Type: application/json" \
-d "{\"alt_text\": \"$ALT_TEXT\"}"
When SOURCE is resolve-placeholders:
curl -s "$WP_SITE_URL/wp-json/wp/v2/pages?per_page=100&status=publish,draft" \
| jq '[.[] | {id, title: .title.rendered, content: .content.raw}]'
Extract every IMAGE:<description> string from all page content.
For each, search the media library for an existing match by alt text or filename.
List:
IMAGE:<desc> → media ID + URL (already uploaded, matched by description)IMAGE:<desc> — needs a file uploadFor unresolved items, ask for the source files before proceeding.
For each resolved placeholder, update the page content:
Replace IMAGE:<desc> in the wp:image block with the actual id and url.
Update via REST API (full content body required).
wp eval "echo wp_upload_dir()['error'];".wp media import <file> --post_id=<page_id> --featured_image.Content-Type must match the actual file format. Uploading a JPEG with Content-Type: image/webp will create a corrupt entry.For single upload: media ID, full URL, file size, dimensions. For resolve-placeholders: table of resolved vs. unresolved with media IDs for resolved items.