user-info
User Info Skill
Retrieve the current session user's profile via get_user_info.
Basic Usage
from sdk.tool import tool
result = tool.call("get_user_info", {})
print(result.content)
Example output:
User: Zhang San. Position: Engineering Lead. Work Number: 10086. Email: zhang@example.com. Phone: 138****0000 (desensitized). Departments: Engineering, Architecture.
For structured access, use result.data:
| Field | Type | Notes |
|---|---|---|
id |
string | User ID |
nickname |
string | Display name |
real_name |
string | Legal name |
work_number |
string | Employee number (may be empty) |
position |
string | Job title |
email |
string | Email address |
phone |
string | Phone, desensitized by default (e.g. 138****0000) |
departments |
array | Each item: {id, name, path} |
Getting the Full Phone Number
Phone is masked by default to protect privacy. To get the full number, you must first ask for explicit user consent.
Step 1 — Ask for consent:
from sdk.tool import tool
result = tool.call("ask_user", {
"questions": '<question type="confirm">I need your full phone number to proceed. Do you allow me to access it?</question>'
})
print(result.content)
Step 2 — If the user consents, request the full number:
result = tool.call("get_user_info", {
"include_sensitive_fields": ["phone"]
})
print(result.content)
If the user declines: use the desensitized value or drop the requirement. Do not ask again.
Constraints
- Never pass
include_sensitive_fieldswithout prior explicit user approval in the same conversation. - Do not retry after a user refuses access to sensitive fields.
- Use the desensitized phone value for display, logging, or non-critical tasks where the full number is not strictly needed.
More from dtyq/magic
find-skill
Search and install skills from the platform skill library, skill market, or skillhub. Use when the agent needs to find or install a skill to expand its capabilities. Always search the platform first; fall back to skillhub only if nothing is found.
18wiki-generator
通过分析代码结构与依赖,自动提取系统总体架构、核心特有功能模块的实现细节,并生成互相关联的多页面 Wiki 结构文档集。作为项目的架构知识库守护者,还负责在日常开发中解答疑问,并在架构变更时自动维护文档。
15using-cron
Manage scheduled tasks — create, query, update, and delete. CRITICAL - When user message contains any future time intent (e.g. "in 2 days", "tomorrow at 8am", "every morning"), you MUST load this skill first. NEVER write custom scheduler scripts.
14code-review-expert
Expert code review of current git changes with a senior engineer lens. Detects SOLID violations, security risks, and proposes actionable improvements.
14designing-canvas-images
Canvas (画布) project management skill providing AI image generation, web image search, and design marker processing. Automatically used for all image generation tasks to organize and manage images. Supports image-to-image generation and design marker processing. Skip canvas only when users explicitly request without canvas or when operating on images in other applications like webpages or PPT. CRITICAL - When user message contains [@design_canvas_project:...] or [@design_marker:...] mentions, you MUST load this skill first before any operations.
14dual-edition-module-migration
Migrate modules between shared `src/opensource/` code and enterprise overlays under `enterprise/src/opensource/`, while preserving the `src/opensource` boundary and existing component override points.
13