x-md
NewArchive a given X or Twitter post link into an Obsidian-ready Markdown folder using the local x-md CLI. Use when the user asks to scrape, archive, save, capture, or export an X link, X post, Twitter post, or Twitter thread to Markdown for local notes.
Overview
X Markdown Archiver
Use the bundled x-md CLI in this skill repo to archive a given X or Twitter post into the Obsidian inbox.
Workflow
- Use this repo as the working directory:
``sh /Users/guodawei/Documents/GitHub/x-md-skill ``
- Check whether the project virtualenv exists:
``sh test -x .venv/bin/python ``
If it does not exist, initialize it:
``sh python3 -m venv .venv .venv/bin/python -m pip install -r scripts/requirements.txt ``
- Archive the X link into the Obsidian inbox:
``sh .venv/bin/python scripts/archive_x_post.py archive "<X_POST_URL>" --out "/Users/guodawei/Library/Mobile Documents/com~apple~CloudDocs/Documents/Obsidian Vault/inbox" ``
- If the user gives special instructions in their prompt, follow those instructions over the default naming or post-processing rules below.
- Rename the generated archive folder into an Obsidian-friendly folder-note name:
``text YYYYMMDD - <DisplayTitle> ``
- Use the source post date from created_at for YYYYMMDD. - Use a short content-facing display title, not Index. - Default display title: <AuthorDisplayName> post <N>, using the author's display name from frontmatter before the @handle. - Start at post 1; if that folder already exists, increment the number until the name is unique. - Keep the Markdown file itself named index.md so local assets and folder-note behavior remain stable.
- Update
index.mdmetadata title to match the display title, but keep the first header asIndex:
```markdown --- title: "Serenity post 1" ... ---
# Index ```
- Use the content-facing display title, not Index, for the title field. - Keep the first # header as Index. - Do not rewrite post text, quote text, or reply text beyond the title and asset-link cleanup below.
- If image files are stored under
assets/, ensure Markdown image links point toassets/<filename>rather than bare filenames.
- Report the final archive folder path and its
index.mdpath.
Output
The archive creates one folder containing:
- •
index.md - •
assets/with local image files
The archive includes:
- •the input post
- •the quoted-post chain
- •reply paths that end at comments by the input author
In the rendered Replies section, each reply path should start at the first actual reply beneath the input post rather than repeating the input post again.
Operational Notes
- •Google Chrome must be logged into X before running the command.
- •The scraper uses Chrome cookies through
gallery-dl. - •If extraction fails with an X, cookie, or auth error, surface the exact error and suggest logging into X again in Chrome.
- •If extraction fails with DNS or network errors, mention the exact network symptom before retrying.
- •Only post-process the generated Markdown for the
titlefrontmatter field, first#header, folder renaming, and local asset links unless the user explicitly asks for another formatting fix.
Install & Usage
mkdir -p .claude/skillsAdd the configuration to .claude/skills/x-md.md
/x-mdSecurity Audits
Frequently Asked Questions
What is x-md?
Archive a given X or Twitter post link into an Obsidian-ready Markdown folder using the local x-md CLI. Use when the user asks to scrape, archive, save, capture, or export an X link, X post, Twitter post, or Twitter thread to Markdown for local notes.
How to install x-md?
To install x-md: create the skills directory (mkdir -p .claude/skills), then add the config to .claude/skills/x-md.md. Finally, /x-md in Claude Code.
What is x-md best for?
x-md is a community categorized under Documentation. Created by DavidGuooo.