Agent skill

Dc Power Flow

by benchflow-ai in benchflow-ai/skillsbench

DC power flow analysis for power systems. An agent skill from benchflow-ai/skillsbench.

Apache-2.0Auto-check passed

Install Dc Power Flow

skills CLI
$ npx skills add benchflow-ai/skillsbench --skill dc-power-flow -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install benchflow-ai/skillsbench dc-power-flow --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/benchflow-ai/skillsbench.git skills-src && mkdir -p .claude/skills && cp -r skills-src/tasks/energy-market-pricing/environment/skills/dc-power-flow .claude/skills/dc-power-flow && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
dc-power-flow
GitHub stars
1.8k
Token cost
~717 tokens
SKILL.md length
182 words
Files
2 (incl. scripts)
Skills in repo
178
Repo updated
First seen
Licence
Apache-2.0

At a glance

DC power flow analysis for power systems. An agent skill from benchflow-ai/skillsbench.

  • Works in 3 steps: Lossless lines - Ignore resistance (R ≈ 0) → Flat voltage - All bus voltages = 1.0 pu → Small angles - sin(θ) ≈ θ, cos(θ) ≈ 1
  • Computing power flows using DC approximation
  • SKILL.md covers DC Approximations, Bus Number Mapping, Susceptance Matrix (B) and Power Balance Equation, plus 5 more sections
  • Runs Python scripts from its folder

What it does

Dc Power Flow is an agent skill from benchflow-ai/skillsbench. DC power flow analysis for power systems. Use when computing power flows using DC approximation, building susceptance matrices, calculating line flows and loading percentages, or performing sensitivity analysis on transmission networks.

Its SKILL.md is about 720 tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including scripts (for example `scripts/build_b_matrix.py`).

The repository describes itself as: SkillsBench evaluates how well skills work and how effective agents are at using them. The licence is Apache-2.0.

When your agent uses it

  • Computing power flows using DC approximation
  • Building susceptance matrices
  • Calculating line flows and loading percentages
  • Performing sensitivity analysis on transmission networks

Example prompts

  • “/dc-power-flow”

Requirements

  • Python 3

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Lossless lines - Ignore resistance (R ≈ 0)
  2. Flat voltage - All bus voltages = 1.0 pu
  3. Small angles - sin(θ) ≈ θ, cos(θ) ≈ 1

What it can do on your machine

Read from SKILL.md and the folder at commit 9a1f4dd. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Dc Power Flow loads about 717 tokens when it runs. Until then it costs about 63 tokens; SKILL.md has 182 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~63
When it runs · the whole SKILL.md, loaded when a task matches
~717

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from benchflow-ai/skillsbench at commit 9a1f4dd, republished under its Apache-2.0 licence (© benchflow-ai). 182 words, ~717 tokens.

Download SKILL.mdSave it as .claude/skills/dc-power-flow/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
dc-power-flow
description
DC power flow analysis for power systems. Use when computing power flows using DC approximation, building susceptance matrices, calculating line flows and loading percentages, or performing sensitivity analysis on transmission networks.

DC Power Flow

DC power flow is a linearized approximation of AC power flow, suitable for economic dispatch and contingency analysis.

DC Approximations

  1. Lossless lines - Ignore resistance (R ≈ 0)
  2. Flat voltage - All bus voltages = 1.0 pu
  3. Small angles - sin(θ) ≈ θ, cos(θ) ≈ 1

Result: Power flow depends only on bus angles (θ) and line reactances (X).

Bus Number Mapping

Power system bus numbers may not be contiguous (e.g., case300 has non-sequential bus IDs). Always create a mapping from bus numbers to 0-indexed array positions:

python
# Create mapping: bus_number -> 0-indexed position
bus_num_to_idx = {int(buses[i, 0]): i for i in range(n_bus)}

# Use mapping for branch endpoints
f = bus_num_to_idx[int(br[0])]  # NOT br[0] - 1
t = bus_num_to_idx[int(br[1])]

Susceptance Matrix (B)

Build from branch reactances using bus number mapping:

python
# Run: scripts/build_b_matrix.py
# Or inline:
bus_num_to_idx = {int(buses[i, 0]): i for i in range(n_bus)}
B = np.zeros((n_bus, n_bus))

