Agent Skillsdtyq/magic › user-info

user-info

GitHub

用于获取当前会话用户的基本身份信息,如姓名、职位、邮箱及部门等。支持通过显式同意机制获取脱敏后的完整手机号,并严格限制敏感字段的访问权限。

backend/super-magic/agents/skills/user-info/SKILL.md dtyq/magic

Trigger Scenarios

需要查询当前用户的个人基本信息 需要获取用户的完整手机号(需先征得同意)

Install

npx skills add dtyq/magic --skill user-info -g -y
More Options

Non-standard path

npx skills add https://github.com/dtyq/magic/tree/master/backend/super-magic/agents/skills/user-info -g -y

Use without installing

npx skills use dtyq/magic@user-info

指定 Agent (Claude Code)

npx skills add dtyq/magic --skill user-info -a claude-code -g -y

安装 repo 全部 skill

npx skills add dtyq/magic --all -g -y

预览 repo 内 skill

npx skills add dtyq/magic --list

SKILL.md

Frontmatter
{
    "name": "user-info",
    "description": "Use when you need the current user's identity or contact info: name, job title, employee number, email, phone, or department."
}

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_fields without 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.

Version History

  • 41d7ef4 Current 2026-07-25 09:29

Same Skill Collection

backend/super-magic/agents/skills/agent-info/SKILL.md
backend/super-magic/agents/skills/canvas-designer/SKILL.md
backend/super-magic/agents/skills/chat-history/SKILL.md
backend/super-magic/agents/skills/cli-manager/SKILL.md
backend/super-magic/agents/skills/compact-chat-history/SKILL.md
backend/super-magic/agents/skills/creating-slides/SKILL.md
backend/super-magic/agents/skills/develop-data-analysis-dashboard/SKILL.md
backend/super-magic/agents/skills/document-converter/SKILL.md
backend/super-magic/agents/skills/download/SKILL.md
backend/super-magic/agents/skills/env-manager/SKILL.md
backend/super-magic/agents/skills/im-channels/SKILL.md
backend/super-magic/agents/skills/magic-calendar/SKILL.md
backend/super-magic/agents/skills/magicbase/SKILL.md
backend/super-magic/agents/skills/sandbox-manager/SKILL.md
backend/super-magic/agents/skills/self-media-pre-publish-analyzer/SKILL.md
backend/super-magic/agents/skills/share/SKILL.md
backend/super-magic/agents/skills/skill-vetter/SKILL.md
backend/super-magic/agents/skills/slide-template/SKILL.md
backend/super-magic/agents/skills/subagents/SKILL.md
backend/super-magic/agents/skills/teamshare-cli/SKILL.md
backend/super-magic/agents/skills/using-cron/SKILL.md
backend/super-magic/agents/skills/using-llm/SKILL.md
backend/super-magic/agents/skills/using-mcp/SKILL.md
frontend/magic-web/.agents/skills/antd-style-to-tailwind/SKILL.md
frontend/magic-web/.agents/skills/code-review-expert/SKILL.md
frontend/magic-web/.agents/skills/dual-edition-module-migration/SKILL.md
frontend/magic-web/.agents/skills/magic-web-error-logging/SKILL.md
frontend/magic-web/.agents/skills/sw-best-practices/SKILL.md
frontend/magic-web/.agents/skills/ui-data-testid/SKILL.md
frontend/magic-web/.agents/skills/vercel-composition-patterns/SKILL.md
frontend/magic-web/.agents/skills/vercel-react-best-practices/SKILL.md
backend/super-magic/agents/skills/ai-card-generator/SKILL.md
backend/super-magic/agents/skills/crew-creator/SKILL.md
backend/super-magic/agents/skills/deep-research/SKILL.md
backend/super-magic/agents/skills/dingtalk-cli/SKILL.md
backend/super-magic/agents/skills/html-api-sdk/SKILL.md
backend/super-magic/agents/skills/lark-cli/SKILL.md
backend/super-magic/agents/skills/micro-app-architect/SKILL.md
backend/super-magic/agents/skills/self-media-composer/SKILL.md
backend/super-magic/agents/skills/skill-creator/SKILL.md

Metadata

Files
0
Version
f9973c5
Hash
b1a39ac3
Indexed
2026-07-25 09:29

- 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-20 08:59
浙ICP备14020137号-1 $방문자$