skills/computer-science/cs/SKILL.md
Root CS: theoretical foundations, problem classification, complexity theory
npx skillsauth add alphaonedev/openclaw-graph csInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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.
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.
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:
For problem classification:
openclaw cs analyze-complexity --code "def func(arr): for i in arr: print(i)" --output json
--code for input code (required), --output for format (e.g., json, text).{"big_o": "O(n)", "description": "Linear time complexity"}.openclaw cs classify-problem --description "Determine if a graph has a Hamiltonian path" --detail full
--description for problem text, --detail for output depth (e.g., full for proofs)./api/cs/analyze with body {"code": "def func(...)", "type": "complexity"}
Authorization: Bearer $OPENCLAW_API_KEY.{"status": "success", "big_o": "O(n^2)"}./api/cs/classify?query=traveling+salesman
query for problem description.{"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"
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.
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.
tools
Root web development: project structure, tooling selection, deployment decisions
development
WebAssembly: Rust/Go/C to WASM, wasm-bindgen, Emscripten, WASM Component Model
development
Vue 3: Composition API script setup, Pinia, Vue Router 4, SFCs, Vite, Nuxt 3
tools
Tailwind CSS 4: utility classes, config, JIT, arbitrary values, darkMode, plugins, shadcn/ui