AGENT SKILL

Magpie 欢迎指南展示

welcome-guide

按需展示 Magpie 欢迎指南:不带参数时展示通用指南,带名称时展示指定技能族的指南。此外,还可在指南被关闭或隐藏后将其重新开启。除上述操作外均为只读。

适用职业普通用户
License 许可
Apache-2.0
所属仓库
apache/magpie
最近更新
2026-11-15
Stars
★ 146
Forks
127

01 前言 Front Matter

mode
Meta
name
welcome-guide
family
setup
license
Apache-2.0
capability
capability:platform
description
Show a Magpie welcome guide on demand: the general one with no argument, or a skill family's by name. Also turns a guide back on after it was dismissed or hidden. Read-only apart from that.
when_to_use
When the user asks to "show the welcome guide", "show the security guide", "how do I start with Magpie", or wants a dismissed guide back ("show the security welcome again", "turn the Magpie guide back on").
surface_hash
sha256:3dafaec43fc7bd00
argument-hint
[family]
measured_tokens
1265

02 资源文件 5

03 SKILL.md 正文

<!-- SPDX-License-Identifier: Apache-2.0 https://www.apache.org/licenses/LICENSE-2.0 -->

<!-- Placeholder convention (see ../../AGENTS.md#placeholder-convention-used-in-skill-files): <family> → a guide name: general, or a skill family that ships a guide -->

setup-welcome-guide

Every Magpie skill's pre-flight shows a short welcome guide the first time it is due: the general guide on the first Magpie skill a user runs, and a family's guide on the first run of that family. This skill shows any of them on request, and brings back one the user dismissed or hid. The guides live in the pre-flight checker, setup_preflight/guides/, one Markdown file each; this skill adds no logic of its own and only runs the checker's welcome command.

Adopter overrides

<!-- BEGIN MAGPIE BLOCK: adopter-overrides — generated from tools/dev/blocks/adopter-overrides.md -->

Before running its default behaviour, this skill consults setup-welcome-guide.md in the personal layer (.apache-magpie-local/ when the project adopted Magpie, falling back to the main checkout's in a linked worktree, or <git-common-dir>/apache-magpie/ when Magpie is only installed; applied first, wins on conflict) and .apache-magpie-overrides/setup-welcome-guide.md (committed, project-wide) in the adopter repo, if present, and applies any agent-readable overrides it finds. See docs/setup/agentic-overrides.md for the contract.

Hard rule: agents NEVER modify the snapshot under <adopter-repo>/.apache-magpie/. Local modifications go in the override file; framework changes go via PR to apache/magpie.

<!-- END MAGPIE BLOCK: adopter-overrides -->

Inputs

Argument Guide
(none) general — getting started, staying current, asking, making Magpie yours.
<family> That family's guide, for example security.

Step 1 — Show the guide

Resolve <family> first: no argument means general, and the user's words map onto a name — "show the security guide" is security; "how do I start with Magpie" or "show the welcome guide" is general. Pass any other name through as given and let the command say whether it exists.

Every command uses the installed copy of the checker, as the pre-flight does:

PYTHONPATH="$HOME/.cache/apache-magpie/preflight" \
  python3 -P -m setup_preflight.welcome show --family <family>
  • Exit 0 → show the output to the user verbatim, as Markdown. Do not summarise, reword or trim it, and substitute nothing in its placeholders.
  • Exit 2, no such guide → say there is no guide by that name and list the ones that ship, from python3 -P -m setup_preflight.welcome list with the same PYTHONPATH. Never invent a guide.
  • No such module → the checker is not installed yet. Say so, and propose /magpie-setup:setup config, which installs it.

Then offer the coloured version in one line: the agent's reply cannot carry colour, so the user runs it themselves with the ! prefix, the same command with --color=always added (NO_COLOR turns the colour off).

Step 2 — Turn it back on, when asked

Only when the user asked to have a guide back ("show the security welcome again", "turn the Magpie guide back on"), clear its recorded choice so the pre-flight shows it again:

PYTHONPATH="$HOME/.cache/apache-magpie/preflight" \
  python3 -P -m setup_preflight.welcome enable --family <family>

It merges into the personal layer's reconciled.json, removing only welcome.<family>. Never edit that file by hand, and never run enable for a request that only asked to see the guide. Report in one line what changed, for example "The security guide will show on your next security skill."

Hard rules

  • Show the guide exactly as the command printed it.
  • This skill writes nothing except through welcome enable, and only on the user's request.
  • The setup skill's welcome sub-action is this skill; run this one rather than repeating its steps there.

References

04 同仓库更多 Skills

apache
apache/magpie

upgrade

Upgrade Magpie in one run: move to the new version if needed (`setup update`), check this machine and project, apply one approved plan, re-check, and print exact commands for what is out of reach.

★ 146
apache
apache/magpie

dependency-vulnerability-audit

Read-only dependency vulnerability audit for one repository or a local checkout. Detects the project's dependency manager(s), runs the appropriate audit tool, surfaces patchable findings grouped by severity, and proposes upgrades for maintainer review. Never modifies manifests or lock files and never opens update PRs.

★ 146
apache
apache/magpie

thread-mentor

Draft a teaching-register comment on a GitHub issue or PR thread on the configured `<upstream>` repo, aimed at a contributor missing context the maintainer would spell out. Reads the thread, decides whether an intervention is warranted, drafts one comment per the tone guide and convention pointers, and waits for explicit confirmation before posting via `gh`. Escalates on the four hand-off triggers.

★ 146
apache
apache/magpie

merge-candidates

Identify trivial, low-risk PRs in the `ready for maintainer review` queue of <upstream> that pass every quality gate and touch only supplementary areas (docs, changelog, translations, tests) — the "express lane". Surfaces and ranks candidates with per-PR diff summaries, an all-gates-green attestation, and the exact merge command. On explicit per-PR confirmation it can submit an APPROVE review, exactly as pr-management-code-review does. It never merges itself — automated merge is the deliberately-deferred Agentic Autonomous mode.

★ 146
apache
apache/magpie

CVE 5.x JSON 文档生成

generate-cve-json

从 <tracker> 跟踪工单生成 CVE 5.x JSON 文档,可直接粘贴到 https://cveprocess.apache.org/cve5/<CVE-ID>#source 处 ASF CVE 工具的 Vulnogram `#source` 标签页。该转换是确定性的:相同的工单输入总是产生完全相同的 JSON 字节输出。支持多条致谢信息(每行一条)和多个引用(URL 从工单的 "Public advisory URL" 和 "PR with the fix" 字段提取;"Security mailing list thread" 字段被视为仅内部使用,绝不导出)。

安全工程师安全公告与漏洞管理
★ 146
apache
apache/magpie

Apache Magpie 技能编写与迁移

write-skill

为 Apache Magpie 框架编写新技能,或将现有技能更新至当前规范。它会搭建目录结构、引导遵循项目内部风格与提示注入防护措施,并在发布前进行验证。

软件开发工程师插件与技能管理
★ 146