Skip to content

Add Feishu Document API Guide Skill#484

Open
rogerhorsley wants to merge 1 commit intoanthropics:mainfrom
rogerhorsley:add-feishu-doc-api-guide
Open

Add Feishu Document API Guide Skill#484
rogerhorsley wants to merge 1 commit intoanthropics:mainfrom
rogerhorsley:add-feishu-doc-api-guide

Conversation

@rogerhorsley
Copy link

Add Feishu Document API Guide Skill

Description

Practical guide for working directly with Feishu Document HTTP APIs, based on real-world debugging and validation.

What this skill provides

  • Battle-tested Python scripts for document operations (FeishuDocWriter class with automatic token and revision_id management)
  • Comprehensive guide to common API pitfalls with detailed solutions for each
  • Critical gotchas documented: required document_revision_id parameter, block_type field mappings, style field requirements
  • Production-ready code examples verified through actual implementation

Key features

✅ Verified through real implementation (successfully created and populated a full document)
✅ Documents 8 common pitfalls with root causes and solutions
✅ Includes production-ready Python class with helper functions
✅ Covers authentication, document creation, and content manipulation
✅ Provides debugging checklist and troubleshooting guide

Skill structure

  • SKILL.md - Quick start guide, critical gotchas, common tasks, troubleshooting
  • scripts/feishu_doc_writer.py - Production-ready Python class with token management
  • references/common-pitfalls.md - Detailed documentation of 8 common issues

Use cases

  • Implementing custom Feishu integrations via HTTP API
  • Debugging "invalid param" errors (error code 1770001)
  • Learning Feishu API best practices from real-world experience
  • Working around MCP tool limitations with direct API access

Verification

All code has been tested and verified:

  • ✅ Successfully authenticated with Feishu API
  • ✅ Created documents programmatically
  • ✅ Added text content with formatting (bold, mixed styles)
  • ✅ Handled batch content additions with proper revision tracking

This skill fills a gap for developers who need to work directly with Feishu's HTTP API and want to avoid the common pitfalls discovered through real implementation.

Battle-tested guide for using Feishu Document HTTP API directly with
Python examples and comprehensive pitfall documentation.

Features:
- Production-ready Python class for document operations
- Detailed guide to 8 common API pitfalls with solutions
- Critical gotchas (document_revision_id, block_type mappings, style requirements)
- Verified through real implementation (full document creation and population)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant