agentleFS
JakkuSakuraJakkuSakura/skills/feishu/SKILL.md

feishu

Skill1 starsChanged 9 months agoMITView on GitHub

Use when the user mentions Feishu. Handles Feishu Docs/Drive/Wiki operations in Chrome via Playwright only, preferring headless execution with saved auth state. Supports browsing, reading, summarizing, editing, publishing local files as separate Feishu docs, deterministic template-center creation, and true wiki child-page creation via move-into-wiki flow. If login is stale, switch to QR login in a visible browser.

9 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use agent-browser and skill-creator.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • VercelSkill

    agent-browser

    Automates browser interactions for web testing, form filling, screenshots, and data extraction. Use when the user needs to navigate websites, interact with web pages, fill forms, take screenshots, test web applications, or extract information from web pages.

    Also in 3 projects that use this

  • SentrySkill

    skill-creator

    Create new agent skills following the Agent Skills specification. Use when asked to "create a skill", "add a new skill", "write a skill", "make a skill", "build a skill", or scaffold a new skill with SKILL.md. Guides through requirements, writing, registration, and verification.

    Also in 3 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

30 rules. 0 are common, 19 are distinctive, and 11 are very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 19

    Distinctive

    This author's own choices. Worth a look.

  • 11

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use this skill whenever the user mentions Feishu, a feishu.cn URL, Feishu Docs/Drive/Wiki, or asks to browse, search, read, summarize, …

    line 8
  2. Distinctive:

    Prefer headless by default so work does not interrupt the user's desktop.

    line 12
  3. Distinctive:

    Only use a visible browser when QR login is required or the user explicitly wants to watch.

    line 13
  4. Distinctive:

    Default workspace root for artifacts: the current repo root

    line 18
  5. Distinctive:

    Default execution mode for routine automation: fresh headless browser context

    line 19
  6. Distinctive:

    If the session is stale and Feishu redirects to login, switch to the QR login flow in a visible browser.

    line 28
  7. Distinctive:

    When login is required:

    line 32
  8. Very specific:

    After login succeeds, save auth state back to .playwright-cli/feishu-login-state.json.

    line 36
  9. Distinctive:

    Ensure the authenticated session is usable.

    line 46
  10. Distinctive:

    Prefer stable interactions in this order:

    line 48
  11. Distinctive:

    After each meaningful step, verify with:

    line 55
  12. Distinctive:

    Use this as the default creation path for blank Feishu documents.

    line 62
  13. Very specific:

    Wait for a new page whose URL matches .../docx/....

    line 66
  14. Very specific:

    Wait until the page shows Saved to cloud.

    line 71
  15. Distinctive:

    wait for the template center overlay

    line 93
  16. Distinctive:

    wait for the new page to open

    line 96
  17. Very specific:

    Do not assume the first Use button means a blank document.

    line 98
  18. Distinctive:

    Read each local Markdown file.

    line 104
  19. Very specific:

    Use the first # Heading as the Feishu title.

    line 105
  20. Distinctive:

    Use the rest of the file as plain text body content.

    line 106
  21. Very specific:

    Create one new docx page per file using Meta+Alt+n.

    line 107
  22. Very specific:

    Verify Saved to cloud and collect the resulting URLs.

    line 109
  23. Very specific:

    Do not assume that creating a new docx page from a wiki page automatically creates a wiki child page.

    line 126
  24. Very specific:

    Create a standalone docx page first with Meta+Alt+n.

    line 135
  25. Distinctive:

    Write the title and body if needed.

    line 136
  26. Very specific:

    Verify the title appears in the wiki tree, for example in .workspace-tree-view-node-content.

    line 142
  27. Distinctive:

    after a successful move, the page remains on the current wiki page while the tree updates

    line 148
  28. Distinctive:

    Treat these as high risk:

    line 153
  29. Distinctive:

    delete wiki page or wiki space

    line 155
  30. Distinctive:

    Verify title and URL.

    line 161

“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Feishu

Use this skill whenever the user mentions Feishu, a feishu.cn URL, Feishu Docs/Drive/Wiki, or asks to browse, search, read, summarize, edit, comment on, import, export, move, or delete Feishu content.

This skill is Playwright-only.

  • Assume Chrome.
  • Prefer headless by default so work does not interrupt the user's desktop.
  • Only use a visible browser when QR login is required or the user explicitly wants to watch.

Session Defaults

  • Saved auth state: .playwright-cli/feishu-login-state.json
  • Default workspace root for artifacts: the current repo root
  • Default execution mode for routine automation: fresh headless browser context

For read-only exploration, reusing an existing browser session is acceptable if it is clearly valid. For write operations, prefer a fresh browser context with saved auth state instead of reusing old tabs.

Default order:

  1. Launch a fresh headless Chrome context.
  2. Load .playwright-cli/feishu-login-state.json.
  3. Navigate to the requested Feishu URL or https://w00rwzmdhev.feishu.cn/drive/home/.
  4. If the session is stale and Feishu redirects to login, switch to the QR login flow in a visible browser.

