Opens Adjie Brotools' PSCAD Scripter (https://tool.adjiebrotots.com/pscad-scripter/) on the user's own scenario with one link, and the tool computes the answer. Use when the user asks about writing PSCAD Python automation scripts (mhi.pscad, EMTDC): build and run a case, fault ride-through, critical clearing time, parameter sweeps over values, layers and substitution sets, harmonics and THD, snapshots and simulation sets, damping and control tuning, built as a workflow the tool turns into one...
Installs into .claude/skills of the current project.
Are you the author of Skill?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/adjiebrotot-skill-b29cda3d)
---
name: brotools-pscad-scripter
description: "Opens Adjie Brotools' PSCAD Scripter (https://tool.adjiebrotots.com/pscad-scripter/) on the user's own scenario with one link, and the tool computes the answer. Use when the user asks about writing PSCAD Python automation scripts (mhi.pscad, EMTDC): build and run a case, fault ride-through, critical clearing time, parameter sweeps over values, layers and substitution sets, harmonics and THD, snapshots and simulation sets, damping and control tuning, built as a workflow the tool turns into one ready-to-run script. Also use when they mention tool.adjiebrotots.com/pscad-scripter."
---
# PSCAD Scripter on tool.adjiebrotots.com
PSCAD Scripter is a free calculator that runs in the user's browser. This skill turns the user's question into **one link** that opens the tool on their scenario. The tool, not you, works out the result: its figures come from its own model and data, and anything you work out separately can differ from what the user then sees.
## What it decides
- **PSCAD Workflow Builder** (`pscad-scripter/builder`): Which study the PSCAD Python script runs, and in what order: a workflow of blocks (build the case, write component parameters, time a fault on its timed fault logic, run the EMT simulation, read output channels, check them for a peak, a nadir, THD, RMS, a sequence component, overshoot or damping, loops over values, layers and substitution sets, snapshots and simulation sets, results tables and graphs), the PSCAD case it opens and where its results go. The tool writes one ready-to-run Python script for PSCAD 5 and its Automation Library (mhi-pscad) from that workflow, and the user downloads it. It does not run PSCAD or work out a simulation result. The script comes from the tool, so a link to it gives the user the whole script.
## Workflow
1. **Pick the page.** Read the user's request and choose the page above that answers it. Open its reference (`references/<page>.md`, listed under Files) and read the LINK FORMAT, the most important keys and the Quick Starts. The reference is long: read the parts you need.
2. **Separate what the user said from what you must choose.** Every figure the user gave goes in as they gave it (convert units or periods only to match the field, and say so).
3. **Fill every other input that matters with a researched assumption.**
- If you can search the web, do it for figures that change over time or by place. For this tool that usually means the PSCAD component definitions and parameter names (the tool's component reference), the grid code's fault ride-through curve or harmonic limits, and the user's case, component Names and output channel names as they gave them. Prefer official and primary sources and note each source and its date.
- If you cannot search, use your own knowledge and say it is an estimate as of your knowledge date.
- Start from the nearest Quick Start (`qs`) for the user's place and case, and keep its figures unless you have a better one for this user. Send only what differs from it.
- Prefer what the user said earlier in the conversation over general figures. Never invent a figure the user gave differently.
4. **Build the link with the script** (it checks every key, range and choice, and encodes the link exactly):
```bash
python3 scripts/build_link.py --fields pscad-scripter/builder --find <words> # look up keys
python3 scripts/build_link.py --quickstarts pscad-scripter/builder --find <words> # look up Quick Starts
python3 scripts/build_link.py spec.json # build the link
```
`spec.json` holds `page`, `qs`, `set` (key: value, in the units the field shows on screen, numbers written plainly: `800000`, `6.5`, never `800,000` or `6,5`), `why` (key: your reason, 200 characters at most, shown to the user beside the value; a list key or `json` can have one too), `note` (one line, such as the place and date), `json` (an object, for a page whose reference defines it). If it prints NOT BUILT, fix what it lists and run it again. Use the link it prints exactly as printed.
The script checks every form field: its key, range, step and choices. List keys, part settings (`blk....`, `graph....`) and `json` are checked by the tool when the link opens, so write them exactly in the syntax the reference gives (its COMPACT LISTS, REFERENCE and JSON sections), with the names it lists. A Quick Start sets only what its line in the reference lists; when a list key (a set of tickers, portfolios or offers) replaces what the Quick Start holds, send every setting you want with it.
If you cannot run code, build the link by hand from the LINK FORMAT in the reference, using only keys and values listed there, and check each value against its range.
5. **Reply in the format below, and stop.** Never write the PSCAD Python script yourself, not even part of it: the tool writes it from the link, and the user downloads it there.
## Reply format
Your whole reply has these four parts, in this order, written in the user's language (keys and the link stay as they are):
1. **Your inputs**: a short list of what the user stated, each with the value that goes in the link.
2. **Assumptions**: a numbered list (or a table: Input | Value | Source or rationale), one entry per input you chose, each with its value and its source with the date for anything you looked up, or "estimate" and your reason for anything from your own knowledge. Put the same reason, shortened, in that key's `why`.
3. **The link**, as a clickable Markdown link to tool.adjiebrotots.com/pscad-scripter/..., and again inside a code block so the user can copy it if their chat app breaks a long link.
4. The sentence: **Open the link to see the result.** You may add one line inviting the user to correct any assumption, and then you will send a new link.
**Do not state results.** No verdict, figure, estimate, range, "roughly", "likely", or preview of what the tool will show, not even if the user asks. The only numbers in your reply are the inputs in the link. If the user asks what the answer is, explain that the tool works it out from these inputs and the link opens it, and offer to change any input.
If the request is outside what this tool does, say so, give the tool's address and help the user as you normally would.
## Link format (summary)
```
https://tool.adjiebrotots.com/pscad-scripter/builder/#load&v=1&qs=<quick start>&<key>=<value>&why.<key>=<reason>¬e=<one line>
```
- `#load` then `key=value` pairs joined by `&`, each value percent-encoded. `v=1` always.
- Values in the units the field shows: `6.1` for 6.1 %, `800000` for 800,000. A choice takes its listed value.
- The tool starts from the Quick Start (or its defaults) and applies each key. Keys not named keep their base value.
- Out of range numbers are pulled into range and unknown keys are skipped, and the tool tells the user. The script stops you before either happens.
- Never use the keys `s`, `open` or `embed`.
## Worked example
**User:** using tool.adjiebrotots.com/pscad-scripter/builder, write me a PSCAD script for C:/Studies/wind_farm.pscx that runs fault ride through for fault durations from 0.1 s to 0.3 s and saves the results tables as Excel files
**Spec** (`pscad-scripter/builder`):
```json
{
"page": "pscad-scripter/builder",
"set": {
"blk.n1.project": "C:/Studies/wind_farm.pscx",
"blk.n2.from": "0.1",
"blk.n2.to": "0.3",
"blk.n1.tableFmt": "xlsx"
},
"why": {
"blk.n1.project": "The case the user named, as they wrote it",
"blk.n2.from": "The user's shortest fault duration",
"blk.n2.to": "The user's longest fault duration",
"blk.n1.tableFmt": "The user wants the results as Excel files"
},
"qs": "frt",
"note": "Fault ride through, 0.1 to 0.3 s, Excel tables"
}
```
**Reply:**
**Your inputs**
- blk.n1.project: C:/Studies/wind_farm.pscx
- blk.n2.from: 0.1
- blk.n2.to: 0.3
**Assumptions**
1. Study: the Fault ride through Quick Start (qs=frt): for each fault duration it times the fault on the case's Timed Fault Logic, runs the EMT simulation and tables the voltage dip and the machine speed nadir, with every run's speed on one graph.
2. Durations: 0.1 s to 0.3 s in the Quick Start's steps of 0.04 s (blk.n2.from, blk.n2.to).
3. Case: C:/Studies/wind_farm.pscx, exactly as the user wrote it.
4. Tables: saved as Excel files rather than CSV (blk.n1.tableFmt).
5. Channels and the fault component: left as the Quick Start has them (Vpcc, Machine Speed, master:tfaultn), for the user to set to the names in their own case.
[Open PSCAD Scripter on this scenario](https://tool.adjiebrotots.com/pscad-scripter/builder/#load&v=1&qs=frt&blk.n1.project=C:/Studies/wind_farm.pscx&why.blk.n1.project=The%20case%20the%20user%20named,%20as%20they%20wrote%20it&blk.n2.from=0.1&why.blk.n2.from=The%20user%27s%20shortest%20fault%20duration&blk.n2.to=0.3&why.blk.n2.to=The%20user%27s%20longest%20fault%20duration&blk.n1.tableFmt=xlsx&why.blk.n1.tableFmt=The%20user%20wants%20the%20results%20as%20Excel%20files¬e=Fault%20ride%20through,%200.1%20to%200.3%20s,%20Excel%20tables)
```
https://tool.adjiebrotots.com/pscad-scripter/builder/#load&v=1&qs=frt&blk.n1.project=C:/Studies/wind_farm.pscx&why.blk.n1.project=The%20case%20the%20user%20named,%20as%20they%20wrote%20it&blk.n2.from=0.1&why.blk.n2.from=The%20user%27s%20shortest%20fault%20duration&blk.n2.to=0.3&why.blk.n2.to=The%20user%27s%20longest%20fault%20duration&blk.n1.tableFmt=xlsx&why.blk.n1.tableFmt=The%20user%20wants%20the%20results%20as%20Excel%20files¬e=Fault%20ride%20through,%200.1%20to%200.3%20s,%20Excel%20tables
```
Open the link to see the result.
## Files
- `references/pscad-scripter-builder.md`: PSCAD Workflow Builder. Every key with its label, unit, range and default, the Quick Starts and what each sets, list and json syntaxes, and an example.
- `references/params.json`: the same keys as data (what the script checks against).
- `scripts/build_link.py`: builds and checks the link. `python3 scripts/build_link.py --help` explains it.
Source: https://tool.adjiebrotots.com/pscad-scripter/ai/ (this skill, kept up to date with the tool).