| name | post-to-facebook |
| description | Post a product listing to Facebook Marketplace using the browser. Reads listing data from the product's LISTING.md, navigates to Facebook Marketplace, and fills in the listing form. |
| user_invocable | true |
| argument | (optional) product name (subfolder name under marketplace/) |
Post to Facebook Marketplace
{% if argument %}
You are posting the listing for {{ argument }} to Facebook Marketplace using the browser MCP tools.
Use {{ argument }} as the PRODUCT_NAME throughout the steps below.
{% else %}
Step 0 – Select a Product
No product was specified. You need to find a product that hasn't been posted to Facebook yet.
- Use
Glob to find all LISTING.md files under the project directory.
- For each
LISTING.md, read it and check if it contains a פוסט פייסבוק row in the פרטי מוצר table.
- Collect all products that do NOT have a פוסט פייסבוק entry (i.e., no Facebook post URL yet).
- If all products already have a Facebook post, tell the user "All listings already have a Facebook post URL" and stop.
- If there are multiple products without a Facebook post, pick the first one alphabetically and tell the user which product you selected.
- Use the selected product's subfolder name as the PRODUCT_NAME throughout the steps below.
{% endif %}
In all steps below, replace PRODUCT_NAME with the resolved product name (either from the argument or from Step 0).
Task Tracking
At the start of this skill, create a task list using TaskCreate to track progress. Create one task per step:
- "Read listing data from LISTING.md"
- "Navigate to Facebook Marketplace"
- "Fill in listing form"
- "Review before publishing"
- "Publish listing"
- "Update index.html dashboard"
As you begin each step, update its task to in_progress. When a step completes, update it to completed. If a step is blocked or fails, update it to blocked or note the issue.
Step 1 – Read Listing Data
- Read
PRODUCT_NAME/LISTING.md
- Extract all listing fields:
- Title: from כותרת לפוסט section
- Description: from תיאור לפוסט section
- Price: מחיר מבוקש from מחירי שוק table
- Category: קטגוריה from פרטי מוצר table
- Photos: all image files (*.jpeg, *.jpg, *.png, *.webp) in the
PRODUCT_NAME/ directory
- If the title, description, or price is empty, STOP and tell the user to run
/research-product PRODUCT_NAME first.
- Check if there is an
archive/ subdirectory in the product folder. If there is NO archive/ directory, the photos haven't been processed yet — automatically run the /process-photos PRODUCT_NAME skill to process them before continuing. After processing completes, re-scan the directory for the updated photo list.
Step 2 – Navigate to Facebook Marketplace
- First, create a new browser tab using
browser_tab_create to avoid conflicting with other browser sessions.
- Use
browser_navigate to go to: https://www.facebook.com/marketplace/create/item
- Take a snapshot to see the current page state
- If not logged in, take a screenshot and ask the user to log in manually, then wait and retry
Step 3 – Fill in the Listing Form
Facebook Marketplace's "Create new listing" form has these fields. Fill them in order, taking a snapshot after each major action to verify state.
Photos
- Look for the photo upload area (usually "Add photos" or "הוסף תמונות")
- Photo upload requires file paths — tell the user the absolute paths of the processed photos (from Step 2) they need to upload manually:
- List each processed photo with its full path
- Wait for the user to confirm photos are uploaded before continuing
Title
- Find the title/כותרת input field
- Type the value from כותרת לפוסט
Price
- Find the price/מחיר input field
- Type the מחיר מבוקש value — numbers only, no currency symbol
Category
- Find the category/קטגוריה field
- Click it and search for or select the appropriate category based on קטגוריה
- Use snapshot to find matching options and click the best match
Condition
- Find the condition/מצב field
- Select "Used - Good" / "משומש – מצב טוב" (or equivalent)
Description
- Find the description/תיאור text area
- Type the full description from תיאור לפוסט
- Note: newlines should be typed as-is
Location
- If a location field is present and empty, type "תל אביב" or "Tel Aviv"
- Select the first suggestion from the dropdown
Step 4 – Review Before Publishing
- Take a screenshot of the completed form
- Show the screenshot to the user
- Present a summary of what was filled in:
- Title
- Price
- Category
- Description (first 2 lines)
- Number of photos
- Ask the user for explicit confirmation before clicking "Publish" / "פרסם"
- Do NOT click publish without user approval
Step 5 – Publish (only after user confirms)
- Once the user approves, click through all remaining steps ("Next" / "הבא" / "Publish" / "פרסם") without asking for additional confirmations. Just click Next, then Publish, navigating through any review/confirmation pages automatically.
- Take a snapshot/screenshot to verify the listing was posted successfully.
- Once published, copy the URL of the new listing from the browser.
- Add a פוסט פייסבוק row to the פרטי מוצר table in
PRODUCT_NAME/LISTING.md with the listing URL.
Step 6 – Update index.html
- Open
index.html in the project root.
- In the dashboard summary table, find the row for PRODUCT_NAME and:
- Change the status from
ממתין (with class status-pending) to פורסם (with class status-listed).
- Add the Facebook listing URL in the לינק לפוסט column.
- In the product card for PRODUCT_NAME, add a Facebook post link button (class
fb-post-link) with the listing URL, if one doesn't already exist. Place it after the badge and before the price tag, matching the format of other cards that have it.
Important Notes
- Always snapshot before interacting — Facebook's UI changes frequently; never assume element refs from a previous snapshot are still valid.
- Never guess refs — always take a fresh snapshot to get current element references.
- If something fails, take a screenshot, show it to the user, and ask how to proceed.
- RTL text: Hebrew text may render RTL. When typing Hebrew, type it as-is — the browser handles directionality.
- Photos cannot be uploaded programmatically via browser_click on file inputs in most cases. Provide the user with the file paths and ask them to drag-and-drop or use the file picker manually.