Refactor high-complexity React components in Dify frontend. Use when `pnpm analyze-component...
npx skills add leemysw/agent-kit
Or install specific skill: npx add-skill https://github.com/leemysw/agent-kit/tree/main/.skills/feishu-docx
# Description
Export Feishu/Lark cloud documents to Markdown. Supports docx, sheets, bitable, and wiki. Use this skill when you need to read, analyze, or reference content from Feishu knowledge base.
# SKILL.md
name: feishu-docx
description: Export Feishu/Lark cloud documents to Markdown. Supports docx, sheets, bitable, and wiki. Use this skill when you need to read, analyze, or reference content from Feishu knowledge base.
Feishu Docx Exporter
Export Feishu/Lark cloud documents to Markdown format for AI analysis.
Instructions
Setup (One-time)
- Install the tool:
pip install feishu-docx
- Configure Feishu app credentials:
feishu-docx config set --app-id YOUR_APP_ID --app-secret YOUR_APP_SECRET
# or use environment variables
- Authorize with OAuth (opens browser):
feishu-docx auth
Export Documents
Export any Feishu document URL to Markdown:
feishu-docx export "<FEISHU_URL>" -o ./output
The exported Markdown file will be saved with the document's title as filename.
Supported Document Types
- docx: Feishu cloud documents β Markdown with images
- sheet: Spreadsheets β Markdown tables
- bitable: Multidimensional tables β Markdown tables
- wiki: Knowledge base nodes β Auto-resolved and exported
Examples
Export a wiki page
feishu-docx export "https://xxx.feishu.cn/wiki/ABC123" -o ./docs
Export a document with custom filename
feishu-docx export "https://xxx.feishu.cn/docx/XYZ789" -o ./docs -n meeting_notes
Export spreadsheet as Markdown table
feishu-docx export "https://xxx.feishu.cn/sheets/DEF456" --table md
Read content directly (recommended for AI Agent)
# Output content to stdout instead of saving to file
feishu-docx export "https://xxx.feishu.cn/wiki/ABC123" --stdout
# or use short flag
feishu-docx export "https://xxx.feishu.cn/wiki/ABC123" -c
Read content without saving to file (Python)
from feishu_docx import FeishuExporter
exporter = FeishuExporter(app_id="xxx", app_secret="xxx")
content = exporter.export_content("https://xxx.feishu.cn/wiki/xxx")
print(content)
Command Reference
| Command | Description |
|---|---|
feishu-docx export <URL> |
Export document to Markdown |
feishu-docx auth |
OAuth authorization |
feishu-docx config set |
Set credentials |
feishu-docx config show |
Show current config |
feishu-docx config clear |
Clear token cache |
Tips
- Images are automatically downloaded to a folder named after the document
- Use
--table mdfor Markdown tables instead of HTML - Token is cached and auto-refreshed, no need to re-authorize
- For Lark (overseas), add
--larkflag
# README.md
Production-Ready AI Agent Development Framework Powered by Claude Agent SDK
εΊδΊ Claude Agent SDK ζε»ΊηηδΊ§ηΊ§ AI ζΊθ½δ½εΌεζ‘ζΆ
π Introduction
Agent Kit is a comprehensive AI agent development framework that integrates Claude Agent SDK, providing a complete solution from frontend to backend. This project aims to help developers quickly build, deploy, and scale production-grade AI Agent applications.
β¨ Core Features
| #### π High-Performance Architecture - FastAPI asynchronous backend - Next.js frontend framework - WebSocket real-time communication - SQLite + Alembic database migrations | #### π― Complete AI Integration - Deep Claude Agent SDK integration - Streaming response support - Custom tools system (in development) - MCP support (in development) - Skill support (in development) | #### π οΈ Developer Friendly - TypeScript type safety - Zustand state management - Complete session management - Comprehensive documentation |
ποΈ Architecture
π Table of Contents
- Introduction
- Architecture
- Quick Start
- Project Structure
- Core Features
- Configuration
- API Documentation
- Development Guide
- Contributing
- License
π Quick Start
Prerequisites
- Python: 3.11 or higher
- Node.js: 24.0 or higher
- Docker & Docker Compose: Latest version
- Agent API Key: Get from Anthropic or Bigmodel
Installation
Option 1: Docker Deployment (Recommended)
1οΈβ£ Clone the repository
git clone https://github.com/leemysw/agent-kit.git
cd agent-kit
2οΈβ£ Configure environment variables
# Copy environment variable template
cp example.env .env
# Edit .env file and add your API key
3οΈβ£ Start services
make start
β°β make start
TAG=0.1.2 docker compose -f deploy/docker-compose.yml up -d
[+] Running 3/3
β Container deploy-agent-kit-1 Started 1.8s
β Container deploy-web-1 Started 0.9s
β Container deploy-nginx-1 Running 0.0s
β
Agent Kit is running!
π Web UI: http://localhost
π Logs: run 'make logs' to view service logs
4οΈβ£ Access the application
- Application URL: http://localhost
Option 2: Local Development
1οΈβ£ Clone the repository
git clone https://github.com/leemysw/agent-kit.git
cd agent-kit
2οΈβ£ Backend setup
# Install Python dependencies
pip install -r agent/requirements.txt
# Configure environment variables
cp example.env .env
# Edit .env file and add your API key
Configure .env file:
# Claude API configuration
ANTHROPIC_API_KEY=your_api_key_here
ANTHROPIC_BASE_URL=https://api.anthropic.com or https://open.bigmodel.cn/api/anthropic
ANTHROPIC_MODEL=claude-3-5-sonnet-20241022 or glm-4.7
# Server configuration
HOST=0.0.0.0
PORT=8010
DEBUG=true
WORKERS=1
Initialize database:
# Run database migrations to create tables
alembic upgrade head
3οΈβ£ Frontend setup
cd web
# Install dependencies
npm install
# Configure environment variables
cp example.env .env.local
# Edit .env.local file
Configure .env.local file:
# Development environment configuration
NEXT_PUBLIC_API_URL=http://localhost:8010/agent/v1
NEXT_PUBLIC_WS_URL=ws://localhost:8010/agent/v1/chat/ws
NEXT_PUBLIC_DEFAULT_CWD=/opt/app/playground
NEXT_PUBLIC_DEFAULT_MODEL=glm-4.7
4οΈβ£ Run the project
# Start backend (in project root directory)
python main.py
# Start frontend (in web directory)
npm run dev
5οΈβ£ Access the application
- Application URL: http://localhost:3000
π Project Structure
agent-kit/
βββ agent/ # Backend service
β βββ api/ # API routes
β βββ core/ # Core configuration
β βββ service/ # Business logic
β β βββ websocket_handler.py # WebSocket handler
β β βββ session_manager.py # Session management
β βββ shared/ # Shared modules
β βββ utils/ # Utility functions
βββ web/ # Frontend application
β βββ src/
β β βββ app/ # Next.js pages
β β βββ components/ # React components
β β βββ hooks/ # Custom Hooks
β β βββ lib/ # Utility library
β β βββ store/ # Zustand state management
β β βββ types/ # TypeScript types
βββ alembic/ # Database migrations
βββ deploy/ # Deployment files
βββ docs/ # Documentation
β βββ websocket-session-flow.md # WebSocket flow
β βββ guides/ # Claude Agent SDK guides
βββ main.py # Application entry point
βββ README.md # This file
π― Core Features
1. Real-time Conversation System
- β WebSocket real-time communication
- β Streaming response support
- β Session persistence
- β Message history management
2. Intelligent Session Management
- β Multi-session support
- β Session search and filtering
3. Powerful AI Capabilities
- β Claude Agent SDK integration
- β Custom tool calling (in development)
- β Slash command system (in development)
- β Skills system (in development)
- β MCP protocol support (in development)
4. Permissions & Security
- β Fine-grained tool permission control
- β User confirmation mechanism
βοΈ Configuration
Backend Configuration
| Config Item | Description | Default Value |
|---|---|---|
ANTHROPIC_API_KEY |
Claude API key | - |
ANTHROPIC_BASE_URL |
API base URL | https://api.anthropic.com |
ANTHROPIC_MODEL |
Model to use | glm-4.7 |
HOST |
Server host | 0.0.0.0 |
PORT |
Server port | 8010 |
DEBUG |
Debug mode | false |
WORKERS |
Number of workers | 1 |
Frontend Configuration
| Config Item | Description | Default Value |
|---|---|---|
NEXT_PUBLIC_API_URL |
Backend API URL | http://localhost:8010/agent/v1 |
NEXT_PUBLIC_WS_URL |
WebSocket URL | ws://localhost:8010/agent/v1/chat/ws |
NEXT_PUBLIC_DEFAULT_CWD |
Working directory | /opt/app/playground |
NEXT_PUBLIC_DEFAULT_MODEL |
Default model | glm-4.7 |
π Documentation
For detailed guides and API documentation, please visit:
- Frontend API Documentation - React components, types, and API interfaces
- WebSocket Session Flow - WebSocket session and data flow
- Guides - Comprehensive guides for various features
Development Guides
- Session Management - Session creation, management, and message handling
- Streaming vs Single Mode - AI response mode comparison
- Custom Tools - Creating and using custom AI tools
- Slash Commands - Custom slash command development
- Skills Guide - Skill system usage and development
- MCP Integration - Model Context Protocol integration
- Hosting Guide - Production deployment and configuration
- Permissions Management - Permission control and security settings
π€ Contributing
All forms of contributions are welcome!
Bug Reports & Feature Requests
If you find a bug or have a new feature suggestion, please submit it through GitHub Issues.
π License
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
π Acknowledgments
- Claude Agent SDK - Core AI framework
# Supported AI Coding Agents
This skill is compatible with the SKILL.md standard and works with all major AI coding agents:
Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.