
Cs
- 53 installs
- 6 repo stars
- Updated March 13, 2026
- alphaonedev/openclaw-graph
cs is a Claude skill for core computer science theory: analyzing Big O complexity, classifying problems (P/NP/undecidable), and explaining computational fundamentals.
About
This skill handles core computer science theory: theoretical foundations, problem classification, and complexity theory. A developer uses it to verify algorithm efficiency with Big O analysis, classify problems as P, NP, NP-complete, or undecidable, or explain fundamentals like finite state machines. It exposes CLI and API commands for complexity analysis and problem classification.
- Big O time/space complexity analysis of code
- Problem classification: P, NP, NP-complete, undecidable
- Explains CS fundamentals like Turing machines and the halting problem
Cs by the numbers
- 53 all-time installs (skills.sh)
- Ranked #571 of 1,352 Code Review & Quality skills by installs in the Skillselion catalog
- Data as of Jul 28, 2026 (Skillselion catalog sync)
cs capabilities & compatibility
- Capabilities
- complexity analysis · problem classification
- Use cases
- code review · refactoring
What cs says it does
Analyze time and space complexity of code snippets using Big O notation.
Classify problems as P, NP, NP-complete, or undecidable based on input descriptions.
npx skills add https://github.com/alphaonedev/openclaw-graph --skill csAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 53 |
|---|---|
| repo stars | ★ 6 |
| Last updated | March 13, 2026 |
| Repository | alphaonedev/openclaw-graph ↗ |
What it does
Analyze algorithm time/space complexity and classify problems (P, NP, undecidable) during algorithm design or code review.
Who is it for?
Verifying algorithm efficiency and classifying problem hardness during algorithm design or code review.
Skip if: Concrete algorithm or data-structure implementation, which sibling skills cover.
When should I use this skill?
You need to analyze complexity or classify a computational problem's hardness.
What you get
Big O verdicts and problem-class labels (e.g. NP-complete) for a given code snippet or problem.
By the numbers
- Classifies problems across 4 classes: P, NP, NP-complete, undecidable
Files
Purpose
This skill enables OpenClaw to handle core computer science theory, focusing on theoretical foundations (e.g., Turing machines, automata), problem classification (e.g., P vs NP), and complexity theory (e.g., Big O analysis). It provides precise tools for reasoning about algorithms and computational limits.
When to Use
Use this skill when tackling theoretical CS problems, such as verifying algorithm efficiency, classifying problem types (e.g., decidable vs undecidable), or optimizing code based on complexity metrics. Apply it during algorithm design, code reviews, or when debugging performance issues in theoretical contexts.
Key Capabilities
- Analyze time and space complexity of code snippets using Big O notation.
- Classify problems as P, NP, NP-complete, or undecidable based on input descriptions.
- Generate explanations of CS fundamentals, like finite state machines or halting problems.
- Compare algorithm complexities, e.g., via asymptotic analysis.
- Handle edge cases in theory, such as reduction proofs for problem classification.
Usage Patterns
To use this skill, invoke it via OpenClaw's CLI or API. Always provide inputs like code snippets or problem descriptions. For CLI, prefix commands with openclaw cs. For API, use HTTP requests to endpoints like /api/cs/analyze. Set the environment variable $OPENCLAW_API_KEY for authentication before any operation. Example pattern: Load the skill in your script, then call functions with required parameters, handling responses synchronously.
To analyze complexity: 1. Prepare a code snippet as a string. 2. Call the function with flags for output format (e.g., JSON). 3. Parse the response for Big O results.
For problem classification: 1. Describe the problem in a JSON object. 2. Use the classify command with relevant flags. 3. Validate the output against expected categories.
Common Commands/API
- CLI Command:
openclaw cs analyze-complexity --code "def func(arr): for i in arr: print(i)" --output json - Flags:
--codefor input code (required),--outputfor format (e.g., json, text). - Output: JSON like
{"big_o": "O(n)", "description": "Linear time complexity"}. - CLI Command:
openclaw cs classify-problem --description "Determine if a graph has a Hamiltonian path" --detail full - Flags:
--descriptionfor problem text,--detailfor output depth (e.g., full for proofs). - Output: String like "NP-complete, reducible from TSP".
- API Endpoint: POST to
/api/cs/analyzewith body{"code": "def func(...)", "type": "complexity"} - Headers: Include
Authorization: Bearer $OPENCLAW_API_KEY. - Response: JSON object, e.g.,
{"status": "success", "big_o": "O(n^2)"}. - API Endpoint: GET
/api/cs/classify?query=traveling+salesman - Query Params:
queryfor problem description. - Config Format: Use JSON in request body, e.g.,
{"query": "string", "options": {"depth": 1}}.
Code Snippet Example 1 (Python):
import openclaw
openclaw.set_api_key(os.environ['OPENCLAW_API_KEY'])
result = openclaw.cs.analyze_complexity(code="def sum_list(lst): return sum(lst)")
print(result['big_o']) # Outputs: O(n)Code Snippet Example 2 (Python):
import openclaw
response = openclaw.cs.classify_problem(description="Shortest path in weighted graph")
print(response['classification']) # Outputs: e.g., "P, solvable via Dijkstra"Integration Notes
Integrate this skill by importing the OpenClaw library in your code and calling CS-specific modules. For multi-skill workflows, chain outputs (e.g., use classification results in an algorithms skill). Configuration: Store settings in a .openclawrc file with format like {"cs": {"default_output": "json", "api_endpoint": "/api/cs"}}. Ensure $OPENCLAW_API_KEY is set in your environment. For asynchronous use, wrap API calls in try-except blocks and handle retries for rate limits.
Error Handling
Check for errors like invalid inputs (e.g., malformed code) by parsing response codes: HTTP 400 for bad requests, 401 for auth failures. Use OpenClaw's error objects, e.g., in Python: try: result = openclaw.cs.analyze_complexity(...) except openclaw.errors.InvalidInputError as e: print(e.message) # e.g., "Code snippet must be a string". For CLI, errors return as stderr with codes (e.g., exit code 1 for failures). Always validate inputs before calling, and retry on transient errors like network issues with exponential backoff.
Graph Relationships
- Related to: algorithms (for practical implementations), data-structures (for complexity interactions).
- Clusters with: computer-science (as root node), theory (for shared fundamentals).
- Dependencies: Requires core OpenClaw runtime; links to advanced topics like machine-learning for theoretical extensions.
Related skills
FAQ
What does the cs skill analyze?
It analyzes time and space complexity with Big O notation and classifies problems as P, NP, NP-complete, or undecidable.
Does it require authentication?
Its CLI/API examples set the $OPENCLAW_API_KEY environment variable for authentication.