Skip to content
Agentmart
Submit a tool

foolbox

Foolbox operating guidance for wrapping vision models, running adversarial attacks, measuring clean and robust accuracy, handling NumPy/PyTorch/TensorFlow/JAX…

Skill by VectorSpaceLab

IndexedMIT★ 341
Write a review

Chalk Labs

Need help deploying foolbox?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/vectorspacelab-foolbox

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Foolbox operating guidance for wrapping vision models, running adversarial attacks, measuring clean and robust accuracy, handling NumPy/PyTorch/TensorFlow/JAX backends, and loading Foolbox-compatible model-zoo repositories.

Use cases: ml

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Python package

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/foolbox

What's inside

Skill name
foolbox
Description
Foolbox operating guidance for wrapping vision models, running adversarial attacks, measuring clean and robust accuracy, handling NumPy/PyTorch/TensorFlow/JAX backends, and loading Foolbox-compatible model-zoo repositories.
License
MIT
Metadata
disco-role: operating
Instructions
108 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts

Files (24)

  • SKILL.md
  • api-reference.md · references/
  • repo-provenance.md · references/
  • repo-routing-metadata.json · references/
  • troubleshooting.md · references/
  • check_optional_frameworks.py · scripts/
  • smoke.py · scripts/
  • SKILL.md · sub-skills/attacks/
  • api-reference.md · sub-skills/attacks/references/
  • attack-authoring.md · sub-skills/attacks/references/
  • attack-overview.md · sub-skills/attacks/references/
  • troubleshooting.md · sub-skills/attacks/references/
  • workflows.md · sub-skills/attacks/references/
  • smoke_attacks.py · sub-skills/attacks/scripts/
  • SKILL.md · sub-skills/models/
  • api-reference.md · sub-skills/models/references/
  • troubleshooting.md · sub-skills/models/references/
  • workflows.md · sub-skills/models/references/
  • smoke_models.py · sub-skills/models/scripts/
  • SKILL.md · sub-skills/zoo/
  • api-reference.md · sub-skills/zoo/references/
  • troubleshooting.md · sub-skills/zoo/references/
  • workflows.md · sub-skills/zoo/references/
  • check_local_zoo_model.py · sub-skills/zoo/scripts/

SKILL.md (first lines)

# Foolbox

Foolbox 3.3.4 is an EagerPy-based library for generating and evaluating
adversarial examples against image classifiers. Use this skill when a task
mentions Foolbox, `foolbox`, adversarial examples, robust accuracy, attack
budgets, `LinfPGD`/FGSM/DeepFool/BoundaryAttack, model wrappers, or Foolbox
model-zoo repositories.

## Command, cache, and output paths

The commands in this skill use the generated skill root, not the native Foolbox
checkout and not the caller's current directory. From any cwd, set the root to
the directory containing this `SKILL.md` and change into it before running a
command that uses a relative skill path:

```bash
# Replace this non-executable placeholder with the absolute directory containing this SKILL.md.
export SKILL_ROOT=/path/to/installed/skills/disco/foolbox
cd "$SKILL_ROOT"
```

Use the actual installed skill-root path if it differs from the example above.
The root `scripts/` and `sub-skills/` paths below are relative to `SKILL_ROOT`;
an absolute path such as `python "$SKILL_ROOT/scripts/smoke.py"` is equivalent.
Write generated plots and other artifacts only to an explicit absolute path or
to a dedicated directory such as `"$SKILL_ROOT/outputs/"` (create it first);
do not rely on an unspecified cwd and do not write into the native checkout or
the skill's source/reference assets. Foolbox model-zoo clones and downloaded
weights use Foolbox's own cache (typically under `~/.foolbox_zoo`), not these
relative paths; inspect the exact returned path and never delete the whole cache
as cleanup.

Cloning a zoo repository or downloading/extracting weights is a networked,
potentially untrusted external-state operation. Obtain explicit approval before
calling `zoo.get_model(...)` or `zoo.fetch_weights(...)`, even when a cache entry
may already exist. The local zoo checker and bundled sample assets are the
offline alternatives.

## Install and verify

Install the package and the small helper dependencies only with the environment's
package-install/network approval; otherwise use an existing environment:

```bash
cd "$SKILL_ROOT"
python -m pip install foolbox pillow matplotlib
python -c "import foolbox as fb; print(fb.__version__)"
```

PyTorch, TensorFlow, and JAX are deliberately not base dependencies. Install
one separately using its own supported wheel/build when the selected model or
gradient attack needs it. Run the bundled CPU-native check before a larger
workflow:

```bash
cd "$SKILL_ROOT"
python scripts/smoke.py --help
python scripts/smoke.py
```

Read [`references/api-reference.md`](references/api-reference.md) for the
verified public signatures and output-shape rules. Read
[`references/troubleshooting.md`](references/troubleshooting.md) when imports,
bounds, preprocessing, optional frameworks, or attack outputs fail.

## Route by task

- **Wrap a model, prepare sample images, transform bounds, compute accuracy, or
  plot results:** read [`sub-skills/models/SKILL.md`](sub-skills/models/SKILL.md).
- **Choose or run attacks, compare robust accuracy, use criteria/distances,
  compose EOT or DatasetAttack, or author a new attack:** read
  [`sub-skills/attacks/SKILL.md`](sub-skills/attacks/SKILL.md).
- **Load a local/remote Foolbox model repository or fetch weights:** read
  [`sub-skills/zoo/SKILL.md`](sub-skills/zoo/SKILL.md).

## Core execution contract

1. Make the model callable through the matching Foolbox wrapper and state its
   input bounds before attacking. Include preprocessing and data format when
   they are not already native to the model.
2. Keep images and labels batched. Labels are a 1-D integer tensor aligned with
   the first dimension of model outputs.
3. Choose an untargeted label criterion (`labels` passed directly) or an
   explicit `TargetedMisclassification(target_classes)` criterion.
4. Call an attack with `epsilons=<float>`, `epsilons=<sequence>`, or `None` only
   when that attack supports minimization without a fixed budget.
5. Interpret `(raw, clipped, success)`: clipped results obey the requested
   distance budget; `success` is a boolean mask of actual adversarial examples.
   For a sequence of epsilons, raw/clipped are lists and success has shape
   `(K, N)`; for one scalar, outputs are tensors and success has shape `(N,)`.
6. Report clean accuracy, attack family, distance, epsilon(s), backend, and
   robust accuracy (`1 - success.float32().mean(axis=-1)`) together.

## Scope and limitations

The CPU/NumPy route and black-box/noise attacks are covered by the local smoke
and native verification plan. Framework gradient attacks, EOT over stochastic
models, and pretrained example models remain backend- and often network-
dependent; do not claim them verified merely because `import foolbox` works.
The model-zoo route can clone repositories or download weights and must be
explicitly approved before network or external-state operations.

## Provenance

Before using version-sensitive behavior or refreshing this skill, read
[`references/repo-provenance.md`](references/repo-provenance.md).

From VectorSpaceLab/AREX-Skill, MIT.

More from VectorSpaceLab/AREX-Skill

Signals

Stars
341
Forks
26
Open issues
0
Last commit (this folder)
Aug 26, 2026 (2 months ago)
Last release
Sep 2, 2026 (2 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from VectorSpaceLab

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get foolbox running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying foolbox?

CallGet help
Cite this page

foolbox skill. Agent Mart. https://agentmart.dev/skills/vectorspacelab-foolbox (last updated 2026-10-24)