AGENT SKILL

lab-create

Create a new MCS Labs hands-on lab in the classic format (README plus _labs page with a long-form use-case walkthrough) or the guided missions format (lab_format missions with copyable prompts, reveals and knowledge checks), then wire it to its module and event agendas, preview it unlisted and validate it. Use when asked to create, add, draft or scaffold a lab, turn prompts or a demo script into a lab, convert a lab to missions, or add a new lab to a bootcamp or event. Not for fixing an existing lab (use lab-update) or auditing one (use lab-review).

License 许可
MIT
所属仓库
microsoft/mcs-labs
最近更新
2026-11-13
Stars
★ 153
Forks
104

01 前言 Front Matter

name
lab-create
description
Create a new MCS Labs hands-on lab in the classic format (README plus _labs page with a long-form use-case walkthrough) or the guided missions format (lab_format missions with copyable prompts, reveals and knowledge checks), then wire it to its module and event agendas, preview it unlisted and validate it. Use when asked to create, add, draft or scaffold a lab, turn prompts or a demo script into a lab, convert a lab to missions, or add a new lab to a bootcamp or event. Not for fixing an existing lab (use lab-update) or auditing one (use lab-review).

02 资源文件 4

03 SKILL.md 正文

Create a lab

A lab is two hand-written copies plus images. labs/<slug>/README.md is what GitHub readers see; _labs/<slug>.md is the published page and carries the front matter. A guided lab names it _labs/mission-<slug>.md (section 4). CI (scripts/check-lab-sync.js) fails a PR that changes the README without the _labs copy. The authoring contract is docs/NEW_LAB_CHECKLIST.md: read it first and treat it as the source of truth. This skill adds the decisions and the order of work.

1. Choose the format

Choose When
Missions (lab_format: missions) A product tour driven by prompts and UI choices, 20–45 minutes, where each section should end with a "why it worked" reveal and a quick check. The reference lab is cowork-zava-sales.
Classic (default) Long builds with many configuration steps, code or large tables; labs that several deliveries share; external labs (front matter stub only).

Missions is opt-in per lab and must not change other labs. Do not convert a shared lab in place: copy it to a new slug for the delivery that needs the new format. Preserve the creator's scenario, use-case and teaching-step order when converting. Keep the required path first and mark only trailing extensions optional; do not move an earlier exercise to make it optional. Compare ordered prompts, sample inputs and expected outputs, not just the topics covered. Follow the shared rules in ../lab-review/references/learning-design.md.

2. Gather inputs before writing

Ask for anything missing, one question at a time:

  • Slug (kebab-case, unique across _labs/ and labs/, never starting with mission-), title, one-sentence description.
  • Persona and level (100, 200 or 300), journeys, section, duration in minutes.
  • Parent module slug, and which events or agendas should list the lab.
  • The finish line: the artifact the learner leaves with.
  • For a conversion, the source lab and its ordered exercises, prompts and sample outputs.
  • Prompts the requester supplied. Keep supplied prompts verbatim; never "improve" them.
  • Environment: tenant, accounts, licenses, connectors or plugins the facilitator prepares.
  • The system of record, if the scenario reads or writes business data (a CRM, a ticketing app): its name, URL and what learners should check there. Zava Sales uses Zava Sales Hub.

Confirm with the requester before adding a lab to an advertised (listed) event or replacing a lab in an existing agenda.

3. Design for doing, not reading

Apply ../lab-review/references/learning-design.md while drafting. In short:

  • One outcome per section, stated up front; the learner acts within the first screen.
  • Steps start with a verb and name the exact UI label in bold.
  • Every prompt sits alone in a text code fence so it can be copied.
  • Explain why after the learner has seen it work (the reveal), not before.
  • Mark trailing extensions optional. Core minutes must add up to duration; preserve an existing advertised duration unless the organizer approves a change.
  • Write for the learner only. No proctor or maintainer notes, no per-step minute arithmetic or "if time permits", and no account-hygiene boilerplate (separate profile or private window, ask the proctor if something is missing). State pacing as at most one plain sentence saying which missions or use cases are core and which are optional.
  • Attendees with provided or pre-provisioned event accounts use a pre-set-up environment. Use the templates' short, organizer-neutral cue; do not imply that attending any event is enough to skip setup. Keep required sign-in, downloads and approvals that teach the exercise visible. Put own-tenant provisioning in mission_lab.self_setup for missions and a closed setup disclosure in both readable copies. prerequisites is an attendee readiness checklist, not provisioning. Do not add runner checks, repeated tenant warnings, test reports or generic work-habit advice. Put downloads in the step that uses them.
  • Keep literal | characters out of prose inside Markdown tables; use &#124; and inspect generated HTML for Kramdown table/list rendering errors.
  • Ground every product claim in a current Microsoft Learn page and cite it.
  • Use today's product names. scripts/lab-audit-terms.json lists retired ones; since August 2026 it is Microsoft Copilot and Microsoft Copilot Chat (not Microsoft 365 Copilot), and since October 2026 the Microsoft Copilot harness (not GitHub Copilot harness). Keep license SKU names, such as Microsoft 365 Copilot (add-on), as the price list shows them, and UI labels exactly as the product shows them.
  • When there is a system of record, tell learners to open it in another tab, both in the prerequisites and in Lab Details: say what it is and what to check there, so they can confirm what Copilot found and see the records it creates.

