cs-algorithms

Installation
SKILL.md

cs-algorithms

Purpose

This skill equips OpenClaw with tools for implementing and analyzing computer science algorithms, focusing on sorting, searching, graph traversals, dynamic programming, greedy approaches, backtracking, and Big-O complexity analysis. Use it to generate code snippets, optimize algorithms, or explain concepts in responses.

When to Use

Apply this skill when handling algorithmic problems in coding tasks, such as optimizing search in large datasets, solving graph problems in networks, or analyzing time complexity in performance-critical applications. Use it for educational responses, code reviews, or when users ask about specific algorithms like BFS for pathfinding.

Key Capabilities

  • Sorting: Implement quicksort, mergesort, or bubblesort with configurable pivots or stability checks.
  • Searching: Binary search, linear search, with options for recursive or iterative variants.
  • Graph Traversals: BFS, DFS, and A* for pathfinding, including handling weighted graphs.
  • Dynamic Programming: Memoization and tabulation for problems like knapsack or longest common subsequence.
  • Greedy and Backtracking: Solve scheduling or subset sum problems with backtracking constraints.
  • Big-O Analysis: Compute and explain time/space complexity, e.g., O(n log n) for mergesort.
  • Additional: Handle edge cases like sorted arrays or disconnected graphs.

Usage Patterns

To use this skill, invoke it via OpenClaw's API or CLI by specifying the algorithm type and inputs. Always pass required parameters like data arrays or graph structures. For example, chain it with other skills by outputting results to variables. Prefix calls with authentication via $OPENCLAW_API_KEY in environment variables. In code, import the skill and call methods directly; in CLI, use subcommands for quick execution.

Related skills
Installs
28
GitHub Stars
5
First Seen
Mar 7, 2026