Login Workflow

When login is required:

  1. Open a visible Chrome window with a persistent profile.
  2. Navigate to https://w00rwzmdhev.feishu.cn/drive/home/.
  3. Let the user scan the QR code manually.
  4. After login succeeds, save auth state back to .playwright-cli/feishu-login-state.json.

Detect stale auth by checking for:

  • redirects to accounts.feishu.cn
  • login text such as Log In With QR Code
  • QR scan prompts

Operating Pattern

For any Feishu request:

  1. Ensure the authenticated session is usable.
  2. Navigate to the target URL or workspace area.
  3. Prefer stable interactions in this order:
  • direct URL navigation
  • fresh headless context with saved auth
  • semantic selectors
  • deterministic keyboard shortcuts
  • DOM evaluation inside the page
  • normal clicks only as fallback
  1. After each meaningful step, verify with:
  • URL
  • title
  • visible text

Stable New Doc Creation

Use this as the default creation path for blank Feishu documents.

  1. Open https://w00rwzmdhev.feishu.cn/drive/home/ in a fresh headless context.
  2. Trigger Meta+Alt+n.
  3. Wait for a new page whose URL matches .../docx/....
  4. On the new page:
  • document.querySelectorAll('[contenteditable=true]')[1] is the title editor
  • document.querySelectorAll('[contenteditable=true]')[2] is the body editor
  1. Set innerText, then dispatch InputEvent('input', ...).
  2. Wait until the page shows Saved to cloud.
  3. Return the new URL.

This flow is the preferred default for deterministic blank-doc creation.

Drive New -> Docs

The current Feishu Drive UI does not treat New -> Docs as a direct blank-doc action.

Verified behavior:

  1. Open https://w00rwzmdhev.feishu.cn/drive/home/.
  2. Click the New card.
  3. Click the Docs menu item.
  4. Feishu opens a template center overlay in the current page.
  5. Choosing a visible Use button creates a new page, often under a wiki/... URL depending on the selected template.

Implications:

  • Drive -> New -> Docs is a template-center flow, not a blank-doc flow.
  • For deterministic blank-doc creation, keep using Meta+Alt+n.
  • For deterministic template-based creation from Drive, automate:
    1. New
    2. Docs
    3. wait for the template center overlay
    4. select the intended template
    5. click its Use button
    6. wait for the new page to open

Do not assume the first Use button means a blank document. It usually maps to the first visible recommended template.

Publishing Local Markdown

For bulk publishing local Markdown files to Feishu as separate pages:

  1. Read each local Markdown file.
  2. Use the first # Heading as the Feishu title.
  3. Use the rest of the file as plain text body content.
  4. Create one new docx page per file using Meta+Alt+n.
  5. Paste body text directly unless the user explicitly asks for formatting fidelity.
  6. Verify Saved to cloud and collect the resulting URLs.

Known-good result pattern:

  • one local file -> one separate docx page
  • title matches the Markdown heading
  • body starts with the expected Markdown content

Verified Working Pattern

This flow has been verified for publishing multiple local Markdown files as separate Feishu pages:

  • one local file -> one separate docx page
  • title derived from the first Markdown heading
  • body written as plain text content
  • save confirmed before returning the URL

True Wiki Child Page Creation

Do not assume that creating a new docx page from a wiki page automatically creates a wiki child page.

Verified current behavior:

  • Meta+Alt+n from both Drive and an open wiki page opens a standalone docx page
  • the wiki sidebar create menu can open:
    • a template center via Docs
    • a move dialog via Move Docs Here

Reliable wiki child-page flow:

  1. Create a standalone docx page first with Meta+Alt+n.
  2. Write the title and body if needed.
  3. Open the target wiki page.
  4. In the sidebar tree area, click the visible create trigger on the relevant root or section.
  5. Choose Move Docs Here.
  6. In the move dialog, find the created doc row.
  7. Select the row and click Move.
  8. Verify the title appears in the wiki tree, for example in .workspace-tree-view-node-content.

This flow has been verified end to end and should be the default way to create true wiki child pages under automation.

Notes:

  • the move dialog supports searching and selecting existing docs
  • after a successful move, the page remains on the current wiki page while the tree updates
  • verification should check the sidebar tree, not only the main document body

Destructive Changes

Treat these as high risk:

  • delete doc
  • delete wiki page or wiki space
  • move content between spaces
  • bulk destructive edits

Before acting:

  1. Restate the exact target.
  2. Verify title and URL.
  3. Confirm the target still matches at the final confirmation step.

Response Style

Execute the user's requested Feishu operation instead of stopping at analysis.

Be concise in status updates, but include:

  • the current page or target object
  • whether auth is valid or QR login is needed
  • any destructive-action confirmation gate
  • whether the task is using the stable headless Meta+Alt+n creation flow
  • whether the task is using the template-center flow or the move-into-wiki flow

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.