Skip to content
Back to skills

Garbage Collection

ASecurity

Expert skill for garbage collector design and implementation including various collection algorithms

  • 1,760 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added September 2, 2026
ai-agentsgobashtestingbackend

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned September 2, 2026

npx -y skills add a5c-ai/babysitter --skill garbage-collection --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Garbage Collection?

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

Security grade badge for Garbage Collection
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/a5c-ai-garbage-collection-babysitter/badge)](https://www.skillsdirectory.com/skills/a5c-ai-garbage-collection-babysitter)

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: Garbage Collection
description: Expert skill for garbage collector design and implementation including various collection algorithms
category: Memory Management
allowed-tools:
  - Read
  - Write
  - Edit
  - Glob
  - Grep
  - Bash
graph:
  domains: [domain:software-engineering]
  specializations: [specialization:programming-languages]
  skillAreas: [skill-area:profiling-memory, skill-area:compiler-implementation]
  roles: [role:backend-engineer]
---

# Garbage Collection Skill

## Overview

Expert skill for garbage collector design and implementation including various collection algorithms.

## Capabilities

- Implement mark-sweep collection
- Implement copying/semi-space collectors
- Implement generational collection with write barriers
- Implement concurrent/incremental marking (tri-color)
- Design object header layouts and type info
- Implement precise vs conservative root scanning
- Design card table and remembered set implementations
- Implement finalizers and weak references

## Target Processes

- garbage-collector-implementation.js
- memory-allocator-design.js
- interpreter-implementation.js
- bytecode-vm-implementation.js

## Dependencies

GC Handbook literature (Jones, Hosking, Moss)

## Usage Guidelines

1. **Algorithm Selection**: Start with simple mark-sweep, evolve to generational as needed
2. **Write Barriers**: Design write barriers early if considering generational/concurrent GC
3. **Root Scanning**: Implement precise root scanning for safety
4. **Pause Times**: Measure pause times and optimize for application requirements
5. **Testing**: Build GC stress tests and allocation-heavy benchmarks

## Output Schema

```json
{
  "type": "object",
  "properties": {
    "algorithm": {
      "type": "string",
      "enum": ["mark-sweep", "copying", "mark-compact", "generational", "concurrent"]
    },
    "writeBarrier": {
      "type": "string",
      "enum": ["none", "card-table", "remembered-set", "snapshot-at-beginning", "incremental-update"]
    },
    "rootScanning": {
      "type": "string",
      "enum": ["conservative", "precise"]
    },
    "generatedFiles": {
      "type": "array",
      "items": { "type": "string" }
    }
  }
}
```

Files in this skill

  • README.md905 B
  • SKILL.md2.1 KB

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.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.