A skill tells your agent how to validate a report. A script can do the validation. Those are different jobs, and confusing them makes it hard to tell whether the agent actually checked anything or just described the right procedure.

Agent skill scripts are executable helpers packaged with a skill, conventionally in a scripts/ directory beside SKILL.md. That directory is optional. The Agent Skills specification separates executable code from instructions, reference material, and static assets. A useful skill does not have to contain code.

What belongs in the script

Use the script for checks you can define precisely enough to repeat.

For a report-checking workflow, the instructions might explain which report to inspect, when to ask for missing information, and how to interpret failures. A helper could check required columns and return the rows that violate a rule. Keep judgment in the workflow and put repeatable checks in code.

Check the host’s runtime before assuming it can execute a downloaded helper. The specification says language support depends on the implementation. It also provides an optional compatibility field for environment requirements, such as a Python installation or required system packages. Source: format and compatibility requirements.

How it works

Loading a skill and executing its helper are separate events. The official quickstart illustrates discovery, activation, then execution: the agent first sees metadata, loads instructions when relevant, and uses a tool to carry out the task. It also warns that models may answer without making the expected tool call.

For a script-backed workflow, ask what command ran and where to find its output. The completion report should include the exit status too. If execution was blocked, the agent should say so.

The host application supplies the execution path. The client integration guide describes file-based and dedicated-tool activation, including resolving relative references against the skill directory. The host needs a tool that can actually run the referenced code.

In Python, Microsoft’s Agent Framework requires a script_runner for file-based script execution; attempting execution without one raises an error. Its Agent Skills documentation recommends production safeguards including sandboxing, resource limits, input validation, and logging. That API belongs to Microsoft’s implementation. Check your own host’s documentation for its execution setup.

Scripts in practice

The report-checking example could use this folder layout:

report-checker/
  SKILL.md
  scripts/
    check_report.py
  references/
    report-rules.md

Its instructions could tell the agent to invoke the helper like this, after resolving the paths:

python3 <skill-root>/scripts/check_report.py --input <report-path>

The angle-bracket values are placeholders, and the validator itself still needs to be written. Before distributing this example as a working skill, the author would need to implement and test the helper, document its dependencies, and explain its outputs.

The official scripting guide supports both bundled helpers and instructions that call existing command-line packages. It recommends documenting prerequisites, pinning package versions, and moving complicated commands into tested scripts. A helper is most useful when it saves the agent from reconstructing fragile logic on each run.

For this example, I would require three behaviors:

  • Invalid input produces a clear error rather than a plausible report.
  • Findings identify the affected row and rule so the user can locate the problem.
  • The original report stays unchanged unless the user explicitly requests a repair.

The skill author chooses those behaviors for this workflow; the format leaves that decision open.

Review before running

When evaluating a skill, review its instructions and executable files separately. My suggested review questions are:

  1. What does it read, write, download, or send?
  2. Which runtime, dependencies, and credentials does it expect?
  3. Can I test it against a disposable fixture before using real data?
  4. What evidence distinguishes success, partial completion, and failure?

Do not let a convincing description substitute for that review. Start with read-only fixtures, keep credentials out of the package, and require explicit approval before external writes or spending.

When browsing the AgentNDX skills directory, use a listing to identify candidates, then inspect the linked source. For the broader distinction between workflow instructions and connected services, see skills vs. MCP servers.

FAQ

Does every agent skill need scripts?

No. Scripts are optional under the specification. Add one when the workflow has repeatable checks or other executable logic worth reusing. Source: optional skill directories.

Does loading a skill prove its script ran?

No. Activation loads instructions; execution requires a separate action. Ask for the actual execution result. The official quickstart explicitly notes that an agent may answer without running the expected command. Source: quickstart execution notes.

Can I use an existing CLI instead of bundling code?

Yes. The scripting guide describes one-off commands as an alternative to bundled scripts. Document the required tooling and version rather than assuming it is installed. Source: using scripts.

What should I test first?

For the report-checking example, start with one valid fixture, one missing a required column, and one containing a bad value. Require clear outcomes for all three before trusting the workflow with an important report.