send-feishu▌
jssfy/k-skills · updated Apr 8, 2026
MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.
Send messages, images, and files to Feishu groups or individuals.
Send Feishu Message
Send messages, images, and files to Feishu groups or individuals.
Environment Variables
| Variable | Purpose | Required |
|---|---|---|
FEISHU_WEBHOOK |
Group Webhook URL | For text/card/image to group |
FEISHU_APP_ID |
App credential | For image/file upload & API send |
FEISHU_APP_SECRET |
App credential | For image/file upload & API send |
FEISHU_CHAT_ID |
Group chat ID (oc_xxx) |
For API send to group |
FEISHU_USER_OPEN_ID |
Personal open_id (ou_xxx) |
For send to individual |
FEISHU_WEBHOOK_SECRET |
Webhook signing secret | Only when group webhook has signature enabled |
Decision Logic
ALWAYS follow this order — never skip Step 0:
Step 0 — Run Variable Resolution (mandatory bash, no exceptions):
FEISHU_APP_ID="${FEISHU_APP_ID:-${CTI_FEISHU_APP_ID:-}}"
FEISHU_APP_SECRET="${FEISHU_APP_SECRET:-${CTI_FEISHU_APP_SECRET:-}}"
FEISHU_CHAT_ID="${FEISHU_CHAT_ID:-${CTI_FEISHU_CHAT_ID:-}}"
FEISHU_WEBHOOK="${FEISHU_WEBHOOK:-${CTI_FEISHU_WEBHOOK:-}}"
echo "resolved: APP_ID=${FEISHU_APP_ID:0:8} CHAT_ID=${FEISHU_CHAT_ID} WEBHOOK=${FEISHU_WEBHOOK:0:20}"
Step 1 — Based on what's now available, choose method:
File/Image + FEISHU_CHAT_ID set → Get token → Upload → API send to chat_id ✅ preferred for groups
File/Image + FEISHU_APP_ID set → Get token → Upload → API send to chat_id (if user implied group)
Text/Card + FEISHU_WEBHOOK set → Webhook send
Text/Card + FEISHU_CHAT_ID set → Get token → API send to chat_id
Any + open_id known → Get token → API send to open_id
Nothing set after resolution → Ask user for missing vars
Choosing Format
Use text — simple one-liner (status update, quick note).
Use card — content has title + body, structured data, summary, or report.
Use image — user explicitly asks to send an image file, screenshot, or chart.
Use file — user asks to send .html/.md/.pdf/.doc/.xls etc., or content is too long for card display.
Send to individual — user says "发给我", "私发", "发到我的飞书", or specifies a person.
Step A: Get tenant_access_token
Required for image upload, file upload, and API message sending. Skip this step if only sending text/card via Webhook.
curl -s -X POST 'https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal' \
-H 'Content-Type: application/json' \
-d '{"app_id":"'"$FEISHU_APP_ID"'","app_secret":"'"$FEISHU_APP_SECRET"'"}'
Response: {"code":0,"msg":"ok","tenant_access_token":"t-xxx","expire":7200}
Extract the token and store in a variable for subsequent steps.
Step B: Upload Image (get image_key)
Required when sending an image. Supports JPEG/PNG/WEBP/GIF/TIFF/BMP/ICO, max 10MB.
curl -s -X POST 'https://open.feishu.cn/open-apis/im/v1/images' \
-H "Authorization: Bearer $TOKEN" \
-F 'image_type="message"' \
-F 'image=@"/path/to/image.png"'
Response: {"code":0,"data":{"image_key":"img_xxx"}}
Step C: Upload File (get file_key)
Required when sending a file. Max 30MB.
curl -s -X POST 'https://open.feishu.cn/open-apis/im/v1/files' \
-H "Authorization: Bearer $TOKEN" \
-F 'file_type="stream"' \
-F 'file_name="report.md"' \
-F 'file=@"/path/to/file"'
file_type values: opus (audio), mp4 (video), pdf, doc, xls, ppt, stream (binary, use as default).
Response: {"code":0,"data":{"file_key":"file_xxx"}}
Sending via Webhook
If the webhook has signature verification enabled, generate timestamp and sign first, then include them in the webhook payload. If no secret is configured, use the unsigned examples below.
Signed Webhook Payload
python3 - <<'PY'
import base64
import hashlib
import hmac
import json
import os
import time
secret = os.environ["FEISHU_WEBHOOK_SECRET"]
timestamp = str(int(time.time()))
string_to_sign = f"{timestamp}\n{secret}".encode("utf-8")
sign = base64.b64encode(hmac.new(string_to_sign, b"", digestmod=hashlib.sha256).digest()).decode("utf-8")
payload = {
"timestamp": timestamp,
"sign": sign,
"msg_type": "text",
"content": {"text": "MESSAGE_HERE"},
}
print(json.dumps(payload, ensure_ascii=False))
PY
将输出的 JSON 作为 curl -d 请求体发送到 $FEISHU_WEBHOOK。卡片、图片消息同理,只需替换 msg_type 和 content。
Send Text
curl -s -X POST "$FEISHU_WEBHOOK" -H "Content-Type: application/json" \
-d '{"msg_type":"text","content":{"text":"MESSAGE_HERE"}}'
Send Card
Pick header color by sentiment:
green— success, complete, doneorange— warning, attentionred— error, failureblue— info, neutral (default)purple— highlight, special
Short content (no special characters):
curl -s -X POST "$FEISHU_WEBHOOK" -H "Content-Type: application/json" \
-d '{
"msg_type":"interactive",
"card":{
"header":{"title":{"content":"TITLE","tag":"plain_text"},"template":"COLOR"},
"elements":[{"tag":"div","text":{"content":"BODY_LARK_MD","tag":"lark_md"}}]
}
}'
Long content or content with special characters ($, ", \n, etc.) — always use this pattern:
python3 - << 'EOF' | curl -s -X POST "$FEISHU_WEBHOOK" \
-H "Content-Type: application/json" -d @-
import json
card = {
"msg_type": "interactive",
"card": {
"header": {"title": {"content": "TITLE", "tag": "plain_text"}, "template": "COLOR"},
"elements": [
{"tag": "div", "text": {"content": "BODY LINE 1\nBODY LINE 2", "tag": "lark_md"}},
{"tag": "hr"},
{"tag": "div", "text": {"content": "SECTION 2 CONTENT", "tag": "lark_md"}}
]
}
}
print(json.dumps(card))
EOF
Card body supports lark_md: **bold**, *italic*, ~~strike~~, [link](url), \n for newlines.
Send Image via Webhook
After uploading image (Step B) to get image_key:
curl -s -X POST "$FEISHU_WEBHOOK" \
-H "Content-Type: application/json" \
-d '{"msg_type":"image","content":{"image_key":"img_xxx"}}'
Sending via API
Use API when sending files, or sending any content to an individual.
Send to Group (chat_id)
curl -s -X POST "https://open.feishu.cn/open-apis/im/v1/messages?receive_id_type=chat_id" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json; charset=utf-8" \
-d '{"receive_id":"'"$FEISHU_CHAT_ID"'","msg_type":"MSG_TYPE","content":"CONTENT_JSON_STRING"}'
Send to Individual (open_id)
curl -s -X POST "https://open.feishu.cn/open-apis/im/v1/messages?receive_id_type=open_id" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json; charset=utf-8" \
-d '{"receive_id":"'"$FEISHU_USER_OPEN_ID"'","msg_type":"MSG_TYPE","content":"CONTENT_JSON_STRING"}'
API Content Formats
The content field must be a JSON-encoded string (escaped JSON inside JSON).
Text:
{"receive_id":"ID","msg_type":"text","content":"{\"text\":\"Hello\"}"}
Image (after upload):
{"receive_id":"ID","msg_type":"image","content":"{\"image_key\":\"img_xxx\"}"}
File (after upload):
{"receive_id":"ID","msg_type":"file","content":"{\"file_key\":\"file_xxx\"}"}
After Sending
Check the response JSON:
- Webhook:
{"code":0,"msg":"success"}→ success - API:
{"code":0,"msg":"success","data":{...}}→ success code!= 0 → report the error:- 19001: webhook URL invalid
- 19021: signature check failed
- 19022: IP not whitelisted
- 19024: keyword check failed
- 99991663: token invalid or expired (re-run Step A)
- 230001: bot not in chat or no permission
Important
- Always escape special characters in JSON (quotes, backslashes, newlines)
- Use
printf '%s'or heredoc to safely pass message content to curl if it contains special characters - Never ask for Webhook URL or credentials without first running the Variable Resolution block —
CTI_FEISHU_*may already provide them - If vars are still empty after Variable Resolution, then tell user which ones to configure
- If webhook signature is enabled, require
FEISHU_WEBHOOK_SECRETand includetimestamp+sign - Keep messages concise — Feishu cards have display limits
- Token from Step A is valid for 2 hours; no need to refresh within a session
- App permissions required:
im:message:send_as_bot(send messages),im:resource(upload images and files)
How to use send-feishu on Cursor
AI-first code editor with Composer
Prerequisites
Before installing skills in Cursor, ensure your development environment meets these requirements:
- ›Cursor installed and configured on your development machine
- ›Node.js version 16.0+ with npm package manager (verify with
node --version) - ›Active project directory or workspace where you want to add send-feishu
Execute installation command
Execute the skills CLI command in your project's root directory to begin installation:
The skills CLI fetches send-feishu from GitHub repository jssfy/k-skills and configures it for Cursor.
Select Cursor when prompted
The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:
Verify installation
Confirm successful installation by checking the skill directory location:
Reload or restart Cursor to activate send-feishu. Access the skill through slash commands (e.g., /send-feishu) or your agent's skill management interface.
Security & Verification Notice
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.
List & Monetize Your Skill
Submit your Claude Code skill and start earning
Use Cases▌
User Story & Requirements Generation
Create detailed user stories, acceptance criteria, and feature specs
Example
Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios
Reduce spec writing time by 50%, ensure comprehensive coverage
Competitive Analysis
Research competitors, compare features, identify gaps
Example
Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities
Complete competitive research in 2 hours instead of 2 days
Roadmap Prioritization
Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs
Example
Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale
Make data-driven prioritization decisions faster
Stakeholder Communication
Draft PRDs, status updates, and stakeholder presentations
Example
Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement
Save 3-5 hours/week on communication overhead
Implementation Guide▌
Prerequisites
- ›Claude Desktop or compatible AI client
- ›Access to product documentation and roadmap tools (Jira, Notion, etc.)
- ›Understanding of product management frameworks (RICE, Jobs-to-be-Done, etc.)
- ›Stakeholder contact information and communication channels
Time Estimate
30-60 minutes to see productivity improvements
Installation Steps
- 1.Install product management skill
- 2.Start with user story generation for known feature
- 3.Progress to competitive analysis: research 2-3 competitors
- 4.Use for roadmap prioritization: apply RICE/ICE scoring
- 5.Draft stakeholder communications and refine based on feedback
- 6.Build template library for recurring PM tasks
- 7.Share effective prompts with product team
Common Pitfalls
- ⚠Not validating competitive research—verify facts before sharing
- ⚠Accepting user stories without involving engineering team
- ⚠Over-relying on frameworks without qualitative judgment
- ⚠Not customizing outputs to company culture and communication style
- ⚠Skipping stakeholder validation of generated requirements
Best Practices▌
✓ Do
- +Validate research and competitive analysis with real data
- +Collaborate with engineering when generating technical requirements
- +Customize frameworks and templates to your company context
- +Use skill for first drafts, refine with stakeholder input
- +Document successful prompt patterns for PM tasks
- +Combine AI efficiency with human judgment and intuition
✗ Don't
- −Don't publish competitive analysis without fact-checking
- −Don't finalize user stories without engineering review
- −Don't make prioritization decisions solely on AI scoring
- −Don't skip customer validation of generated requirements
- −Don't ignore company-specific context and culture
💡 Pro Tips
- ★Provide context: company goals, constraints, customer feedback
- ★Ask for alternatives: 'Show 3 ways to prioritize this roadmap'
- ★Request stakeholder-specific formatting: 'Executive summary vs. engineering spec'
- ★Use skill for 70% generation + 30% customization to company needs
When to Use This▌
✓ Use When
Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.
✗ Avoid When
Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.
Learning Path▌
- 1Basic: user stories, feature specs, status updates
- 2Intermediate: competitive analysis, prioritization frameworks, PRDs
- 3Advanced: product strategy, go-to-market planning, OKR setting
- 4Expert: product vision, market positioning, business model innovation
Discussion
Product Hunt–style comments (not star reviews)- No comments yet — start the thread.
Ratings
4.6★★★★★68 reviews- ★★★★★Mateo Chawla· Dec 28, 2024
send-feishu has been reliable in day-to-day use. Documentation quality is above average for community skills.
- ★★★★★Kiara Haddad· Dec 16, 2024
Keeps context tight: send-feishu is the kind of skill you can hand to a new teammate without a long onboarding doc.
- ★★★★★Zaid Harris· Dec 16, 2024
send-feishu fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- ★★★★★Kiara Flores· Dec 16, 2024
send-feishu reduced setup friction for our internal harness; good balance of opinion and flexibility.
- ★★★★★Benjamin Lopez· Dec 12, 2024
I recommend send-feishu for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
- ★★★★★Pratham Ware· Dec 4, 2024
Registry listing for send-feishu matched our evaluation — installs cleanly and behaves as described in the markdown.
- ★★★★★Yash Thakker· Nov 23, 2024
send-feishu reduced setup friction for our internal harness; good balance of opinion and flexibility.
- ★★★★★Noah Zhang· Nov 19, 2024
Useful defaults in send-feishu — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- ★★★★★Xiao Chawla· Nov 15, 2024
We added send-feishu from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
- ★★★★★Daniel Malhotra· Nov 7, 2024
send-feishu is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
showing 1-10 of 68