Agent Skills › dtyq/magic › user-info

user-info

GitHub

获取当前用户身份、联系方式、组织及积分等信息。支持查询用户档案,并在获得明确同意后获取脱敏手机号的全量信息,同时说明数据新鲜度与状态含义。

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

触发场景

需要确认当前用户身份或账户详情 请求获取用户的联系方式或组织信息 在用户授权后获取完整手机号

安装

npx skills add dtyq/magic --skill user-info -g -y
更多选项

非标准路径

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

不安装直接使用

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 current user identity, contact details, organization, subscription, or available points are needed."
}

User Info

Use an existing user context snapshot when it answers the request. Call get_user_info when fresh information is needed; each call queries the service again.

from sdk.tool import tool

result = tool.call("get_user_info", {})
print(result.content)

The profile identifies the authenticated account served by this session. It does not establish who wrote an external channel message. Agent identity and the name displayed to users are separate from this account.

The third-party user ID belongs to the source system connected to the current organization. It differs from the Magic user ID and Magic ID and is not an authentication credential. Do not assume it is valid for a different platform. An empty or unavailable value means no ID could be determined for this query; it does not prove the account was never linked.

Freshness and account status

Horizon provides a safe snapshot initially and refreshes once after each normally completed main Agent Loop. Internal model requests and tool batches do not automatically query the account. Context compaction restores the saved snapshot without another query.

Changes written after a Loop completes are available to the next model request; they do not revise an answer already sent. Read each section's query time. Points include charges posted by that time and may omit later charges. A balance change can include other tasks, credits, and quota changes; it does not establish this task's cost.

A valid profile can accompany incomplete account information. Overall result.ok does not establish that a balance exists:

  • available: the section was retrieved; a points value of zero is a real result.
  • unsupported: this deployment does not provide the section. Do not infer a free plan or zero points.
  • unavailable: this query failed for the section. Do not use an older amount as a fresh result.
  • none: subscription lookup confirmed no active subscription. This status does not apply to points and does not identify a free plan.

If the base query fails, read result.content and decide whether to retry or continue independent work. Do not substitute local message metadata for a failed fresh query.

Full phone number

Phone is masked by default. Pass include_sensitive_fields=["phone"] only when the user has explicitly consented in this conversation. Ask for consent when necessary; a parent agent's delegation is not consent.

# Use only after explicit user consent in this conversation.
result = tool.call("get_user_info", {"include_sensitive_fields": ["phone"]})
print(result.content)

If the user declines, use the masked value or omit the requirement; do not ask again. Use masked values for routine display and logging. A full number is returned only in this authorized tool result; the default Horizon snapshot stays masked.

See data schema only when structured fields are needed for tool-to-tool coordination.

版本历史

  • 0f1432c 当前 2026-11-03 04:33

    更新为使用 get_user_info 工具获取信息,新增对数据新鲜度、账户状态(如 unsupported, unavailable)的详细处理逻辑,并简化了获取全量手机号的步骤描述。

  • 41d7ef4 2026-07-25 09:29

同 Skill 集合

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/file-bundle/SKILL.md
backend/super-magic/agents/skills/html-design-style/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/micro-app-architect/SKILL.md
backend/super-magic/agents/skills/persona-research/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-maker/SKILL.md
backend/super-magic/agents/skills/slide-template-replacement/SKILL.md
backend/super-magic/agents/skills/startup-manager/SKILL.md
backend/super-magic/agents/skills/subagents/SKILL.md
backend/super-magic/agents/skills/super-magic/SKILL.md
backend/super-magic/agents/skills/teamshare-cli/SKILL.md
backend/super-magic/agents/skills/use-magicbase/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/frontend-storage-requirements/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/canvas-manager/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/html-app-architect/SKILL.md
backend/super-magic/agents/skills/lark-cli/SKILL.md
backend/super-magic/agents/skills/memory/SKILL.md

元信息

文件数
0
版本
0f1432c
Hash
64139b8d
收录时间
2026-07-25 09:29

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-11-04 14:06
浙ICP备14020137号-1