create-feishu-doc

Automates creating new documents in the Feishu workspace. This skill should be used when the user asks to "create a Feishu doc", "create a new doc in Feishu", "open Feishu and create document", "create document in leiniao-ibg", or mentions creating documents in Feishu or Lark workspace.

523 stars

Best use case

create-feishu-doc is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Automates creating new documents in the Feishu workspace. This skill should be used when the user asks to "create a Feishu doc", "create a new doc in Feishu", "open Feishu and create document", "create document in leiniao-ibg", or mentions creating documents in Feishu or Lark workspace.

Teams using create-feishu-doc should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/create-feishu-doc/SKILL.md --create-dirs "https://raw.githubusercontent.com/FradSer/dotclaude/main/office/skills/create-feishu-doc/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/create-feishu-doc/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How create-feishu-doc Compares

Feature / Agentcreate-feishu-docStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Automates creating new documents in the Feishu workspace. This skill should be used when the user asks to "create a Feishu doc", "create a new doc in Feishu", "open Feishu and create document", "create document in leiniao-ibg", or mentions creating documents in Feishu or Lark workspace.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Create Feishu Document Automation

## Purpose

Automate the process of creating new documents in Feishu (Lark) workspace by using browser automation to navigate the UI, authenticate, and create documents with specified titles and content.

## Prerequisites

