fetch-yuque-doc
Skill1 starsChanged 3 months agoMITView on GitHub
Use when Codex needs to fetch the content of a single Yuque page from a user-provided yuque.com link through a local logged-in Chrome-family browser, especially for private-space documents where token-based API access is unavailable or undesirable.
- Installs packages
In this repository13 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- bug-analysisSkill
- cavemanSkill
- code-review-with-filesSkill
- diagnoseSkill
- git-commit-workflowSkill
- handoffSkill
- improve-codebase-architectureSkill
- ios-i18n-workflowSkill
- java-to-nextjsSkill
- java-to-swiftSkill
- question-answerSkill
- reconstructing-ui-from-screenshotsSkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 7 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 33
Ensure the local browser profile is already logged in to the target Yuque space.
- Distinctive: line 34
Run the bundled script with the page URL once.
- Distinctive: line 37
If the request fails, surface the exact reason: bad URL, browser not found, profile not found, launch failure, or inaccessible page.
- Distinctive: line 51
Prefer the default local Chrome profile first.
- Distinctive: line 55
Prefer the default profile-copy behavior to avoid live profile locks.
- Distinctive: line 59
Default output is Markdown for direct reading in the terminal.
- Very specific: line 60
Default to a single real fetch.
- Very specific: line 61
Use --dry-run only for debugging link parsing or browser/profile detection issues.
- Very specific: line 62
Use --format json when the result will be piped into another tool or needs structured fields.
- Very specific: line 77
Read references/browser-notes.md only when you need the exact browser/profile assumptions or want to confirm the extraction strategy.
- Distinctive: line 81
Do not turn this skill into a generic Yuque crawler, exporter, synchronization tool, or session-token extractor unless the user explicitly …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Fetch Yuque Doc
Overview
Fetch one Yuque document from a page URL through a local logged-in Chrome-family browser. On macOS, prefer the current running Chrome instance through AppleScript so enterprise SSO sessions can be reused directly; fall back to Playwright plus a copied browser profile when needed.
Quick Start
Use scripts/fetch_yuque_doc.py.
python3 -m pip install --user playwright
python3 <skill_path>/scripts/fetch_yuque_doc.py \
"https://hellobike.yuque.com/<group>/<repo>/<doc>"JSON output:
python3 <skill_path>/scripts/fetch_yuque_doc.py \
--format json \
"https://hellobike.yuque.com/<group>/<repo>/<doc>"Workflow
- Confirm the user gave a full Yuque document URL on
yuque.comor*.yuque.com. - Ensure the local browser profile is already logged in to the target Yuque space.
- Run the bundled script with the page URL once. The script performs URL validation, browser detection, and profile checks as part of the normal fetch path.
- On macOS, keep the default
--strategy auto: try the current Chrome instance through AppleScript first, then fall back to Playwright if needed. - Return the fetched title, page TOC, metadata, and body to the user.
- If the request fails, surface the exact reason: bad URL, browser not found, profile not found, launch failure, or inaccessible page.
URL Rules
The script expects links in this shape:
https://<host>.yuque.com/<group_login>/<repo_slug>/<doc_slug>It ignores query strings and fragments, but it does not try to crawl a directory, homepage, or knowledge-base root URL. This skill is intentionally scoped to a single page per invocation.
Browser Rules
- Prefer the default local Chrome profile first.
- On macOS, prefer
--strategy autoso the script can reuse the current Chrome session through AppleScript. - Auto-detect Google Chrome, Chromium, and Microsoft Edge when possible.
- Allow overrides with
--browser-path,--user-data-dir, and--profile-directory. - Prefer the default profile-copy behavior to avoid live profile locks.
Output Rules
- Default output is Markdown for direct reading in the terminal.
- Default to a single real fetch. Do not run
--dry-runas part of the standard workflow. - Use
--dry-runonly for debugging link parsing or browser/profile detection issues. - Use
--format jsonwhen the result will be piped into another tool or needs structured fields. - JSON output includes
body_html, which is useful when downstream tooling needs structure beyond plain text.
Error Handling
- Browser detection error: no compatible browser installation or user data directory was found.
- Profile error: the selected profile directory does not exist.
- Browser launch error: Playwright is missing, or the browser profile could not be opened.
- Extraction error: the page loaded, but the document body could not be extracted.
Resources
- Script:
scripts/fetch_yuque_doc.py - Reference:
references/browser-notes.md
Read references/browser-notes.md only when you need the exact browser/profile assumptions or want to confirm the extraction strategy.
Do Not Expand Scope
Do not turn this skill into a generic Yuque crawler, exporter, synchronization tool, or session-token extractor unless the user explicitly asks for that broader behavior in a separate task.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

