Skip to main content
ProductivityReviewed Jul 21, 2026

Upload Markdown to Lexiang

v1.3.11 install

Install this skill

No account required. Pick your tool, then copy.

Run in your terminal. It detects your AI tool.

npx @skills-hub-ai/cli install upload-markdown-to-lexiang

What this does: upload-markdown-to-lexiang

Or get the file:
Browse all CLI commands →
Manual setup by platform

Claude Code

~/.claude/skills/upload-markdown-to-lexiang/SKILL.md

Setup guide →

Cursor

~/.cursor/skills/upload-markdown-to-lexiang/SKILL.md

Setup guide →

Gemini CLI

GEMINI.md (project-level) or ~/.gemini/skills/upload-markdown-to-lexiang/SKILL.md

Setup guide →

Signing

SignedSLSA L2
Signed by
skills-hub.ai distributor
Method
Distributor-signed by skills-hub.aiSigned with the skills-hub.ai Ed25519 distributor key over this exact slug, version and content. Check it with `npx @skills-hub-ai/cli verify`.
Key
skills-hub-ed25519-2026-11
Signed
0Save

Instructions

Upload Markdown to Lexiang

这是 Markdown → 乐享在线文档的唯一公共上传层。抓取、翻译、目录策略、增量同步等业务逻辑应留在上层 Skill。
可移植 Markdown 中的目标专有标注解析与乐享块渲染属于本 Skill,不由调用方上传后修补。

硬性规则

  1. 上传代码只维护在本 Skill;禁止复制到调用方。
  2. 只使用从 https://lexiangla.com/ai/claw 获取的个人凭证。
  3. 禁止读取 Agent MCP 配置、连接器 OAuth token 或扫描本地代理。
  4. 创建或修改页面前完成全部本地预检,写入后必须线上对账。
  5. stdout 只输出 JSON/页面 URL,诊断和进度输出到 stderr。

定位本 Skill

调用方不得写死某个 Agent 的安装目录。按以下顺序定位:

  1. 环境变量 LEXIANG_UPLOADER_HOME。
  2. 当前上层 Skill 所在 skills 根目录的同级 Skill:
    <skills-root>/upload-markdown-to-lexiang。
  3. 当前 Agent 暴露的已安装 Skill 列表。
  4. 当前平台的 Skill 管理器默认安装目录。

用户 ajaxhe 的本地开发默认目录是
~/.workbuddy/skills/upload-markdown-to-lexiang,这不是跨用户公共契约。

定位后调用:

python3 "<skill-root>/scripts/lexiang_upload.py" --version

上层 Skill 必须要求 cli_api == "1",不得 import 内部 Python 模块。

首次配置个人凭证

页面提供的凭证是 lxmcp_ 前缀 MCP API Token 和 company_from。本 Skill
直接使用 Authorization: Bearer <lxmcp_token>,不做 OAuth token 交换。

python3 "<skill-root>/scripts/lexiang_upload.py" auth login
python3 "<skill-root>/scripts/lexiang_upload.py" auth status --check

凭证默认保存在 ~/.config/lexiang-upload/credentials.json,权限为 0600,
不会写进 Skill 或 Git 仓库。

多账号可使用命名 profile,保存到
~/.config/lexiang-upload/profiles/<profile>.json:

python3 "<skill-root>/scripts/lexiang_upload.py" auth login \
  --profile obsidian-sync
python3 "<skill-root>/scripts/lexiang_upload.py" auth status \
  --profile obsidian-sync --check
python3 "<skill-root>/scripts/lexiang_upload.py" upload article.md \
  --profile obsidian-sync --parent-id "<PARENT_ID>" --json

也可用 --credential-file PATH 指定凭证保存/读取位置。auth login --file PATH
表示从导出文件读取凭证内容,不是保存目标。选择优先级为:
--credential-file、--profile、LEXIANG_UPLOAD_CREDENTIALS、
LEXIANG_UPLOAD_PROFILE、default;default 始终对应原有 credentials.json。

上传

创建新页面:

python3 "<skill-root>/scripts/lexiang_upload.py" upload article.md \
  --parent-id "<PARENT_ID>" --name "标题" --json

覆盖已有页面:

python3 "<skill-root>/scripts/lexiang_upload.py" upload article.md \
  --entry-id "<ENTRY_ID>" --json

只做预检:

python3 "<skill-root>/scripts/lexiang_upload.py" upload article.md \
  --parent-id "<PARENT_ID>" --dry-run --json

调用方职责

  • 调用方只负责确定 parent_id、entry_id 和归档策略(标题、置顶、来源等)。
  • 本 Skill 负责 Markdown 解析、本地图片、公式转换、目标专有标注渲染、页面写入和线上对账。
  • 本地图片路径支持 %20、未转义空格及 <images/file name.png> 形式;所有识别到的
    本地图片都必须进入预检与线上数量对账。
  • > [!stat]、> [!definition] 与 > [!note] 连续 blockquote 由本 Skill分别渲染为
    📊/📖/💡 乐享 callout;note 可承载文章亮点列表。调用方禁止二次 MCP 修补。
    普通 blockquote 不受影响。
  • 非 Markdown 独立附件、视频和音频不属于本 Skill。

完整参数、JSON 输出和退出码见 references/cli-contract.md。

修改与验证

发现公共上传问题时,只修改本仓库并运行:

python3 -m unittest discover -s tests -v

兼容改动升级次版本;破坏 CLI 契约时升级主版本和 cli_api。

This skill doesn’t include stateful context yet, instructions only. Learn about stateful skills.

Security

Loading security scan...

Reviews (0)

Browse all →

More Productivity skills

Browse category →
quickstartZero to power user in one invoke — detects OS, installs Homebrew/apt/Node.js/Python, sets up Claude Code, authenticates skills-hub CLI, connects MCP servers, and installs recommended skills based on your project..115 installsgrill-meA relentless interview to sharpen a plan or design.35 installssession-memoryPersist, summarize, and reload agent context between sessions — writes a structured session log to CLAUDE.md / AGENTS.md / .hermes.md, snapshots decisions before destructive ops, and resumes long-running goals without re-briefing. Works with any coding agent. Use when the user asks to save progress for later, resume work from a previous session, or keep context before a long-running or destructive operation.25 installsgrillingGrill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their thinking, or uses any 'grill' trigger phrases.17 installsgit-hooksSet up pre-commit hooks for linting, formatting, and type-checking with commit message enforcement using conventional commits. Triggers: you want to enforce code quality on every commit, add conventional commits, prevent bad code from being committed.11 installsvscodeConfigure and operate VS Code-family IDEs (VS Code, VS Code Insiders, Cursor, VSCodium, Trae, Qoder, CodeBuddy) via CLI and structured JSON files. Qoder and CodeBuddy support is limited to their VS Code-compatible configuration surface, not proprietary AI chat, accounts, models, agents, marketplaces, or internal state.10 installs

Frequently asked questions about upload-markdown-to-lexiang

What does the upload-markdown-to-lexiang skill do?

upload-markdown-to-lexiang It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.

How do I install the upload-markdown-to-lexiang skill?

Run `npx @skills-hub-ai/cli install upload-markdown-to-lexiang` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/upload-markdown-to-lexiang/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.

Which AI tools does upload-markdown-to-lexiang work with?

upload-markdown-to-lexiang runs in Claude Code, Cursor, Gemini CLI. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.

Is the upload-markdown-to-lexiang skill free?

Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.

How do I use upload-markdown-to-lexiang after installing it?

In Claude Code, type `/upload-markdown-to-lexiang` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.

Can I share the upload-markdown-to-lexiang skill with my team?

Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.