SkillsAggSubmit Skill

feishu-mcp-doc-write-stable

Clean

Stable Feishu doc writing via MCP (mcporter + lark.update-doc/create-doc) with real multiline markdown and post-write fetch validation. Use when user asks to write/update PRD or cloud docs through Feishu MCP while avoiding literal \n formatting corruption.

3 stars🍴 0 forks0 installs📄 MIT

Install Command

npx skills add bert995/feishu-mcp-doc-write-stable
Author
bert995
Repository
bert995/feishu-mcp-doc-write-stable
Discovered via
github topic
Weekly installs
0
Quality score
31/100
Last commit
2/11/2026

SKILL.md

---
name: feishu-mcp-doc-write-stable
description: Stable Feishu doc writing via MCP (mcporter + lark.update-doc/create-doc) with real multiline markdown and post-write fetch validation. Use when user asks to write/update PRD or cloud docs through Feishu MCP while avoiding literal \n formatting corruption.
---

# Feishu MCP Stable Writer

Use this workflow to keep Feishu MCP doc output readable and deterministic.

## Rules

1. Always use Feishu MCP (`mcporter call lark.*`) for create/update/read in this flow.
2. Never pass markdown as escaped `\\n` text.
3. Always send **real multiline markdown**.
4. Always run `fetch-doc` after write and verify structure.

## Standard Flow

1. Draft content in chat and get user confirmation.
2. Create doc (or use given doc URL).
3. Write/update with real multiline markdown.
4. Read back and verify headings/lists/order.
5. Report concise result + doc URL.

## Command Patterns

### A) Create doc

```bash
mcporter call lark.create-doc \
  title='文档标题' \
  wiki_space='my_library' \
  markdown='# 占位\n\n准备写入' \
  --output json
```

### B) Safe overwrite with real multiline markdown

```bash
cat > /tmp/doc.md <<'MD'
# 标题

## 1. 背景
正文

## 2. 目标
- A
- B
MD

python3 - <<'PY'
import json, shlex, subprocess
from pathlib import Path
md = Path('/tmp/doc.md').read_text()
args = json.dumps({
  'doc_id': 'https://www.feishu.cn/wiki/xxxxx',
  'mode': 'overwrite',
  'markdown': md
}, ensure_ascii=False)
cmd = f"mcporter call lark.update-doc --args {shlex.quote(args)} --output json"
print(subprocess.check_output(cmd, shell=True, text=True))
PY
```

### C) Append + precise replace

```bash
mcporter call lark.update-doc doc_id='https://www.feishu.cn/wiki/xxxxx' \
  mode='append' \
  markdown='## 新章节
内容' \
  --output json

mcporter call lark.update-doc doc_id='https://www.feishu.cn/wiki/xxxxx' \
  mode='replace_range' \
  selection_with_ellipsis='## 2. 目标...- B' \
  markdown='## 2. 目标
- A(修订)
- B(修订)
- C(新增)' \
  --output json
```

## Validation Checklist

- `fetch-doc` output does not contain literal `\\n` in body text.
- Heading hierarchy is preserved.
- Lists render as lists (not plain joined text).
- No missing section after update.

## Failure Handling

- If `selection_by_title` fails, use `fetch-doc` then switch to `selection_with_ellipsis`.
- If format drifts, rebuild markdown in `/tmp/*.md` and overwrite once.
- If permissions fail, confirm MCP URL/auth and retry with same user identity.

Similar Skills

Keep CLAUDE.md documentation in sync with codebase evolution. Use when user says "sync claude.md", "update claude.md", "check claude.md", or when project structure, tech stack, or architecture has changed and documentation may be outdated.

npx skills add wzh274728277/claude-md-sync

Optimize oversized CLAUDE.md files using progressive disclosure. Analyzes content tiers, detects encryption constraints, creates sub-documents, and rewrites the main file with a Sub-Documentation Table. Triggers: optimize CLAUDE.md, reduce CLAUDE.md size, CLAUDE.md too long, apply progressive disclosure to CLAUDE.md

documentationrefactoringclaude-mdoptimization
npx skills add wrsmith108/claude-md-optimizer

Build production-ready MCP servers using FastMCP framework with proven patterns for tools, resources, prompts, OAuth authentication, and comprehensive testing. Use this when creating FastMCP-based MCP servers with features like Google OAuth, multiple resource types, testing with FastMCP Client, or complex tool implementations.

npx skills add husniadil/fastmcp-builder

Use this skill whenever Claude needs to fetch, read, extract, or analyze content from a web URL. Converts web pages into clean, token-efficient markdown using the markdown.new service instead of fetching raw HTML. Trigger when the user provides a URL and wants its content summarized, quoted, analyzed, compared, extracted, or processed. Also trigger when Claude needs to read documentation, blog posts, articles, wikis, release notes, changelogs, or any web-hosted text content. Even if the user just pastes a URL with no instruction, use this skill. Do NOT use for binary files, authenticated pages, or API endpoints returning JSON/XML.

npx skills add dnh33/markdown-fetch