social-push

Original🇨🇳 Chinese
Translated

Use agent-browser to help users publish content to social media. This skill is used when users need to publish content, push articles, upload articles, or post to social platforms.

11installs
Added on

NPX Install

npx skill4agent add jihe520/social-push social-push

SKILL.md Content (Chinese)

View Translation Comparison →
User input $ARGUMENTS

Social-push Skill

You need to run agent-browser using bash, and refer to the workflow of the corresponding platform in references to help users upload articles and images to the corresponding social platforms

Rules

  1. Must use the
    --state ~/my-state.json
    parameter to ensure that the user's login status and history are retained
  2. Must use the
    --headed
    parameter to ensure the browser is visible to the user
  3. The final operation can only be save as draft; automatic clicking of the "Publish" button is prohibited, and the user shall confirm the publication on their own

Core Workflow

  1. Confirm publication information: target platform, content type, content source (file path/direct input/AI creation), title, hashtags
  2. Get a basic understanding of the available commands via
    agent-browser --help
  3. Read the workflow of the corresponding platform and content type in references
  4. Strictly follow the steps in the workflow step by step
  5. After each step, use
    agent-browser snapshot -i
    to confirm the page status before executing the next step
  6. Close the browser after completion:
    agent-browser close

Self-evolution

fix and verify Workflow

Webpage interactions may change, and the workflow under references may become invalid. Fix it according to the following steps:
  1. Run
    agent-browser snapshot
    to view the detailed elements of the current page
  2. When the search fails, run
    agent-browser eval "js"
    to view specific HTML elements
  3. After verifying the correct interaction path, edit the corresponding workflow file under references to make corrections

Add New Social Platforms

  1. Refer to the existing workflows under references as templates
  2. Use
    agent-browser --help
    to view available commands
  3. Create a workflow file for the new platform in the references directory, and add a link in the References section below

login

Some websites cannot be logged into directly using agent-browser ms-playwright Google Chrome for Testing.app
open "path" --args --remote-debugging-port=9222 sleep 2 && curl -s http://localhost:9222/json/version agent-browser connect "ws://localhost:9222/devtools/browser/xxx" Ask the user to log in manually agent-browser state save ~/my-state.json

References

Xiaohongshu

  • Xiaohongshu Image & Text
    : View the workflow required for publishing short articles with images and text in Xiaohongshu Image & Text
  • Xiaohongshu Long Article
    : View the workflow required for users to send long texts in Xiaohongshu Long Article

X (Twitter)

  • X Tweet
    : View the workflow required for publishing tweets in X Tweet