Skip to content
Back to skills

Segment Tree Builder

ASecurity

Generate customized segment tree implementations

  • 1,760 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 2, 2026
ai-agentspythongojavabackend

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 segment-tree-builder --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Segment Tree Builder?

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

Security grade badge for Segment Tree Builder
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/a5c-ai-segment-tree-builder-babysitter/badge)](https://www.skillsdirectory.com/skills/a5c-ai-segment-tree-builder-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: segment-tree-builder
description: Generate customized segment tree implementations
allowed-tools:
  - Read
  - Write
  - Grep
  - Glob
  - Edit
graph:
  domains: [domain:computer-science]
  specializations: [specialization:algorithms-optimization]
  skillAreas: [skill-area:dynamic-programming, skill-area:graph-algorithms]
  roles: [role:backend-engineer, role:computational-scientist]
---

# 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"]
}
```

Files in this skill

  • README.md721 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.

Comments

Loading comments…