Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "gpcam",
"owner": {
"name": "CAMERA — Lawrence Berkeley National Laboratory",
"email": "MarcusNoack@lbl.gov",
"url": "https://gpcam.lbl.gov"
},
"description": "gpCAM Claude Code skills for Gaussian process modeling, Bayesian optimization, and autonomous experiment design.",
"plugins": [
{
"name": "gpcam",
"source": ".",
"description": "Skills that guide an AI assistant through designing autonomous experiments with gpCAM — kernels, acquisition, prior mean, noise, cost, gp2Scale, and multi-task GPs.",
"homepage": "https://gpcam.lbl.gov",
"category": "scientific-computing",
"keywords": ["gaussian-process", "bayesian-optimization", "autonomous-experiments", "gpcam", "scientific-computing"]
}
]
}
13 changes: 13 additions & 0 deletions .claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "gpcam",
"description": "Skills that guide an AI assistant through designing autonomous experiments with gpCAM — custom kernels, acquisition functions, prior means, noise, cost, gp2Scale, and multi-task GPs.",
"author": {
"name": "CAMERA — Lawrence Berkeley National Laboratory",
"email": "MarcusNoack@lbl.gov",
"url": "https://gpcam.lbl.gov"
},
"homepage": "https://gpcam.readthedocs.io",
"repository": "https://github.com/lbl-camera/gpCAM",
"license": "GPL-3.0",
"keywords": ["gaussian-process", "bayesian-optimization", "autonomous-experiments", "gpcam"]
}
21 changes: 19 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,20 @@ for i in range(100):

