Install
$ agentstack add skill-jimmc414-claude-code-plugin-marketplace-use-comprehension-chain ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
use-comprehension-chain
When to Use
- Transforming sequences (map)
- Filtering sequences
- Building dicts or sets from data
- Combining filter + map
- Creating lookup tables
When NOT to Use
- Complex logic that needs multiple statements
- Side effects needed during iteration
- Code would be unreadable as one-liner
The Pattern
Use comprehensions for concise, readable data transformation.
# List comprehension: map + filter
squares = [x**2 for x in range(10)]
evens = [x for x in numbers if x % 2 == 0]
even_squares = [x**2 for x in numbers if x % 2 == 0]
# Dict comprehension: build lookup tables
word_lengths = {word: len(word) for word in words}
index = {item: i for i, item in enumerate(items)}
inverted = {v: k for k, v in original.items()}
# Set comprehension: unique values
unique_lengths = {len(word) for word in words}
# Nested comprehension: flatten or cross product
flat = [x for row in matrix for x in row]
pairs = [(x, y) for x in xs for y in ys]
# Conditional expression in comprehension
signs = ['pos' if x > 0 else 'neg' if x 1]
Key Principles
- One line, one transformation: Keep it readable
- Left to right:
[expr for var in seq if cond] - Nested = flatten: Inner loop varies fastest
- Dict for lookups: O(1) access pattern
- Set for uniqueness: Auto-deduplicate
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: jimmc414
- Source: jimmc414/claude-code-plugin-marketplace
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.