home / skills / beshkenadze / claude-skills-marketplace / with-scripts

with-scripts skill

/templates/with-scripts

This skill executes deterministic script-driven tasks to process data and validate input before presenting results.

npx playbooks add skill beshkenadze/claude-skills-marketplace --skill with-scripts

Review the files below or copy the command above to add this skill to your agents.

Files (2)
SKILL.md
1.4 KB
---
name: skill-with-scripts
description: A template for skills that include executable code for deterministic operations.
version: 1.0.0
dependencies:
  - python>=3.8
---

# Skill With Scripts

## Overview

This template demonstrates how to create a skill that includes executable scripts for operations that benefit from deterministic code execution rather than token generation.

## Instructions

When the user requests [specific task]:

1. Analyze the request to determine required parameters
2. Execute the appropriate script from the `scripts/` directory
3. Process and format the results
4. Present the output to the user

## Available Scripts

### `scripts/process_data.py`

Use this script when the user needs to process structured data.

```bash
python scripts/process_data.py --input <file> --output <format>
```

### `scripts/validate.py`

Use this script to validate user input before processing.

```bash
python scripts/validate.py --check <type> --data <input>
```

## Examples

### Example: Data Processing

**User Request:**
"Process the CSV file and generate a summary"

**Steps:**
1. Validate the input file exists
2. Run `process_data.py` with appropriate flags
3. Format and present results

## Guidelines

- Always validate input before processing
- Handle errors gracefully and inform the user
- Use scripts for deterministic operations
- Generate responses for creative/analytical tasks

Overview

This skill is a template for building skills that bundle executable scripts for deterministic operations. It shows how to accept user parameters, run the right script from a scripts/ directory, and return structured results. The template emphasizes predictable, testable behavior for tasks that are better served by code than by generated text.

How this skill works

When a request arrives, the skill parses required parameters and validates inputs. It selects and executes the appropriate script (for example, data processing or validation) with command-line flags, captures the script output, and formats the results for the user. Errors and validation failures are handled gracefully and reported with actionable messages.

When to use it

  • You need deterministic, repeatable computation that scripts can perform reliably.
  • Input requires validation or transformation before any natural language response.
  • Processing structured data, such as CSV/JSON, where programmatic parsing is simpler and safer.
  • You want clear separation between code-executed logic and generative response content.
  • Deploying skills that must run unit-tested scripts or shell utilities on input files.

Best practices

  • Always validate user inputs before invoking scripts to avoid runtime errors.
  • Sanitize and constrain file paths and parameters to prevent security issues.
  • Capture and normalize script output (exit codes, stdout, stderr) and present concise user-facing messages.
  • Prefer small, single-purpose scripts (validate, process) to keep behavior predictable.
  • Document required flags and expected input formats in the skill for maintainability.

Example use cases

  • Process an uploaded CSV to compute aggregates and return a summary report.
  • Validate a user-provided configuration or schema before running downstream processing.
  • Run a deterministic data transformation pipeline and return a normalized JSON output.
  • Preflight user input to ensure it meets format constraints before accepting a large job.
  • Chain validation and processing scripts for staged data workflows (validate -> process -> summarize).

FAQ

What scripts are included in this template?

The template includes a validate script for input checks and a process_data script for structured data transformations. Each script accepts command-line flags for input and output control.

How are errors communicated to the user?

Scripts should return clear exit codes and messages; the skill captures stderr and exit status, formats a concise explanation, and suggests corrective steps when possible.