welcome-guide
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.
- License 许可
- Apache-2.0
- 所属仓库
- apache/magpie
- 最近更新
- 2026-11-12
- Stars
- ★ 145
- Forks
- 126
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
- 参考文档ACKNOWLEDGEMENTS.md3.0 KB
- 参考文档sections/audit-phases.md14.2 KB
- 其他sections/audit-phases.md.tmpl14.1 KB
- 参考文档sections/manifest.json834 B
- 其他SKILL.md.tmpl21.2 KB
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 listwith the samePYTHONPATH. 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
welcomesub-action is this skill; run this one rather than repeating its steps there.
References
setup_preflight/welcome.py— when a guide is due, and theshow,list,recordandenablecommands.tools/setup-preflight/README.md— thewelcomefinding and its state.
04 同仓库更多 Skills
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.
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.
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.
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.
generate-cve-json
Generate a CVE 5.x JSON document from an <tracker> tracking issue, ready to paste into the Vulnogram `#source` tab of the ASF CVE tool at https://cveprocess.apache.org/cve5/<CVE-ID>#source. The conversion is deterministic: same issue in, same JSON bytes out. Handles multiple credits (one per line) and multiple references (URLs extracted from the issue's "Public advisory URL" and "PR with the fix" fields; the "Security mailing list thread" field is treated as internal-only and never exported).
write-skill
Write a new skill for the Apache Magpie framework, or bring an existing one up to current conventions. Scaffolds the directory, walks the house style and the prompt-injection defences, and validates before it ships.