for br in branches:
    f = bus_num_to_idx[int(br[0])]  # Map bus number to index
    t = bus_num_to_idx[int(br[1])]
    x = br[3]  # Reactance
    if x != 0:
        b = 1.0 / x
        B[f, f] += b
        B[t, t] += b
        B[f, t] -= b
        B[t, f] -= b

Power Balance Equation

At each bus: Pg - Pd = B[i, :] @ θ

Where:

  • Pg = generation at bus (pu)
  • Pd = load at bus (pu)
  • θ = vector of bus angles (radians)

Slack Bus

One bus must have θ = 0 as reference. Find slack bus (type=3):

python
slack_idx = None
for i in range(n_bus):
    if buses[i, 1] == 3:
        slack_idx = i
        break
constraints.append(theta[slack_idx] == 0)

Line Flow Calculation

Flow on branch from bus f to bus t (use bus number mapping):

python
f = bus_num_to_idx[int(br[0])]
t = bus_num_to_idx[int(br[1])]
b = 1.0 / br[3]  # Susceptance = 1/X
flow_pu = b * (theta[f] - theta[t])
flow_MW = flow_pu * baseMVA

Line Loading Percentage

python
loading_pct = abs(flow_MW) / rating_MW * 100

Where rating_MW = branch[5] (RATE_A column).

Branch Susceptances for Constraints

Store susceptances when building constraints:

python
branch_susceptances = []
for br in branches:
    x = br[3]
    b = 1.0 / x if x != 0 else 0
    branch_susceptances.append(b)

Line Flow Limits (for OPF)

Enforce thermal limits as linear constraints:

python
# |flow| <= rating  →  -rating <= flow <= rating
flow = b * (theta[f] - theta[t]) * baseMVA
constraints.append(flow <= rate)
constraints.append(flow >= -rate)

© benchflow-ai, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (scripts) in tasks/energy-market-pricing/environment/skills/dc-power-flow of benchflow-ai/skillsbench.

  • SKILL.md
  • scripts/build_b_matrix.py

Open the folder on GitHubat commit 9a1f4dd

Compare with similar skills

Dc Power Flow next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Dc Power Flow compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Dc Power Flow this skillbenchflow-ai/skillsbench1.8k—~717Automated safety check: PassApache-2.0
Ito Computeaffaan-m/ECC275k1 repos~1.7kAutomated safety check: PassMIT
Kotlin Coroutines Flowsaffaan-m/ECC275k4 repos~2kAutomated safety check: PassMIT
Kotlin Coroutines Flowsaffaan-m/ECC275k—~1.7kAutomated safety check: PassMIT
Channel Message Flowsopenclaw/openclaw392k1 repos~306Automated safety check: PassMIT
Login Flownexu-io/open-design100k—~334Automated safety check: PassApache-2.0

Similar skills

  • Ito Compute

    affaan-m/ECC

    Query live GPU inventory, submit an authenticated Itô fixed-rate RFQ, inspect RFQ or procurement status, revoke device credentials, and run explicitly gated node qualification through the separately…

    275k GitHub starsUsed in 1 repo~1.7k tokens
    Business, Finance & HRAuto-check passed
  • Kotlin Coroutines and Flow patterns for Android and KMP — structured concurrency, Flow operators, StateFlow, error handling, and testing.

    275k GitHub starsUsed in 4 repos~2k tokens
    DevelopmentAuto-check passed
  • Android および KMP 向けの Kotlin コルーチンと Flow パターン — 構造化並行性、Flow オペレーター、StateFlow、エラーハンドリング、テスト。

    275k GitHub stars~1.7k tokensUpdated 4 days ago
    MobileAuto-check passed
  • Channel Message Flows

    openclaw/openclaw

    A skill your agent uses when running QA Lab channel message flow evidence.

    392k GitHub starsUsed in 1 repo~306 tokens
    Auto-check passed
  • Login Flow

    nexu-io/open-design

    Mobile login and authentication flow screens. An agent skill from nexu-io/open-design.

    100k GitHub stars~334 tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Official

    Govern Power Automate flows and Power Apps at scale using the FlowStudio MCP cached store.

    40k GitHub starsUsed in 2 repos~3.6k tokens
    DevelopmentAuto-check passed

