Skip to content
Back to skills

Map

ASecurity

Apply operation to each item in Collection

  • 10 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added June 6, 2026
business

Security analysis

A100/100

Scanned June 6, 2026

npx -y skills add bdambrosio/Cognitive_workbench --skill map --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Map?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Map
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/bdambrosio-map/badge)](https://www.skillsdirectory.com/skills/bdambrosio-map)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: map
type: primitive
description: Apply operation to each item in Collection
---

# Map

## INPUT CONTRACT

- `target`: Collection (variable or ID)
- `operation`: Tool/primitive name (string) or dict with `tool` field
- `out`: Variable name
- Additional fields: Tool-specific parameters

**REQUIREMENTS:**
- `target` MUST be Collection
- `operation` MUST be valid tool/primitive name
- Operation applied to each Note in Collection

**NOT SUPPORTED IN MAP:**
- Collection-only primitives: `size`, `union`, `intersection`, `difference`, `join`, `filter-structured`, `sort`, `head`, `flatten`, `split`
- Control flow: `if`, `while`, `wait`
- Discovery/search primitives: `discover-notes`, `discover-collections`, `search-within-collection`
- Persistence: `persist`, `load`, `index`

## OUTPUT

Returns Collection of Notes, each containing result from applying operation. Failed/null results excluded if `filter_null=true` (default).

## FAILURE SEMANTICS

**Empty Collection = expected when:**
- All operations fail or return null
- Type contract violated

**Empty ≠ error** — indicates no successful results, not failure.

**Actual failures:** Invalid target type, unknown operation, or missing parameters.

## REPRESENTATION INVARIANTS

- `map(load)` on search-web results returns empty (results already materialized Notes)
- Empty result from `map(load)` = expected behavior, not diagnostic

## ANTI-PATTERNS

❌ `map(target=$note, operation="refine")` → Must be Collection
❌ `map(target=$results, operation="load")` → search-web results already Notes
❌ `map(target=$coll, operation="split")` → `split` operates on Notes, not Collections
❌ Treating empty result as error → Empty = no successful operations

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…