# Sicp

> A Claude skill from grndlvl/software-patterns.

- **Type:** Skill
- **Install:** `agentstack add skill-grndlvl-software-patterns-sicp`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [grndlvl](https://agentstack.voostack.com/s/grndlvl)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [grndlvl](https://github.com/grndlvl)
- **Source:** https://github.com/grndlvl/software-patterns/tree/main/.claude/skills/sicp

## Install

```sh
agentstack add skill-grndlvl-software-patterns-sicp
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Structure and Interpretation of Computer Programs Skill

Reference for fundamental programming concepts from Abelson and Sussman's "Structure and Interpretation of Computer Programs."

## Activation Triggers

Use this skill when discussing:
- Procedural abstraction and higher-order functions
- Data abstraction and representation
- Recursion patterns (tree, tail, mutual)
- State, assignment, and environment model
- Streams and lazy evaluation
- Interpreters and metalinguistic abstraction
- Compilation and register machines

## Quick Reference

### Core Abstractions

| Abstraction | Purpose | Key Concept |
|-------------|---------|-------------|
| Procedural | Hide implementation details | Black-box abstraction |
| Data | Separate use from representation | Constructors/selectors |
| Syntactic | Create new languages | Interpreters/macros |

### Higher-Order Function Patterns

| Pattern | Description | Example |
|---------|-------------|---------|
| Map | Transform each element | `(map square list)` |
| Filter | Select matching elements | `(filter even? list)` |
| Fold/Reduce | Accumulate to single value | `(fold + 0 list)` |
| Compose | Combine functions | `(compose f g)` |

### Recursion Patterns

| Pattern | Characteristics | Space |
|---------|-----------------|-------|
| Linear | Single recursive call | O(n) |
| Tail | Result in recursive call | O(1) |
| Tree | Multiple recursive calls | O(depth) |
| Mutual | Functions call each other | Varies |

### Data Structures

| Structure | Representation | Operations |
|-----------|----------------|------------|
| Pair | cons, car, cdr | Basic building block |
| List | Chain of pairs | Sequence operations |
| Tree | Nested pairs | Hierarchical data |
| Set | List or tree | Union, intersection |

### Evaluation Models

| Model | State | Binding |
|-------|-------|---------|
| Substitution | Stateless | Direct replacement |
| Environment | Stateful | Frame-based lookup |

### Stream Operations

| Operation | Behavior | Evaluation |
|-----------|----------|------------|
| cons-stream | Delay tail | Lazy |
| stream-car | Get first | Immediate |
| stream-cdr | Force tail | On-demand |
| stream-map | Transform lazily | Lazy |
| stream-filter | Select lazily | Lazy |

## Directory Structure

```
sicp/
├── SKILL.md
├── procedures/
│   ├── abstraction.md
│   ├── higher-order-functions.md
│   └── recursion-patterns.md
├── data/
│   ├── data-abstraction.md
│   ├── hierarchical-data.md
│   └── symbolic-data.md
├── modularity/
│   ├── assignment-and-state.md
│   ├── environment-model.md
│   └── streams.md
└── metalinguistic/
    ├── interpreters.md
    ├── lazy-evaluation.md
    └── register-machines.md
```

## Usage Examples

### Designing Abstractions

```
Question: "How should I structure this complex function?"

Consider:
1. Identify primitive operations
2. Build compound procedures - See procedures/abstraction.md
3. Use higher-order functions - See procedures/higher-order-functions.md
4. Choose appropriate recursion - See procedures/recursion-patterns.md
```

### Managing Complexity

```
Question: "How do I handle growing complexity?"

Consider:
- Data abstraction barriers - See data/data-abstraction.md
- Modularity through state - See modularity/assignment-and-state.md
- Lazy evaluation for infinite data - See modularity/streams.md
```

### Building Languages

```
Question: "Should I create a DSL?"

Consider:
- Interpreter design - See metalinguistic/interpreters.md
- Lazy evaluation semantics - See metalinguistic/lazy-evaluation.md
- Compilation strategies - See metalinguistic/register-machines.md
```

---

*Based on concepts from "Structure and Interpretation of Computer Programs" by Harold Abelson and Gerald Jay Sussman.*

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [grndlvl](https://github.com/grndlvl)
- **Source:** [grndlvl/software-patterns](https://github.com/grndlvl/software-patterns)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-grndlvl-software-patterns-sicp
- Seller: https://agentstack.voostack.com/s/grndlvl
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
