Create a new book review post with proper frontmatter, cover image, and Amazon affiliate link. Use when creating book reviews, adding new reviews, or setting up review posts.
Create a new book review post by gathering information from the user, automatically finding the Amazon product, downloading the cover image, and generating the required files.
When the user invokes this skill, follow these steps:
Use the AskUserQuestion tool to collect the following information:
Use WebSearch to search for the book on Amazon:
Query: "BOOK_TITLE" "AUTHOR_NAME" site:amazon.com
From the search results, identify the Amazon product URL (should contain /dp/ followed by the ASIN)
Extract the ASIN (10-character code after /dp/)
Use WebFetch on the Amazon product page to extract the main product image URL
The cover image is typically in a format like:
https://m.media-amazon.com/images/I/IMAGEID._SX300_.jpgDownload the image using curl or wget to a temporary location
Determine the dasherized filename from the book title:
Resize the image to approximately 500px height while maintaining aspect ratio and save to the destination:
curl -L "IMAGE_URL" -o /tmp/book-cover.jpg && sips -Z 500 /tmp/book-cover.jpg --out "assets/img/reviews/DASHERIZED-NAME.jpg"
Create the affiliate URL in this format:
https://www.amazon.com/BOOK-SLUG/dp/ASIN?&linkCode=ll1&tag=brikis98-20&linkId=RANDOM_HEX&language=en_US&ref_=as_li_ss_tl
openssl rand -hex 16
Determine today's date in YYYY-MM-DD format
Create the file at: _posts/YYYY-MM-DD-DASHERIZED-NAME.md
Use this frontmatter template:
---
layout: post
title: "Review: BOOK_TITLE by AUTHOR_NAME"
tags: ["Review: Fiction/Nonfiction", "X Stars", "Genre1", "Genre2", ...]
thumbnail_path: "reviews/DASHERIZED-NAME.jpg"
header_image_url: "AFFILIATE_URL"
excerpt_separator: "<!--more-->"
book_series_name: "SERIES_NAME Series" # Only include if part of a series
book_series_number: N # Only include if part of a series
---
Write your review here...
<!--more-->
Continue your review here...
If this is part of a book series, create a file at _book_series/SERIES_NAME.md with the following frontmatter
template:
---
---
title: "SERIES_NAME Series"
author: AUTHOR_NAME
layout: book-series
---
After creating the files:
For a book titled "Project Hail Mary" by Andy Weir, rated 5 stars, Fiction, genres "Science Fiction, Space":
Search: "Project Hail Mary" "Andy Weir" site:amazon.com
Extracted ASIN: 0593135202
Downloaded cover to: assets/img/reviews/project-hail-mary.jpg
Created file: _posts/2025-01-01-project-hail-mary.md
Frontmatter:
---
layout: post
title: "Review: Project Hail Mary by Andy Weir"
tags: ["Review: Fiction", "5 Stars", "Science Fiction", "Space"]
thumbnail_path: "reviews/project-hail-mary.jpg"
header_image_url: "https://www.amazon.com/Project-Hail-Mary-Andy-Weir/dp/0593135202?&linkCode=ll1&tag=brikis98-20&linkId=a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4&language=en_US&ref_=as_li_ss_tl"
excerpt_separator: "<!--more-->"
---
brikis98-20