test-map-with-args_skill

This skill helps validate map operations with additional argument handling by summarizing test documents using focus and max_length, ensuring correct outputs.
  • Python

9

GitHub Stars

2

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill bdambrosio/cognitive_workbench --skill test-map-with-args

  • plan.json1.5 KB
  • SKILL.md324 B

Overview

This skill tests the map primitive by applying a summarize operation with additional operation arguments. It creates two short test documents, runs map(summarize) with focus and max_length set, and verifies that two focused summaries are produced. The skill demonstrates how operation arguments are passed through the mapping step and validated.

How this skill works

The test constructs two simple documents and invokes the map primitive using the summarize operation. Operation-specific arguments (focus="AI" and max_length) are supplied so each mapped call receives them. The test then checks that the map returned exactly two summary outputs and that they respect the provided arguments.

When to use it

  • When validating that map correctly forwards operation arguments to each invocation.
  • When adding or changing summarize-related parameters and needing automated regression checks.
  • When building CI tests for primitives that must behave consistently across inputs.
  • When demonstrating how per-call options like focus and max_length affect mapped results.

Best practices

  • Use small, deterministic test documents so failures are easy to inspect.
  • Explicitly assert both count and key properties (e.g., presence of summaries and approximate length).
  • Keep operation arguments explicit and minimal to isolate behavior under test.
  • Seed or mock randomness in models if outputs need exact matching in CI.
  • Run tests in continuous integration to catch regressions when primitives change.

Example use cases

  • Unit test ensuring map(summarize) forwards focus and max_length to each summarize call.
  • Regression test added when modifying the summarize operation signature or defaults.
  • Developer example showing how to write tests for primitives that accept extra args.
  • Quick check to confirm summaries emphasize a particular topic (focus="AI").

FAQ

It instructs the summarize operation to emphasize the topic 'AI' when producing each summary, used here to confirm argument forwarding.

Why are there exactly two summaries?

The test creates two source documents and maps the summarize operation over them, so one summary per document is expected.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
test-map-with-args skill by bdambrosio/cognitive_workbench | VeilStrat