More from benchflow-ai/skillsbench

All 178 skills in this repo
  • Lean4 Memories

    benchflow-ai/skillsbench

    This skill should be used when working on Lean 4 formalization projects to maintain persistent memory of successful proof patterns, failed approaches, project conventions, and user preferences…

    1.8k GitHub stars~3.2k tokensUpdated 2 mo ago
    Auto-check passed
  • Senior Data Engineer

    benchflow-ai/skillsbench

    World-class data engineering skill for building scalable data pipelines, ETL/ELT systems, real-time streaming, and data infrastructure.

    1.8k GitHub stars~5.9k tokensUpdated 2 mo ago
    Auto-check passed
  • Ac Branch Pi Model

    benchflow-ai/skillsbench

    AC branch pi-model power flow equations (P/Q and |S|) with transformer tap ratio and phase shift, matching acopf-math-model.md and MATPOWER branch fields.

    1.8k GitHub stars~1.1k tokensUpdated 2 mo ago
    Auto-check passed
  • Civ6lib

    benchflow-ai/skillsbench

    Civilization 6 district mechanics library. An agent skill from benchflow-ai/skillsbench.

    1.8k GitHub stars~1.7k tokensUpdated 2 mo ago
    Auto-check passed
  • D3 Visualization

    benchflow-ai/skillsbench

    Build deterministic, verifiable data visualizations with D3.js (v6).

    1.8k GitHub stars~1.5k tokensUpdated 2 mo ago
    Auto-check passed
  • Energy Calculator

    benchflow-ai/skillsbench

    Calculate per-second RMS energy from audio files. An agent skill from benchflow-ai/skillsbench.

    1.8k GitHub stars~437 tokensUpdated 2 mo ago
    Auto-check passed

Questions about Dc Power Flow

What does Dc Power Flow do?

DC power flow analysis for power systems. An agent skill from benchflow-ai/skillsbench. Dc Power Flow is an agent skill from benchflow-ai/skillsbench. DC power flow analysis for power systems.

When should I use Dc Power Flow?

Dc Power Flow fits situations like: computing power flows using DC approximation; building susceptance matrices; calculating line flows and loading percentages; performing sensitivity analysis on transmission networks.

How do I install Dc Power Flow in Claude Code?

Run `npx skills add benchflow-ai/skillsbench --skill dc-power-flow -a claude-code`. Or copy the skill folder (tasks/energy-market-pricing/environment/skills/dc-power-flow in benchflow-ai/skillsbench) into .claude/skills/dc-power-flow in your project. Claude Code loads it when a task matches its description.

How do I install Dc Power Flow in Codex?

Run `npx skills add benchflow-ai/skillsbench --skill dc-power-flow -a codex`. Or copy the skill folder (tasks/energy-market-pricing/environment/skills/dc-power-flow in benchflow-ai/skillsbench) into .agents/skills/dc-power-flow in your project. Codex loads it when a task matches its description.

Can I use Dc Power Flow in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add benchflow-ai/skillsbench --skill dc-power-flow -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/dc-power-flow, .gemini/skills/dc-power-flow, .github/skills/dc-power-flow and .opencode/skills/dc-power-flow in your project.

What does Dc Power Flow need to run?

Going by SKILL.md and its folder, Dc Power Flow needs Python for the scripts in its folder. Our summary lists: Python 3.

Does Dc Power Flow access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Dc Power Flow safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Dc Power Flow use?

Dc Power Flow is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Dc Power Flow use?

About 717 tokens (SKILL.md is roughly 2.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Dc Power Flow?

Skills that share tags, products or a category with Dc Power Flow: Ito Compute (affaan-m/ECC, 275k stars), Kotlin Coroutines Flows (affaan-m/ECC, 275k stars), Kotlin Coroutines Flows (affaan-m/ECC, 275k stars) and Channel Message Flows (openclaw/openclaw, 392k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Dc Power Flow?

benchflow-ai (a GitHub organization) maintains it in benchflow-ai/skillsbench, which has 1,832 GitHub stars. The repository holds 178 skills in this directory. The repository was last updated on July 23, 2026.

Source: benchflow-ai/skillsbench on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.