gpCAM ships with a set of [Claude Code](https://docs.anthropic.com/en/docs/claude-code) skills that guide an AI assistant through designing autonomous experiments — custom kernels, acquisition functions, noise models, and the full ask/tell/train loop. Experimentalists who want smart, autonomous data acquisition without deep knowledge of GP math or the gpCAM API can use these skills to design autonomous experiments.

When you clone this repo, the root `CLAUDE.md` and `skills/` directory are picked up automatically by Claude Code. Available skills:
### Installing the gpCAM marketplace in Claude Code

The repo ships as a Claude Code [plugin marketplace](https://code.claude.com/docs/en/plugin-marketplaces). Inside any Claude Code session, run:

```text
/plugin marketplace add lbl-camera/gpCAM
/plugin install gpcam@gpcam
```

The first command registers this repo as a marketplace; the second installs the `gpcam` plugin from it, which bundles all of the skills below. After install, the skills are available to Claude in any project — no need to clone the repo locally.

To update later, run `/plugin marketplace update gpcam`; to remove, `/plugin uninstall gpcam@gpcam`.

### Available skills

| Skill | Description |
|-------|-------------|
Expand All @@ -55,7 +68,11 @@ When you clone this repo, the root `CLAUDE.md` and `skills/` directory are picke
| **gp2scale-advanced** | Large-scale experiments (>10k points) using sparse kernels and Dask distributed computing. |
| **multi-task-advanced** | Multi-output / function-valued experiments with `fvGPOptimizer`. |

These skills are also compatible with other agentic platforms (e.g. [OpenClaw](https://openclaw.ai), or any harness that can read `SKILL.md` files) — point your assistant at the `skills/` directory.
Once installed, the skills activate automatically when you describe an experiment design problem to Claude, or you can invoke one explicitly (e.g. _"use the experiment-designer skill to set up an adaptive XRD scan"_).

### Other agentic platforms

The skills are also compatible with any harness that reads `SKILL.md` files (e.g. [OpenClaw](https://openclaw.ai)) — clone the repo and point your assistant at the `skills/` directory. When this repo is present in your working directory, Claude Code also picks up the root `CLAUDE.md` and `skills/` directory automatically, so the marketplace install is only needed for use outside the repo.


## Credits
Expand Down
Binary file added docs/source/_static/ai-agent-integration.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
113 changes: 113 additions & 0 deletions docs/source/claude-skills.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
# AI Agent Integration

gpCAM ships with a set of [Claude Code](https://docs.anthropic.com/en/docs/claude-code)
skills that guide an AI assistant through designing autonomous experiments —
custom kernels, acquisition functions, noise and cost models, the full
`ask` / `tell` / `train` loop, and large-scale or multi-task setups.

Experimentalists who want smart, autonomous data acquisition without deep
knowledge of GP math or the gpCAM API can let an AI assistant translate a
plain-English description of their measurement into a working gpCAM script.

## Installing the marketplace in Claude Code

The gpCAM repository is published as a Claude Code
[plugin marketplace](https://code.claude.com/docs/en/plugin-marketplaces).
Inside any Claude Code session, run:

```text
/plugin marketplace add lbl-camera/gpCAM
/plugin install gpcam@gpcam
```

The first command registers this repo as a marketplace and pulls its
`marketplace.json` manifest. The second installs the `gpcam` plugin from
that marketplace — a single plugin that bundles every skill listed below.
Once installed, the skills are available to Claude in any project on your
machine; you do **not** need to clone gpCAM locally.

Useful follow-up commands:

| Command | What it does |
|---|---|
| `/plugin marketplace list` | Show the marketplaces you've added. |
| `/plugin marketplace update gpcam` | Pull the latest skill versions. |
| `/plugin list` | Show installed plugins. |
| `/plugin uninstall gpcam@gpcam` | Remove the plugin. |

## Using the skills

Once the plugin is installed, Claude will activate the appropriate skill
automatically when you describe an experiment-design problem. For example:

> *"I want to map the photoluminescence of a thin film over a 2-inch wafer.
> Each measurement takes 30 seconds, motor moves are slow in the X direction,
> and I have 4 hours of beam time."*

…will trigger the **experiment-designer** skill (and pull in
**cost-functions** for the asymmetric motor cost). You can also invoke a
skill explicitly:

> *"Use the kernel-designer skill to build a periodic + Matérn kernel for
> a temperature-dependent diffraction scan."*

## Available skills

```{list-table}
:header-rows: 1
:widths: 25 75

* - Skill
- Description
* - **experiment-designer**
- End-to-end autonomous experiment design. Translates a scientist's
description of their measurement into a complete, runnable gpCAM script.
* - **kernel-designer**
- Design and compose custom kernel functions that encode domain knowledge
— smoothness, periodicity, symmetry, anisotropy, non-Euclidean inputs.
* - **acquisition-functions**
- Write custom acquisition functions that encode experimental priorities:
exploration vs exploitation, multi-objective targets, constraints,
cost-aware acquisition, UCB / LCB, probability of improvement.
* - **prior-mean-functions**
- Encode known physics or expected trends as prior mean functions, so the
GP regresses against a baseline rather than a flat zero prior.
* - **noise-functions**
- Model position-dependent, heteroscedastic, or count-rate-dependent noise
from detector characteristics.
* - **cost-functions**
- Account for motor travel time, settling, directional costs, sample
damage, beam time, and zone-based penalties.
* - **gp2scale-advanced**
- Large-scale experiments (>10k points up to millions) using sparse,
compactly-supported kernels and Dask distributed computing.
* - **multi-task-advanced**
- Multi-output, vector-valued, or function-valued experiments using
`fvGPOptimizer`.
```

## Using the skills outside Claude Code

The skills are plain Markdown `SKILL.md` files and are compatible with any
agentic harness that can read them — for example
[OpenClaw](https://openclaw.ai). To use them outside Claude Code:

1. Clone the gpCAM repository:

```bash
git clone https://github.com/lbl-camera/gpCAM.git
```

2. Point your assistant at the `skills/` directory at the repo root.

When the cloned repo is present in your working directory, Claude Code
also picks up the root `CLAUDE.md` and `skills/` directory automatically,
so the marketplace install is only needed for use *outside* the repo.

## Source

The marketplace manifest lives at
[`.claude-plugin/marketplace.json`](https://github.com/lbl-camera/gpCAM/blob/main/.claude-plugin/marketplace.json)
and the per-skill content under
[`skills/`](https://github.com/lbl-camera/gpCAM/tree/main/skills).
Contributions and new skills are welcome — open a pull request.
24 changes: 24 additions & 0 deletions docs/source/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,16 @@ examples/GPOptimizer_Optimization.ipynb
```


```{toctree}
---
hidden: true
maxdepth: 1
caption: AI Agent Integration
---
claude-skills.md
```


# gpCAM

```{div} centered-heading
Expand Down Expand Up @@ -106,6 +116,20 @@ Software for the Novice and the Expert

Simple uncertainty quantification and Bayesian optimization problems can be set up in minutes; the options for customization are endless.

````
`````
````` {div} row
```` {div} col w-200
![_static/ai-agent-integration.png](_static/ai-agent-integration.png)
````

```` {div} col
```{div} h3
AI Agent Integration
```

gpCAM ships as a [Claude Code](https://docs.anthropic.com/en/docs/claude-code) plugin marketplace. AI assistants use the bundled skills to translate plain-English experiment descriptions into runnable gpCAM scripts — no GP expertise required. See [AI Agent Integration](claude-skills.md).

````
`````
``````
Expand Down
5 changes: 5 additions & 0 deletions skills/acquisition-functions/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
name: acquisition-functions
description: Use when designing custom acquisition functions for gpCAM that encode experimental priorities — exploration vs exploitation balance, multi-objective targets, constrained search regions, cost-aware moves, UCB/LCB, or probability-of-improvement criteria.
---

# Skill: gpCAM Acquisition Functions

Design custom acquisition functions that control where gpCAM measures next.
Expand Down
5 changes: 5 additions & 0 deletions skills/cost-functions/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
name: cost-functions
description: Use when modeling the real expense of moving between gpCAM measurement points — motor travel time, settling, directional costs, sample damage, beam time, or zone-based penalties.
---

# Skill: gpCAM Cost Functions

Design cost functions that account for the real expense of moving between measurement points — motor travel time, sample damage, beam time, etc.
Expand Down
5 changes: 5 additions & 0 deletions skills/experiment-designer/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
name: experiment-designer
description: Use for end-to-end autonomous experiment design with gpCAM. Translates a scientist's description of their measurement into a complete, runnable gpCAM script — useful for replacing raster scans with adaptive sampling, peak-finding, or parameter optimization.
---

# Skill: gpCAM Experiment Designer

Design complete autonomous experiment scripts using gpCAM. You translate a scientist's description of their measurement into a runnable Python script.
Expand Down
5 changes: 5 additions & 0 deletions skills/gp2scale-advanced/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
name: gp2scale-advanced
description: Use for large-scale gpCAM experiments (>10k points up to millions) using sparse compactly-supported kernels and Dask distributed computing for exact GP computation at scale.
---

# Skill: gp2Scale — Large-Scale GPs

Design experiments with tens of thousands to millions of data points using gpCAM's gp2Scale mode for exact GP computation at scale.
Expand Down
5 changes: 5 additions & 0 deletions skills/kernel-designer/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
name: kernel-designer
description: Use when designing or composing custom kernel (covariance) functions for gpCAM that encode domain knowledge — smoothness, periodicity, symmetry, anisotropy, or non-Euclidean input spaces.
---

# Skill: gpCAM Kernel Designer

Design custom kernel (covariance) functions for gpCAM that encode domain knowledge about the experiment.
Expand Down
5 changes: 5 additions & 0 deletions skills/multi-task-advanced/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
name: multi-task-advanced
description: Use for multi-output, vector-valued, or function-valued gpCAM experiments using fvGPOptimizer — useful when a single measurement returns multiple correlated quantities (e.g., spectra, multi-channel detectors).
---

# Skill: Multi-Task GPs with fvGPOptimizer

Design experiments with vector-valued or function-valued outputs using gpCAM's multi-task GP.
Expand Down
5 changes: 5 additions & 0 deletions skills/noise-functions/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
name: noise-functions
description: Use when modeling position-dependent, heteroscedastic, or otherwise structured noise in gpCAM — e.g., detector characteristics, count-rate-dependent variance, or non-uniform measurement uncertainty.
---

# Skill: gpCAM Noise Functions

Design custom noise models for experiments with non-uniform or structured noise.
Expand Down
5 changes: 5 additions & 0 deletions skills/prior-mean-functions/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
name: prior-mean-functions
description: Use when encoding known physics, theoretical models, or expected trends as prior mean functions for gpCAM — useful when there's a baseline expectation the GP should regress against rather than a flat zero prior.
---

# Skill: gpCAM Prior Mean Functions

Design prior mean functions that encode known physics or expected trends.
Expand Down
Loading