Pbs logo

Pbs

Organization
AI-ModCon
pbs

PBS/OpenPBS job scheduler for HPC batch job scheduling. Use when submitting batch or interactive jobs with qsub, monitoring with qstat, deleting with qdel, writing #PBS job scripts, specifying resources with the select/ncpus/ mem/ngpus syntax, setting walltime, working with job arrays (-t flag), setting dependencies with -W depend=, checking job accounting, or troubleshooting jobs on any PBS or OpenPBS cluster.

Overview

PublisherAI-ModCon
Repositorygenesis-skills
Skill namepbs
Stars
37
Forks
16
Bundled files
6
LicenseBSD-2-Clause
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 6 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by AI-ModCon on GitHub. Read the source before you install it.

Installation

Install the Pbs AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/AI-ModCon/genesis-skills/tree/main/skills/hpc-skills/pbs
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/AI-ModCon/genesis-skills.git /tmp/genesis-skills
mkdir -p .claude/skills
cp -r /tmp/genesis-skills/skills/hpc-skills/pbs .claude/skills/pbs
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Pbs in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Pbs on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Pbs is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

PBS / OpenPBS Job Scheduler

PBS (Portable Batch System) is widely used at DOE labs (ALCF, etc.) and many academic HPC centers. Jobs are described with #PBS directives and submitted via qsub.

Quick Command Reference

CommandPurpose
qsub script.shSubmit a batch job script
qsub -IStart an interactive job
qstatView job queue
qstat -f <id>Full job detail
qdel <id>Delete/cancel a job
qhold <id>Place a user hold on a job
qrls <id>Release a held job
qalter <id>Modify a pending job
pbsnodes -aList all nodes and their state
qstat -QList available queues

Job State Codes

CodeStateMeaning
QQueuedWaiting for resources
RRunningCurrently executing
HHeldHeld by user, operator, or system
EExitingJob is finishing/cleaning up
CCompletedFinished (may appear briefly)
FFinishedJob is done (in history)
SSuspendedTemporarily suspended
WWaitingWaiting for eligible start time (-a)

Writing Job Scripts

#PBS directives must appear before any non-comment executable line.

Minimal working script:

bash
#!/bin/bash
#PBS -N myjob
#PBS -A myproject
#PBS -l select=1:ncpus=32:mem=64gb
#PBS -l walltime=01:00:00
#PBS -o myjob.out
#PBS -e myjob.err
#PBS -q workq

cd $PBS_O_WORKDIR
module load gcc openmpi
mpiexec -n 32 ./my_application

Key #PBS Directives

DirectiveExampleNotes
-NmyjobJob name
-AmyprojectAccount/project (often mandatory)
-l select=...2:ncpus=128:mem=256gbResource selection (see below)
-l walltime=02:30:00Wall clock limit (HH:MM:SS)
-qworkqQueue/destination
-ojob.outStdout path
-ejob.errStderr path
-j oe—Merge stdout+stderr into one file
-m abe—Email on abort/begin/end
-Muser@host.eduEmail address
-V—Export all current env vars to job
-v VAR=valNPROCS=8Export specific variable
-r n—Job is not rerunnable
-a202501011400Eligible start time (CCYYMMDDhhmm)
-W depend=afterok:12345Job dependency
-t1-100Job array (see below)

Resource Select Syntax

-l select=<N>:<property>=<value>:... where N is the number of "chunks" (typically nodes).

bash
# 1 node, 16 CPUs, 32 GB RAM
#PBS -l select=1:ncpus=16:mem=32gb

# 4 nodes, 128 CPUs each, 2 GPUs each
#PBS -l select=4:ncpus=128:mem=256gb:ngpus=2

# MPI + OpenMP hybrid (mpiprocs = MPI ranks per chunk)
#PBS -l select=2:ncpus=64:mpiprocs=4:ompthreads=16:mem=128gb

# Request specific node features
#PBS -l select=1:ncpus=32:arch=broadwell

place directive controls layout:

bash
#PBS -l place=scatter          # one chunk per node (default)
#PBS -l place=pack             # pack chunks onto fewest nodes
#PBS -l place=excl             # exclusive node access
#PBS -l place=scatter:excl     # one per node, exclusive

Submitting Jobs

bash
# Batch submission
qsub script.sh

# Override directives at submission
qsub -l select=4 -l walltime=2:00:00 script.sh

