Skip to content
cccskills
FreePublished on GitHub

segment-tree-builder

Generate segment tree code for range queries and updates using a chosen merge function. Select basic, lazy propagation, persistent, 2D, or other advanced variants, along with an implementation style and supported programming language.

OriginalShow the original description

Generate customized segment tree implementations

a5c-ai/babysitter1,872 stars(GitHub 1,872 + cccskills 0)

Run score Not tested

See how to install

Good for

  • Implementing range queries with custom merge logic
  • Adding range updates with lazy propagation
  • Choosing a persistent or 2D segment tree variant

Files included (2)

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

SKILL.md (original)

Review the instructions the agent will receive before you install.

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

{
  "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

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

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Get implementations and guidance for advanced data structures used in competitive programming and complex algorithm problems. The skill covers balanced trees, persistent structures, tree decompositions, and range-query tools, with usage notes and complexity information.

  • Implementing a treap or splay tree
  • Answering range queries with a wavelet tree
  • Handling dynamic tree operations
a5c-ai/babysitter1.9KUpdated Sep 17, 2026

Use this skill for an independent, evidence-based code review focused on whether an implementation meets its specification. It returns a clear PASS or FAIL verdict with file and line references, using a fresh reviewer for each re-review.

  • Checking whether code meets a specification
  • Running a final cross-unit code review
  • Re-reviewing a change after it failed
a5c-ai/babysitter1.9KUpdated Sep 17, 2026

agent-booster

FreeSummary

Apply supported repetitive code edits with WebAssembly (WASM), a portable runtime, when a code pattern matches. Transforms include modernizing variable declarations, adding types or error handling, and converting Promise chains; unmatched patterns go to a coder fallback.

  • Modernizing repeated variable declarations
  • Adding TypeScript annotations to matching functions
  • Wrapping simple calls in error handling
a5c-ai/babysitter1.9KUpdated Sep 17, 2026

Coordinates long-lived Crew agents and transient Polecat workers by assigning work through hooks, handing tasks between agents, and nudging stalled sessions. It also explains a three-level hook hierarchy and provides commands for listing, feeding, and reviving agents.

  • Assign work to persistent and short-lived agents
  • Hand off tasks between agents and prompt stalled workers
  • Set up shared, role-specific, and rig-specific hooks
a5c-ai/babysitter1.9KUpdated Sep 17, 2026

Turn algorithm execution into visual steps, showing how arrays, trees, graphs, and dynamic programming tables change. Generate formats such as ASCII, SVG, GIF, or HTML to explain concepts, inspect behavior, or support debugging.

  • Explaining sorting or search step by step
  • Showing graph traversal or shortest-path execution
  • Visualizing dynamic programming table changes
a5c-ai/babysitter1.9KUpdated Sep 17, 2026

anti-drift

FreeSummary

Coordinate multi-agent work with short task cycles and regular checkpoints. The skill checks whether agents share consistent state and stay within assigned roles, then scores drift and guides corrections or human escalation when needed.

  • Coordinating agents on related subtasks
  • Keeping high-risk work aligned with its scope
  • Checking shared memory consistency
a5c-ai/babysitter1.9KUpdated Sep 17, 2026

See all skills by a5c-ai

Report a problem with this skill