segment-tree-builder

Generate customized segment tree implementations

509 stars

Best use case

segment-tree-builder is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Generate customized segment tree implementations

Teams using segment-tree-builder should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/segment-tree-builder/SKILL.md --create-dirs "https://raw.githubusercontent.com/a5c-ai/babysitter/main/library/specializations/algorithms-optimization/skills/segment-tree-builder/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/segment-tree-builder/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How segment-tree-builder Compares

Feature / Agentsegment-tree-builderStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Generate customized segment tree implementations

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Segment Tree Builder Skill

## Purpose

Generate customized segment tree implementations for various merge functions, with support for lazy propagation and advanced variants.

## Capabilities

- Generate segment tree for custom merge functions
- Lazy propagation template generation
- Persistent segment tree variants
- 2D segment tree generation
- Segment tree beats for complex updates
- Iterative vs recursive implementations

## Target Processes

- segment-tree-implementation
- range-query-optimization
- data-structure-implementation

## Segment Tree Variants

1. **Basic**: Point update, range query
2. **Lazy Propagation**: Range update, range query
3. **Persistent**: Version history preservation
4. **2D Segment Tree**: 2D range queries
5. **Segment Tree Beats**: Complex range updates (chmin, chmax)
6. **Merge Sort Tree**: Range order statistics

## Input Schema

```json
{
  "type": "object",
  "properties": {
    "mergeFunction": { "type": "string" },
    "identity": { "type": "string" },
    "updateType": {
      "type": "string",
      "enum": ["point", "range", "both"]
    },
    "lazyPropagation": { "type": "boolean" },
    "variant": {
      "type": "string",
      "enum": ["basic", "lazy", "persistent", "2d", "beats"]
    },
    "language": {
      "type": "string",
      "enum": ["cpp", "python", "java"]
    },
    "style": {
      "type": "string",
      "enum": ["recursive", "iterative"]
    }
  },
  "required": ["mergeFunction", "identity"]
}
```

## Output Schema

```json
{
  "type": "object",
  "properties": {
    "success": { "type": "boolean" },
    "code": { "type": "string" },
    "complexity": { "type": "object" },
    "usage": { "type": "string" }
  },
  "required": ["success", "code"]
}
```

Related Skills

process-builder

509
from a5c-ai/babysitter

Scaffold new babysitter process definitions following SDK patterns, proper structure, and best practices. Guides the 3-phase workflow from research to implementation.

Workflow & Productivity

developer-portal-builder

509
from a5c-ai/babysitter

Build unified developer portals with Backstage or custom frameworks

cli-framework-builder

509
from a5c-ai/babysitter

Build command-line interfaces for SDK interaction

Object Detection/Segmentation Skill

509
from a5c-ai/babysitter

Deep learning based object detection and segmentation for robotics applications

Tree-sitter

509
from a5c-ai/babysitter

Expert skill for creating tree-sitter grammars for incremental parsing and syntax highlighting

probuilder

509
from a5c-ai/babysitter

Unity ProBuilder skill for level prototyping.

behavior-trees

509
from a5c-ai/babysitter

Behavior tree design and implementation skill for game AI. Enables creation of behavior tree structures, custom nodes, decorators, composites, and integration with game engines for NPC and enemy AI systems.

protocol-builder

509
from a5c-ai/babysitter

Skill for building standardized research protocols

interactive-dashboard-builder

509
from a5c-ai/babysitter

Skill for building interactive data dashboards

qiskit-circuit-builder

509
from a5c-ai/babysitter

IBM Qiskit integration skill for quantum circuit construction, transpilation, and execution on IBM Quantum hardware

qec-code-builder

509
from a5c-ai/babysitter

Quantum error correction code implementation skill for fault-tolerant quantum computing

cirq-circuit-builder

509
from a5c-ai/babysitter

Google Cirq integration skill for quantum circuit design and execution on Google quantum processors