# Interactive job (drops into shell on allocated node)
qsub -I -l select=1:ncpus=8 -l walltime=1:00:00 -q debug

# Interactive with environment exported
qsub -I -V -l select=1:ncpus=16:mem=32gb -l walltime=2:00:00

Monitoring Jobs

bash
# All your jobs
qstat -u $USER

# All running jobs
qstat -r

# All queued/held jobs
qstat -i

# Full detail for one job
qstat -f 12345

# Finished job details (past ~7 days, if server configured)
qstat -xf 12345

# Estimated start times
qstat -T

# List queues and their limits
qstat -Q

# All node states
pbsnodes -a

Default output file locations (when -o/-e not specified):

  • Stdout: <jobname>.o<jobid> in $PBS_O_WORKDIR
  • Stderr: <jobname>.e<jobid> in $PBS_O_WORKDIR

Watch a running job's output:

bash
tail -f myjob.o12345

Cancelling, Holding, and Modifying Jobs

bash
qdel 12345                    # cancel job
qdel 12345[5]                 # cancel array element 5
qdel -W force 12345           # force delete (if qdel hangs)

qhold 12345                   # place user hold (state → H)
qrls 12345                    # release hold

qalter -l walltime=4:00:00 12345   # extend walltime (if pending)
qalter -l select=8 12345           # change node count (if pending)

Job Arrays

Submit many similar jobs from one qsub. Resources apply to each array element independently.

bash
# In the script:
#PBS -t 1-100            # indices 1..100
#PBS -t 1-50:2           # odd indices 1,3,5,...,49
#PBS -t 1-100%10         # max 10 running simultaneously

Or at submission: qsub -t 1-100 script.sh

Inside the script, use $PBS_ARRAY_INDEX:

bash
INPUT="data/input_${PBS_ARRAY_INDEX}.txt"
mpiexec ./process "$INPUT"

Array management:

bash
qstat -t 12345            # show all elements
qdel 12345[]              # delete entire array
qdel 12345[5]             # delete element 5

Job Dependencies

bash
# Submit job1, capture ID
JOB1=$(qsub stage1.sh)

# Submit job2 to run only if job1 succeeds
qsub -W depend=afterok:$JOB1 stage2.sh

# Common dependency types:
# afterok:<id>     — start if <id> exits with code 0
# afternotok:<id>  — start if <id> exits with non-zero code
# afterany:<id>    — start regardless of <id> outcome
# before:<id>      — <id> starts only after this job begins
# beforeok:<id>    — <id> starts only if this job succeeds

Common Environment Variables (Inside a Job)

VariableValue
$PBS_JOBIDFull job ID (e.g., 12345.server)
$PBS_JOBNAMEJob name
$PBS_O_WORKDIRDirectory where qsub was run
$PBS_O_HOSTHost where qsub was run
$PBS_NODEFILEFile listing allocated nodes (for MPI)
$PBS_NPTotal number of CPUs/tasks
$PBS_NUM_NODESNumber of nodes
$PBS_QUEUEQueue name
$PBS_ARRAY_INDEXArray task index (array jobs only)
$PBS_ARRAY_IDParent array job ID

Using $PBS_NODEFILE with MPI:

bash
mpiexec -hostfile $PBS_NODEFILE -n $PBS_NP ./my_app
# or simply:
mpiexec -n $PBS_NP ./my_app   # if MPI is PBS-aware

Module System

bash
module avail              # list available modules
module spider <pkg>       # search for a package
module load gcc/12 openmpi/4.1
module list               # show loaded modules
module purge              # unload everything

Always load modules inside the job script, not just in your login shell.

Additional Resources

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Pbs AI skill do?

PBS/OpenPBS job scheduler for HPC batch job scheduling. Use when submitting batch or interactive jobs with qsub, monitoring with qstat, deleting with qdel, writing #PBS job scripts, specifying resources with the select/ncpus/ mem/ngpus syntax, setting walltime, working with job arrays (-t flag), setting dependencies with -W depend=, checking job accounting, or troubleshooting jobs on any PBS or OpenPBS cluster.

Why use Pbs on TypingMind?

Because you install it once and use it with any model. Pbs is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Pbs in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/AI-ModCon/genesis-skills/tree/main/skills/hpc-skills/pbs. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Pbs?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Pbs?

As many as you like. As long as a model supports skills, you can use Pbs with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Pbs AI skill free?

Yes. It is published on GitHub by AI-ModCon under the BSD-2-Clause license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