Documentation Index

Fetch the complete documentation index at: https://docs.skillable.com/llms.txt

Use this file to discover all available pages before exploring further.

Automated Script Activity Assistant

Prev Next

An automated activity script has a harder job than most scripts: it has to inspect a lab environment, decide whether the learner actually did the thing, and report that verdict back to the platform in the form the platform expects. Getting the check right and the result format right at the same time is where most Lab Developers stall. The Automated Script Activity Assistant is a chat panel in the activity script editor that generates and refines validation scripts from a description of what should be checked, and it already knows how an activity script has to report its result.

Best Practices for the Automated Script Activity Assistant

The assistant handles the mechanics of reporting a result. What it can't do is decide what "correct" means for your lab — that judgement is yours, and it belongs in the prompt.

  • Describe the end state, not the steps. "Check that a storage account exists in the resource group with HTTPS-only enabled" validates an outcome. "Check the learner clicked Create" validates nothing you can actually observe. Prompt for the state the environment should be in.
  • Say what counts as partial credit, or say it's all-or-nothing. Activity scripts can award a fraction of the score value. If a learner who got two of three settings right deserves two thirds of the marks, say so — otherwise expect a binary result.
  • Set the target and language before you generate. A check against a cloud subscription and a check on a Windows VM are different scripts. Configure these first rather than describing them in the prompt.
  • Describe your lab, because the assistant can't see it. Resource group names, VM names, file paths, expected values — the assistant has no view of your environment and will invent plausible names if you don't supply them.
  • Ask what happens when the check can't run. A script that errors partway through shouldn't award marks by accident. Ask explicitly for the failure path to report incorrect rather than falling through, and confirm you got it.
  • Have it tell the learner why. Feedback in the result is the difference between "Incorrect" and "the storage account exists but HTTPS-only is off". Ask for the message, and keep it specific to what failed.
  • Don't let a validation script change the environment. A script that creates or fixes something while checking it will pass on the second run regardless of what the learner did. If you want the assistant to only inspect, say so.
  • Use several focused prompts rather than one long one. One prompt per thing being checked produces a script that's easier to read and easier to regenerate when a requirement changes.
  • Try to break it before you ship it. Run the activity having done the task correctly, then having done it partly, then not at all. A generated script that passes the happy path and marks everything correct is worse than no script.

Who Uses the Assistant, and When

Lab Developers use the assistant in Skillable Studio while building or editing an automated activity. It runs at authoring time only — it plays no part in evaluating the learner's work when the lab runs, and learners never see it.

Reach for it when:

  • You're writing your first validation script. Scored automation is where the technical barrier is highest, and a working draft removes the hardest part of starting.
  • You know what to check but not how to check it. You want to confirm a service is running or a file contains a particular string, and you'd rather describe that than look up the command.
  • An activity is scoring wrongly. Describe what the learner did and what the activity reported, and ask for a fix — false passes are usually a logic gap the assistant can close.
  • You're adapting a check to a different target. A check written for a Windows VM can be reworked for a Linux VM or a cloud subscription through the chat.
  • You need partial scoring or learner feedback. These are the parts of activity scripting most often skipped because of the syntax, and the assistant knows the shapes they take.

How the Assistant Works in Skillable Studio

The assistant is a chat panel in the activity script editor, beside the script itself. You describe what should be checked, it generates a script, and you choose whether to put it into the editor — nothing is written to your script until you accept it. From there you keep refining in the same conversation.

You'll find it when creating or editing a script on an automated activity, reached from Edit Instructions → Activities → New Automated Activity, or by editing an existing one. Select Build with Script Assistant to start; the panel is labelled Assistant in the editor.

The editor around it — the info pane, the Read Me, Source, Settings and Outcomes tabs, resizing and full screen — is covered in Dual Pane Script Editor. Two parts matter here. The Source tab keeps the prompts behind the current script, so you can edit a prompt and regenerate rather than starting again; regenerating replaces the script, so save any hand edits first. And once you accept a generated script, the Read Me description and How to Use this Script fields are written for you — the more specific your prompts, the more useful that documentation is.

[FIGURE 1 — the activity script editor with the assistant panel open beside the script pane.]

What the assistant already understands

The assistant knows how an automated activity script has to report itself. That's why you don't need to explain the platform's conventions in your prompt — the command for returning a result, how a partial score is expressed as a proportion of the score value, how to attach a message the learner sees, and the command for setting a lab variable that later instructions or activities can use.

[VERIFY — confirm the exact scope of the format awareness before publishing: which commands and conventions are covered, and whether it varies by target or language.]

What it doesn't know is what should count as correct. That's a content decision, and it comes from your prompt.

Scoring shapes the script

An activity script's output is a verdict, so decide the scoring model before you prompt. All-or-nothing is simplest: the check passes or it doesn't. Partial scoring awards a proportion of the score value, which suits activities with several independent requirements — and needs the prompt to spell out what each part is worth.

Where an activity uses on-demand evaluation, the Outcomes tab adds actions that fire on a correct or incorrect result, such as setting a variable or revealing a section of the instructions. The assistant writes the script; the outcomes are configured separately. See Activity Outcomes.

A variable set by an activity script can't be used in that same script, only in ones that run afterwards. See Defining Variables.

Worked example

An activity needs to confirm the learner created a storage account with public blob access disabled. Describe the end state, the target, and how it should be scored and reported:

"Targeting the Azure subscription with PowerShell: check the lab's resource group contains a storage account, and that public blob access is disabled on it. Award half marks if the account exists but public access is still enabled, and tell the learner which check failed. If the resource group can't be read, report incorrect rather than erroring."

That prompt carries everything the assistant needs a decision on — what to inspect, the partial credit rule, the learner-facing message, and the behaviour when the check itself can't run. What comes back is a script that inspects the resource group, reports a full or partial result with a message, and fails closed.

[FIGURE 2 — the generated script in the editor with the originating prompt visible in the Source tab.]

To extend it, continue the conversation — "also check the account is in UK South" — rather than rewriting the prompt from scratch.

[FIGURE 3 — optional: the activity as the learner sees it, showing the feedback message from a partial result.]

Next Steps

The assistant writes the script; it doesn't configure the activity around it. In the Settings tab, enable scoring, set the score value and the retry attempts, and decide whether script output is shown to the learner. On the activity itself, fill in the Correct and Incorrect feedback so learners get a response even when the script's own message doesn't cover the case. Automating Activities covers the full set.

If the script is one you'll want in other labs, publish it to the Script Library from the editor's command menu once the activity is saved.

Related Topics