Skip to content

Coding Agents and NRP Skills

A coding agent such as Claude Code, Codex or OpenCode can take your code to a running Job on Nautilus. It reads your project, writes the manifests and runs kubectl for you. Left to its own habits, it also repeats the mistakes that hurt a shared cluster: it stores code in ConfigMaps, starts hundreds of pods that live a few seconds, or submits a Job whose command never ends. These break the cluster policies and slow the cluster down for everyone.

The NRP maintains a set of agent skills that teach an agent how Nautilus works and what its policies require. Install them before you point an agent at the cluster.

SkillWhat the agent uses it for
nrpNRP’s rules: access, namespaces, resource requests, GPUs, storage, priority classes. The rules that get users banned or slow the cluster come first.
nrp-runTaking your code to a running Job: getting the code and data to the cluster, sizing requests from a test run, packing many small tasks into one Indexed Job, collecting the results and cleaning up.
nrp-llmWriting code that calls the NRP-managed LLMs.
kubernetesGeneral Kubernetes, for people coming from Slurm or PBS.

The skills come with a preflight check, nrp_preflight.py. It reads a manifest or a kubectl command line and reports what NRP policy forbids, without creating anything. The skills tell the agent to run it, then kubectl apply --dry-run=server, before every change to the cluster. It flags these when an agent tries them:

  • code or data in a ConfigMap or Secret: it blocks one above 256 KiB and warns above 113 KiB;
  • more than 400 Jobs at once, or a shell loop that creates one object per iteration. Above 200 pods at once it warns, since many namespaces allow at most 200 pods;
  • a Job whose command never ends, such as sleep infinity or a script that ends in a sleep;
  • containers without CPU and memory requests and limits, or with limits more than 20% above requests;
  • tolerations without a key, tolerations users may not use, and priority classes NRP rejects;
  • CUDA_VISIBLE_DEVICES, GPUs in a Deployment, and oversized pods without a controller;
  • force deletes (kubectl delete --force --grace-period=0), which the policies forbid. The skills tell the agent never to force-delete, and to send you to NRP support when a pod is stuck Terminating.

In Claude Code the check also runs on its own before every kubectl command; see The guard.

Tell it your namespace. An agent that guesses may work in the wrong one.

It acts with your rights. An agent runs kubectl as you: if you can delete a namespace’s Jobs and volumes, so can it. For long or unattended work, or if your account has wide rights, give the agent its own ServiceAccount with a Role limited to what the work needs, and a token that expires. Ask the agent to set one up with you; the nrp skill describes it. A namespace admin has to create the Role.

Read what it applies. Ask it to show you each manifest, and the output of kubectl apply --dry-run=server, before it creates anything.

Keep credentials out of the conversation. Everything in the conversation is sent to the model provider. Put LLM tokens, S3 keys and similar values in a Secret or an environment variable, not in the chat.

Check what it leaves behind. The Jobs you asked for keep running after the agent is done, as they should. What should not stay is what it made for its own use along the way: test pods, a pod it used to copy data in, scratch volumes. Ask it to list what it created, and compare with kubectl get pods,jobs,pvc -n <namespace>. When the work itself is finished, delete its Jobs and the volumes you no longer need, or ask the agent to.

  • kubectl set up for Nautilus, and the name of your namespace. See Getting started.
  • git, and Python 3 on your PATH. The preflight check uses only Python’s standard library (tested on Python 3.9 and 3.14). This page calls it python3; if your Python 3 is called python, use that. The guard in Claude Code tries python3 first, then python.
  • An agent, and a model to drive it: the agent’s own subscription, or the NRP-managed LLMs (see Run the agent on NRP’s models).

The skills ship as the nrp-nautilus plugin of a Claude Code plugin marketplace. In a terminal:

Terminal window
claude plugin marketplace add nrp-nautilus/sdsc-marketplace
claude plugin install nrp-nautilus@sdsc-marketplace

You do not need to clone anything first: nrp-nautilus/sdsc-marketplace is a GitHub repository, and Claude Code clones it into ~/.claude/plugins/marketplaces/ itself, over SSH if you have a key on GitHub and over HTTPS if not.

Start a new session. /skills lists nrp, nrp-run, nrp-llm and kubernetes. Inside a session, /plugin marketplace add and /plugin install do the same.

To get a newer version later:

Terminal window
claude plugin marketplace update sdsc-marketplace

The plugin also installs the guard.

In Claude Code the plugin adds a hook that passes every shell command calling kubectl through the preflight check before it runs. A command that breaks a rule is stopped, and the agent is told why and what to do instead. A warning reaches the agent without stopping the command.

The hook checks commands sent to the kubectl context named nautilus. If yours has another name, set it in your shell profile (several names are separated by commas):

Terminal window
export NRP_PREFLIGHT_CONTEXTS=my-nautilus-context

In any agent, you can run the check yourself, on a manifest or on a command line. The commands below use the clone from the OpenCode tab; Claude Code’s copy is under ~/.claude/plugins/marketplaces/sdsc-marketplace/.

Terminal window
python3 ~/sdsc-marketplace/plugins/nrp-nautilus/skills/nrp/scripts/nrp_preflight.py job.yaml
python3 ~/sdsc-marketplace/plugins/nrp-nautilus/skills/nrp/scripts/nrp_preflight.py --command 'kubectl create configmap code --from-file=src/'

It prints one line per finding and ends with RESULT=ok, RESULT=warn or RESULT=block. The exit code is 2 when something is blocked.

An agent can use the NRP-managed LLMs instead of a commercial subscription. Client configurations has ready-made settings for Claude Code, OpenCode and other coding tools. Agents send long requests in quick succession, so read the fair use policy before you leave one running.

The skills work the same way whichever model drives the agent.

NRP staff maintain the skills at github.com/nrp-nautilus/sdsc-marketplace. If an agent with the skills did something the policies forbid, or the guard stopped something it should have allowed, tell us through Nautilus Support, with the command or manifest involved.

U.S. National Science Foundation

This work was supported in part by National Science Foundation (NSF) awards CNS-1730158, ACI-1540112, ACI-1541349, OAC-1826967, OAC-2112167, CNS-2100237, CNS-2120019.