JavaScript
knowledge skill
The agent examines a JavaScript snippet and performs the requested operation—debugging, refactoring, or explaining—producing a text artifact that contains either corrected code, a transformed version, or a concise explanation of the code's behavior.
Worked examples
- {"input": {"code": "function add(a,b){return a+b;}", "action": "refactor", "target_version": "ES2020"}, "output": {"result": "const add = (a, b) => a + b;", "issues": []}}
- {"input": {"code": "let x = 10; console.log(y);", "action": "debug", "target_version": "ES2019"}, "output": {"result": "ReferenceError: y is not defined", "issues": ["'y' is referenced before declaration at line 2"]}}
Input
- code: string - JavaScript source to process
- action: string - one of 'debug', 'refactor', 'explain'
- target_version: string - optional ECMAScript version (e.g., 'ES2022')
Output
- result: string - revised code or explanation
- issues: array of strings - identified problems or notes
Details
- Skill type: knowledge skill
- Safety level: safe_public_research
- Version: 1.0.0