4. Scaffold the files

Templates are in templates/. Replace every %%PLACEHOLDER%% and delete every TEMPLATE NOTE comment. This must return nothing before you commit (-s skips the site copy name the lab does not use):

grep -rnsE '%%|TEMPLATE NOTE' labs/<slug> _labs/<slug>.md _labs/mission-<slug>.md
Format labs/<slug>/README.md Site copy
Classic templates/classic-README.md templates/classic-site.md, saved as _labs/<slug>.md
Missions templates/missions-README.md templates/missions-site.md, saved as _labs/mission-<slug>.md; keep its slug and permalink lines

Then:

  1. Headings. README headings carry an emoji (house style); _labs headings never do. The hand-written table of contents must use the ids each renderer generates: ## 🧭 Lab Details is #-lab-details on GitHub and ## Lab Details is #lab-details on the site. An emoji with a variation selector (🛠️, ⚙️, ✍️) keeps U+FE0F in the GitHub id, so the link is #️-instructions-by-use-case. Do not guess: the audit checks every anchor.
  2. Order. order is one global sort. Pick a free number next to the labs it should sit beside (grep -H '^order:' _labs/*.md); the audit reports duplicates as fm-order-duplicate.
  3. Module. module: <slug> needs _modules/<slug>.md, and that module's lab: should name this lab when it is the companion lab.
  4. Images. Put them in labs/<slug>/images/ and link them relatively (images/name.webp) from both copies. Capture product screenshots with the lab-runthrough skill: WebP, with genuine light and dark pairs for product UI. Follow the image-selection rules in ../lab-review/references/learning-design.md; a supplied reference or theme-neutral image needs no invented dark version.
  5. Missions only. Follow "Authoring a guided mission lab" in the checklist, and:
    • Core mission minutes must sum to duration; extensions get optional: true.
    • Each prompt appears identically in front matter, the _labs body and the README, in order, including repeated occurrences. Preserve unlabelled sample input and expression fences too. Expected responses belong in an output fence within instruction, never in prompt; mirror them in both bodies. Use |- for multiline prompts so YAML adds no trailing newline.
    • Each check has exactly one option with correct: true.
    • Each step screenshot has title, alt, caption, and width and height that match the file; add src_dark for genuine matching product captures and a <picture> element in both bodies. Reference hero and step images in the body so the feed packages them. The hero has no src_dark.
    • Use the curriculum name for title and both H1s; the creative headline is a secondary tagline. Keep stable mission/step IDs and readiness order when converting an existing guided page, so saved progress remains attached to the same actions.
    • Omit cleanup missions and finish.cleanup for organizer-disposed environments. Put necessary own-tenant cleanup in the setup disclosure; runner cleanup stays in the run-through log.
    • scripts/lab-missions.test.js asserts which labs use missions. Add the new slug to that allowlist and add a contract test for the new lab modeled on the Zava Sales tests (prompts verbatim in all copies, copies in sync, mission contract).
    • The instruction must be enough on its own; help is supplementary regardless of whether the current renderer opens or collapses it. An action a later step depends on, such as attaching a file the next prompt reads, gets its own visible step. The renderer reads missions from mission_lab front matter, so learner-critical guidance in the Markdown body alone may not appear on the page. Verify the rendered version and open each details panel.
    • The layout keeps checkmarks, quiz answers and the reflection note only in the browser's local storage, says so next to the note, and offers Save a PDF copy (the browser's print dialog) at the end. Do not promise elsewhere that notes are saved, and do not add download buttons: prompts are copied in place.

5. Preview without touching the public site

  • While the lab is in review, give it unlisted: true, search: false and sitemap: false. The URL is public but not advertised or indexed.
  • List it in a preview event (for example _data/agendas/bootcamp-preview.yml) rather than an advertised one. An unlisted lab in a listed agenda is an agenda-unlisted-lab error.
  • To ship into an advertised event later: remove the three preview flags, swap the agenda row's slug, keep the event's fallback labs: list in agenda order, and set lab: false on a companion module row when an explicit lab row follows it (_data/agendas/README.md).

6. Validate

Check exclusions first. If modules or presentations are excluded, follow ../lab-update/SKILL.md#5-validate instead of running the broad commands below, even with a named slug. Do not open excluded attachments to check a lab.

npm run audit:labs -- <slug>      # no errors; read every warning and info line
npm test                          # unit tests, including the missions contract tests
bash tools/run.sh                 # or .\tools\run.ps1; open /mcs-labs/labs/<slug>/

In the browser, check images, the table of contents, Previous and Next with ?event=<id>, and light and dark themes. For missions also check keyboard use, a mobile width, the page with JavaScript disabled, and full-size image links with the actual theme JavaScript loaded. Verify both readable copies and the rendered mission fields, not just front matter syntax. Then run the lab-review skill, and lab-runthrough when a training environment is available.

7. Hand off

Commit both copies, images, and module and agenda changes together on a feature branch. Add the slug to the Which lab? dropdown in .github/ISSUE_TEMPLATE/lab_update.yml (alphabetical) so people can report problems with it. Open the PR with ../lab-update/templates/pr-body.md. Never merge your own PR.

04 同仓库更多 Skills

microsoft
microsoft/mcs-labs

hotel-operations-briefing

Prepare a grounded Contoso Grand Hotel operations briefing and review-ready executive email from the supplied annual performance report. Use for hotel briefing, urgent operational issues, or an executive email grounded in that report.

★ 153
microsoft
microsoft/mcs-labs

zava-stock-policy

Evaluate Zava demo stock allocation and delivery-charge approval policy using bundled synthetic reference data.

★ 153
microsoft
microsoft/mcs-labs

liftline-dispatch

Evaluate delivery capacity, unloading, slots, and quotes from LiftLine's bundled synthetic service fixture for the Zava demo.

★ 153
microsoft
microsoft/mcs-labs

lab-update

Fix or refresh an existing MCS Labs hands-on lab (classic or guided missions format) and open a pull request. Applies findings from a lab-review report, a lab-runthrough log, a GitHub lab-update issue or a product change, keeps the README and _labs copies in sync, replaces drifted screenshots, keeps durations and agendas consistent, records confirmed product renames for the audit, validates, and opens a reviewable PR. Use when asked to fix, update, refresh, correct or modernize a lab, apply review findings, update screenshots, handle a product rename across labs, or open a PR for lab changes. Never merges.

★ 153
microsoft
microsoft/mcs-labs

lab-runthrough

Run an MCS Labs hands-on lab (classic or guided missions format) step by step in a real browser on a training or demo tenant, the way an attendee would, to find steps, UI labels, prompts and screenshots that no longer match the product. Logs each step with evidence and distinguishes passed, drift, defect, variance, blocked, untested and unverified outcomes; recaptures drifted screenshots, including light and dark pairs. Runs windowed or headless in an isolated private profile, signed in by the person or as a provisioned event training account. Use when asked to test, run, walk through, dry-run, validate or smoke-test a lab or event curriculum, check whether a lab still works after a product update, or refresh a lab's screenshots. Never writes credentials into the repo, logs or chat. Hand the log to lab-update for the fix PR.

★ 153
microsoft
microsoft/mcs-labs

lab-review

Review an MCS Labs hands-on lab (classic README/_labs format or the guided missions format) for broken anchors and images, README and site copies drifting apart, invalid front matter, durations that disagree with Lab Details or event agendas, retired product names, out-of-date product claims, and wordy or hard-to-follow instructions. Produces a prioritized report with file and line evidence and proposed fixes. Use when asked to review, audit, check, QA, lint or health-check a lab, an event's labs, all labs, or a lab PR, or to find what needs updating after a product change. Read-only; hand fixes to lab-update and live testing to lab-runthrough.

★ 153