Feishu Identity Routing
Use this skill when a workspace needs a reusable way to:
- merge the same human across multiple Feishu apps/accounts
- store app-local
open_idunder one canonical user subject - resolve the right
open_idfor a targetaccountId/app_context - route outbound actions correctly in multi-agent setups
What to create
Create these workspace files if missing:
identity/feishu-user-master.json— canonical data storeidentity/feishu-user-master.md— human-readable summary
Core rules
- One person = one subject
- Merge by
union_idfirst, thenuser_id - Treat
open_idas app-local only - Before any outbound action:
- resolve the user subject globally
- resolve the target app/account-specific
open_id - build the provider target from that local identity
For Feishu DM routing, use:
accountId=<target account>target=user:<open_id>
Scripts
Use bundled scripts when you need deterministic updates:
scripts/merge_feishu_identity.js— merge one recordscripts/merge_feishu_identity_batch.js— merge many recordsscripts/review_feishu_pending.js— approve/reject pending merges
When to read references
- Read
references/workflow.mdwhen setting up or extending the process - Read
references/schema-example.jsonwhen creating a new master file - Read
references/pending-review-policy.mdwhen conflicts appear - Read
references/outbound-routing-patterns.mdwhen implementing outbound delivery or cross-agent routing - Read
references/examples.mdwhen you want concrete merge/routing examples
Notes
- Do not hardcode a specific agent like
mainorinfoIntelOfficerinto the design. - Model routing as: global subject resolution → app-context identity selection → provider-specific outbound target.
- Keep the skill reusable across future agents and Feishu accounts.