Hours back
Fetching, stacking, cropping, plate solving and logging run on their own while you look at results.
Agent skills for PixInsight and Nebulis
Ask your coding agent to process a target. It fetches the subs from Nebulis, runs PixInsight for you and stops at every stage with numbers and a preview. You make the calls; it does the clicks.
AI-assisted, not AI-processed. The language model never touches your image: it measures, proposes and waits for your go. Every operation runs in PixInsight, as a PixInsight process or a plug-in installed in it, and is saved as process icons you can reload.
Nebulis 2.2.0 connected. Sh2-105 has 9 nights: 7 with D1, 2 with D2, 180 s, gain 200. That is the narrowband path. Process all 9 nights?
Sub review: 962 of 1,000 subs kept; the night of 09-12 lost 31 subs to clouds. On 09-08, 4 subs are graded fair: soft stars, FWHM 3.4 px against 2.6. Keep or reject them?
Done in Nebulis. Calibration plan: 0 errors, 1 warning. The D2 flats are 3 days from the D2 nights, same filter. Was the rotator angle unchanged during the campaign?
WBPP finished: D1 master 38.4 h, D2 master 9.5 h, both 3-channel. Next, crop, BXT correction and plate solve: astrometry 0.08 px, pass. Then the gradient: proposal and preview below.
Three stretch candidates side by side. s3 clips 0.14 % of pixels to white, above the 0.1 % gate: rejected. s1 or s2?
Foraxx kept. Exported final/Sh2-105_Foraxx_2026-11-06 as .xisf, .tif and .jpg, and wrote PROCESSING.md, the documentation page, the session report and 14 process icons. Store them with Sh2-105 in Nebulis?
Stored in Nebulis under Project archives. The final image is open in PixInsight; every other view of this session is closed.
Example session, shortened. Numbers are illustrative.
Why use it
Fetching, stacking, cropping, plate solving and logging run on their own while you look at results.
Each stage ends with a proposal and a preview. Nothing is applied until you say yes or give another value.
Nine measured quality gates, from astrometry to clipped pixels. A failed gate stops the stage and says why.
Every proposal comes with its measurement and its reason, so you see why a value was chosen, not just the result.
Inputs are read-only, a checkpoint precedes every destructive step, and one command undoes it.
A documentation page, a session report of every decision, the PixInsight project description and process icons with the values actually applied. AstroBin fields and a Reddit post for r/astrophotography on request.
How it works
Every stage follows the same three beats, from sub review to the final export.
In plain words: “process Sh2-105”, “continue”, “denoise 0.4”.
Measured values, options with their pros and cons, a recommendation with its reason, and a preview.
Yes, another value, or reject. Then the next stage.
MeasuredStarless Ha, OIII, SII. Background MAD 0.0011 / 0.0018 / 0.0016.
Optionss1, median 0.12: cleanest background, but OIII stays faint. s2, 0.18: OIII shows and noise stays low. s3, 0.25: most faint detail, but the core clips.
Recommendations2. The same median per channel balances Ha and OIII before the palette, and it passes G7.
Gate G7: s3 clips 0.14 % of pixels to white, above 0.1 %, rejected.
> s1 or s2?
Illustrative values.
Say “continue Sh2-105”: the agent reads its session file and resumes at the first stage not done.
Say “run stacking without asking”: that stage no longer waits, for this session only.
“Which subs were bad last night on NGC 6888?” or “fetch Sh2-112 for stacking” use only the nebulis skill.
Answer a proposal with another value (“denoise 0.4”); the agent keeps it for the rest of the session and logs it.
D1 and D2 masters split into Ha, OIII and SII; the two OIII combined with noise weights; HOO, SHO and a Foraxx-style dynamic palette.
Unfiltered data goes through SPFC, MGC when MARS covers the field, and SPCC with your camera's curves.
Flats valid for a campaign while the train and rotator angle stay put, D1 never with D2, a reusable dark library, bias for flats.
rig.json is read from the FITS headers and your Nebulis telescope and site: optics, camera, filters, every night. You are asked only for what none of them holds.
One prompt, on the computer that runs PixInsight
Paste this prompt into Claude Code, or any coding agent, on the computer that runs PixInsight (macOS, Windows or Linux). It installs everything and asks you only for your Nebulis address.
Install astroagent (https://github.com/jjmartres/astroagent) on this computer, the one that runs PixInsight.
1. PixInsight connector: `npm install -g pixinsight-connector@2.5.2`, then `claude mcp add -s user pixinsight -- pixinsight-connector`, and check it with `pixinsight-connector doctor`.
2. Skills: `claude plugin marketplace add https://github.com/jjmartres/astroagent.git#latest`, then `claude plugin install astroagent@astroagent`. If you are not Claude Code, clone the repository at the `latest` tag and run its `install.sh` instead.
3. Nebulis: ask me for my server address, as I open it in a browser. Write `~/.config/astroagent/env` with `ASTROAGENT_NEBULIS_URL=<that address>` and `ASTROAGENT_NEBULIS_API_KEY=paste-your-key-here`, readable by me only (`chmod 600` on macOS and Linux). Do not ask for the key in this chat: tell me to paste it into that file myself, from Nebulis, Settings → Account → API keys → New key (admin, to record reviews and upload results).
4. Once I have pasted the key, run the `status` command of the nebulis skill's `nebulis.py`, tell me what failed if anything, and remind me to restart the agent.Your API key never goes through the chat: you paste it into the file yourself.
npm install -g pixinsight-connector@2.5.2
claude mcp add -s user pixinsight -- pixinsight-connector
pixinsight-connector doctorclaude plugin marketplace add https://github.com/jjmartres/astroagent.git#latest
claude plugin install astroagent@astroagentOther agents, or without plugins:
git clone --branch latest https://github.com/jjmartres/astroagent ~/Repositories/astroagent
~/Repositories/astroagent/install.shSet ASTROAGENT_NEBULIS_URL (your server) and ASTROAGENT_NEBULIS_API_KEY (Nebulis, Settings → Account → API keys → New key; admin to record reviews and upload results). Pick one way; environment variables win over the file.
export ASTROAGENT_NEBULIS_URL=http://your-server:3001
export ASTROAGENT_NEBULIS_API_KEY=neb-...set -gx ASTROAGENT_NEBULIS_URL http://your-server:3001
set -gx ASTROAGENT_NEBULIS_API_KEY neb-...mkdir -p ~/.config/astroagent
printf '%s\n' 'ASTROAGENT_NEBULIS_URL=http://your-server:3001' 'ASTROAGENT_NEBULIS_API_KEY=neb-...' > ~/.config/astroagent/env
chmod 600 ~/.config/astroagent/envastroagent does not need it. The Nebulis Connector script brings your library into PixInsight: browse objects, download a night or matching calibration, store projects with the object.
http://<your-server>:<port>/plugins/pixinsight/ (keep the trailing slash).Real runs
Two from my own backyard in the French Alps, one broadband and one dual-band, and two from Telescope.live remote data. Every stage was measured, proposed, approved and run in PixInsight; the figures come from the processing logs. Tokens count everything the agent read and wrote over the session, about 99 % of it re-read from the prompt cache.


Telescope.live data
Telescope.live data