- Access to Feishu workspace (https://leiniao-ibg.feishu.cn)
- Valid authentication credentials for the workspace
- Browser automation capability via `agent-browser`

## Workflow

### Step 1: Load Browser Automation Skill

Load the `office:agent-browser` skill using the Skill tool to access browser automation commands.

### Step 2: Navigate to Feishu Drive

Open the Feishu Drive homepage:

```bash
agent-browser open https://leiniao-ibg.feishu.cn/drive/home/
```

Wait for page to load:

```bash
agent-browser wait --load networkidle
```

### Step 3: Verify Authentication

Take a snapshot to check if already logged in:

```bash
agent-browser snapshot -i
```

If login is required, wait for user to complete authentication manually or handle authentication flow based on the page state.

### Step 4: Create New Document

Click the "新建" (New) button (use snapshot to locate the element ref):

```bash
agent-browser snapshot -i
# Locate "新建" button ref (e.g., @e1)
agent-browser click @e1
```

Wait for dropdown menu to appear:

```bash
agent-browser wait 1000
```

Take another snapshot to locate the "文档" (Doc) option:

```bash
agent-browser snapshot -i
# Locate "文档" button ref (e.g., @e2)
agent-browser click @e2
```

### Step 5: Select New Document Type

Click the "新建空白文档" (New Doc) option from the submenu:

```bash
agent-browser wait 1000
agent-browser snapshot -i
# Locate "新建空白文档" button ref (e.g., @e3)
agent-browser click @e3
```

### Step 6: Wait for New Tab

Wait for the new document to open in a new tab:

```bash
agent-browser wait --load networkidle
```

Check tabs to ensure new document page opened:

```bash
agent-browser tab
```

If multiple tabs exist, switch to the newest tab (usually the last one):

```bash
agent-browser tab 2  # Adjust index based on tab list
```

### Step 7: Enter Document Title

The page should automatically focus on the title input field. If the title field is focused by default, type the title directly:

```bash
agent-browser type @e1 "Document Title Here"
```

If not automatically focused, take a snapshot to locate the title input:

```bash
agent-browser snapshot -i
# Locate title input ref (e.g., @e1)
agent-browser fill @e1 "Document Title Here"
```

### Step 8: Enter Document Content

Press Tab or click to move to the content area:

```bash
agent-browser press Tab
```

Or locate and click the content editor:

```bash
agent-browser snapshot -i
# Locate content editor ref (e.g., @e2)
agent-browser click @e2
```

Type the document content:

```bash
agent-browser type @e2 "Document content goes here..."
```

For multi-line content, use newlines in the input:

```bash
agent-browser type @e2 "First paragraph

Second paragraph

Third paragraph"
```

### Step 9: Verify and Save

Take a final screenshot to verify the document was created successfully:

```bash
agent-browser screenshot
```

Feishu documents auto-save, so no explicit save action is required. The document is now ready to use.

### Step 10: Close Browser (Optional)

Close the browser session when done:

```bash
agent-browser close
```

## Error Handling

### Authentication Issues

If authentication fails or login is required:
1. Pause the workflow
2. Inform the user that manual login is needed
3. Wait for confirmation before proceeding
4. Resume workflow after authentication

### Element Not Found

If snapshot cannot locate expected UI elements (button refs):
1. Take a full snapshot without `-i` flag for debugging
2. Check if UI has changed or language settings differ
3. Use semantic locators as fallback:
   ```bash
   agent-browser find text "新建" click  # Find "新建" (New) button
   agent-browser find text "文档" click  # Find "文档" (Doc) button
   agent-browser find text "新建空白文档" click  # Find "新建空白文档" (New Doc) button
   ```

### Timeout Issues

If page loading takes too long:
1. Increase wait timeout: `agent-browser wait --load networkidle --timeout 10000`
2. Check network connectivity
3. Verify Feishu service availability

## Customization

### Different Workspace

To use with a different Feishu workspace, replace the URL in Step 2:

```bash
agent-browser open https://your-workspace.feishu.cn/drive/home/
```

### Document Templates

To use a specific document template instead of blank document:
1. Navigate to template gallery after clicking "Doc"
2. Locate and click the desired template
3. Proceed with title and content entry

## Best Practices

1. **Session Reuse**: For multiple document creations, keep the browser session open and reuse authentication state
2. **Error Screenshots**: Take screenshots at each critical step for debugging
3. **Wait for UI**: Always wait for network idle after navigation to ensure UI elements are loaded
4. **Explicit Waits**: Use explicit waits (e.g., `agent-browser wait 1000`) after clicking dropdown menus

## Additional Resources

### Browser Automation Reference

For detailed browser automation commands and patterns:
- Load `office:agent-browser` skill for complete command reference
- See snapshot and interaction patterns in agent-browser documentation

### Example Usage

```bash
# Complete workflow example
agent-browser open https://leiniao-ibg.feishu.cn/drive/home/
agent-browser wait --load networkidle
agent-browser snapshot -i
agent-browser click @e1  # 新建 button
agent-browser wait 1000
agent-browser snapshot -i
agent-browser click @e2  # 文档 button
agent-browser wait 1000
agent-browser snapshot -i
agent-browser click @e3  # 新建空白文档 button
agent-browser wait --load networkidle
agent-browser tab
agent-browser tab 2  # Switch to new tab
agent-browser type @e1 "My Document Title"
agent-browser press Tab
agent-browser type @e2 "My document content..."
agent-browser screenshot
```

Related Skills

create-prd

523
from FradSer/dotclaude

This skill should be used when the user asks to "create PRD", "write product requirements document", or mentions "PRD", "产品需求文档", "创建PRD", "写PRD", "生成PRD".

create-pr

523
from FradSer/dotclaude

Creates comprehensive GitHub pull requests with automated quality validation and security scanning. This skill should be used when the user asks to "create a PR", "submit a pull request", or needs to merge completed work with full compliance checks.

create-issues

523
from FradSer/dotclaude

Creates GitHub issues following test-driven development principles and proper labeling conventions. This skill should be used when the user asks to "create an issue", "file a bug", or needs to document new requirements, epics, or PR-scoped tasks.

update-readme

523
from FradSer/dotclaude

Updates README.md and README.zh-CN.md to reflect the project's current state. Use this skill whenever the user asks to "update the README", "sync the docs", "update documentation", "reflect latest changes in README", or wants both the English and Chinese READMEs to match the current project. Always triggers when the user mentions updating or regenerating README files, especially for bilingual (EN/ZH) projects.

swiftui-review

523
from FradSer/dotclaude

Reviews SwiftUI code for best practices on modern APIs, maintainability, and performance. This skill should be used when the user asks to review SwiftUI code, check for deprecated iOS/macOS APIs, validate data flow patterns, or audit accessibility compliance in Swift projects.

writing-plans

523
from FradSer/dotclaude

Creates executable implementation plans that break down designs into detailed tasks. This skill should be used when the user has completed a brainstorming design and asks to "write an implementation plan" or "create step-by-step tasks" for execution.

systematic-debugging

523
from FradSer/dotclaude

Provides a systematic debugging methodology with a 4-phase root cause analysis process. This skill should be used when the user reports a bug, error, test failure, or unexpected behavior, ensuring thorough investigation precedes any code changes.

need-vet

523
from FradSer/dotclaude

This skill should be used when the user invokes /need-vet to enable work verification for the current task. Claude must verify completion and append the verified tag before the session can end.

executing-plans

523
from FradSer/dotclaude

Executes written implementation plans efficiently using agent teams or subagents. This skill should be used when the user has a completed plan.md, asks to "execute the plan", or is ready to run batches of independent tasks in parallel following BDD principles.

build-like-iphone-team

523
from FradSer/dotclaude

Applies Apple's Project Purple design philosophy for radical innovation. This skill should be used when the user wants to challenge industry conventions, approach open-ended problems requiring disruptive thinking, or when standard brainstorming needs a breakthrough approach.

brainstorming

523
from FradSer/dotclaude

Structures collaborative dialogue to turn rough ideas into implementation-ready designs. This skill should be used when the user has a new idea, feature request, ambiguous requirement, or asks to "brainstorm a solution" before implementation begins.

behavior-driven-development

523
from FradSer/dotclaude

Applies behavior-driven development principles including Gherkin scenarios and test-driven development. This skill should be used when the user asks to implement features, fix bugs, or when writing executable specifications and tests before writing production code.