Claude-skill-registry feishu-openapi-dev
Expert guidance for Feishu (飞书) / Lark OpenAPI Python development. Build Feishu applications, robots, handle event subscriptions, card callbacks, and API integrations. Use when working with Feishu SDK, lark-oapi, building Feishu bots, or mentioning 飞书 development.
git clone https://github.com/majiayu000/claude-skill-registry
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/feishu-openapi-dev" ~/.claude/skills/majiayu000-claude-skill-registry-feishu-openapi-dev && rm -rf "$T"
skills/data/feishu-openapi-dev/SKILL.mdFeishu OpenAPI Python Development Expert
Expert guidance for Feishu (飞书) / Lark Open Platform Python development, covering API calls, event handling, robot development, and more.
📚 Source Documentation
This skill includes three official/community source repositories (managed via git submodule):
1. oapi-sdk-python (Official SDK)
Path:
source/oapi-sdk-python/
Official Feishu Python SDK providing complete type system and semantic programming interface.
Core Directories:
- SDK core codelark_oapi/
- Official sample codesamples/
- Documentation resourcesdoc/
Main Features:
- Server-side API calls
- Event subscription handling
- Card callback processing
- Automatic access_token management
- Data encryption/decryption and signature verification
2. oapi-sdk-python-compact (Convenience Wrapper)
Path:
source/oapi-sdk-python-compact/
Enhanced wrapper based on official SDK, providing convenient shortcut functions.
Core Directories:
- High-level convenience APIssrc/lark_oapi_compact/shortcut/
- 电子表格 (Spreadsheet) operationssheets/
- 云文档/云空间 (Drive) operationsdriver/
- 群机器人 (Group robot) messaginggroup_robot/
- Message handlingmessage/
- Core configurationcompact/
- Test casestests/
Configuration Guide: See
CLAUDE.md for development setup instructions.
3. lark-samples (Official Examples)
Path:
source/lark-samples/
Official Feishu sample code collection with complete scenario-based implementations.
Example Projects:
- Quick start robot developmentrobot_quick_start/
- 网页应用 (Web app) developmentweb_app_with_jssdk/
- Web app with authenticationweb_app_with_auth/
- Echo bot (multi-language)echo_bot/
- Card interaction botcard_interaction_bot/
- MCP intelligent Agentmcp_larkbot_demo/
- MCP quick startmcp_quick_demo/
Quick Start
Installation
pip install lark-oapi # Or use the enhanced version pip install lark-oapi-compact
Basic Configuration
import lark_oapi as lark # Create client client = lark.Client.builder() \ .app_id("your_app_id") \ .app_secret("your_app_secret") \ .build()
Environment Variables
Development and testing require these environment variables:
- Application ID (应用 ID)FEISHU_APP_ID
- Application Secret (应用密钥)FEISHU_APP_SECRET
- Group robot Webhook (optional)FEISHU_GROUP_ROBOT_WEBHOOK_URL
Usage Guide
Finding API Usage
- Basic API calls: Check
source/oapi-sdk-python/samples/ - Convenience wrappers: Check
source/oapi-sdk-python-compact/src/lark_oapi_compact/shortcut/ - Complete scenarios: Check corresponding example projects in
source/lark-samples/
Recommended Development Workflow
- Identify your scenario (机器人/robot, 网页应用/web app, API call)
- Find similar examples in
lark-samples - Use
for API callsoapi-sdk-python - For complex scenarios, use
shortcut functionsoapi-sdk-python-compact
Updating Source
# Update all submodules cd source git submodule update --remote # Update single repository cd source/oapi-sdk-python git pull origin v2_main