# AST Manipulation Skill

Expert skill for abstract syntax tree design, traversal, transformation, and manipulation patterns.

## Quick Reference

- **Category**: Compiler Infrastructure
- **ID**: SK-003

## Key Capabilities

- Typed AST node hierarchy design
- Visitor and transformer pattern implementation
- AST rewriting systems
- AST diffing and patching
- Pretty-printer and formatter generation
- AST serialization (JSON, binary)
- Pattern matching on AST structures
- Span/location tracking systems

## When to Use

Use this skill when implementing:
- AST node type hierarchies
- Code transformation tools
- Source code formatters
- Refactoring engines
- Macro expansion systems

## Related Skills

- parser-generator (SK-002)
- type-theory (SK-004)
- error-messages (SK-014)

## Shared Candidate

This skill is a candidate for extraction to a shared library as it applies to:
- Code Analysis
- Static Analysis
- IDE Development
