一键导入
javascript-skill
Execute JavaScript code for calculations, data processing, and JSON manipulation. Full ES6+ support with Node.js runtime.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Execute JavaScript code for calculations, data processing, and JSON manipulation. Full ES6+ support with Node.js runtime.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use this skill to generate well-branded interfaces and assets for OpenCompany (zeenie.ai), either for production or throwaway prototypes/mocks/etc. Contains essential design guidelines, colors, type, fonts, assets, and UI kit components for prototyping.
Launch Android applications by package name. Open any installed app programmatically.
Get list of installed Android applications with package names, versions, and metadata.
Control Android audio - get/set volume, mute/unmute for media, ringtone, notification, and call volumes.
Monitor Android device battery status, level, charging state, temperature, and health.
Control Android Bluetooth - enable, disable, get status, and list paired devices.
| name | javascript-skill |
| description | Execute JavaScript code for calculations, data processing, and JSON manipulation. Full ES6+ support with Node.js runtime. |
| allowed-tools | javascript_executor |
| metadata | {"author":"opencompany","version":"1.0","category":"code"} |
Execute JavaScript code for calculations, data processing, and JSON manipulation.
This skill provides instructions for the JavaScript Executor tool node. Connect the JavaScript Executor node to Zeenie's input-tools handle to enable JavaScript code execution.
Execute JavaScript code and return results.
| Field | Type | Required | Description |
|---|---|---|---|
| code | string | Yes | JavaScript code to execute |
| Feature | Description |
|---|---|
| ES6+ syntax | Arrow functions, destructuring, spread operator |
JSON | JSON.parse() and JSON.stringify() |
Math | Mathematical operations |
Date | Date and time manipulation |
Array methods | map, filter, reduce, sort, etc. |
Object methods | keys, values, entries, assign |
String methods | All standard string methods |
| Variable | Description |
|---|---|
input_data | Data from connected workflow nodes (object) |
output | Set this to return a result |
output variable: Returns structured data to the workflowconsole.log(): Captured as console outputBasic calculation:
{
"code": "const result = 25 * 4 + 10;\nconsole.log(`Result: ${result}`);\noutput = result;"
}
Array processing:
{
"code": "const numbers = input_data.numbers || [1, 2, 3, 4, 5];\nconst total = numbers.reduce((a, b) => a + b, 0);\nconst average = total / numbers.length;\nconsole.log(`Total: ${total}, Average: ${average}`);\noutput = { total, average };"
}
Filter array:
{
"code": "const numbers = input_data.numbers || [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\nconst evens = numbers.filter(n => n % 2 === 0);\nconsole.log(`Even numbers: ${evens}`);\noutput = evens;"
}
Transform data:
{
"code": "const users = input_data.users || [{name: 'John', age: 30}, {name: 'Jane', age: 25}];\nconst names = users.map(u => u.name);\nconsole.log(`Names: ${names.join(', ')}`);\noutput = names;"
}
JSON manipulation:
{
"code": "const data = { name: 'John', age: 30, city: 'NYC' };\nconst json = JSON.stringify(data, null, 2);\nconsole.log(json);\noutput = data;"
}
Object operations:
{
"code": "const obj = { a: 1, b: 2, c: 3 };\nconst keys = Object.keys(obj);\nconst values = Object.values(obj);\nconst sum = values.reduce((a, b) => a + b, 0);\nconsole.log(`Sum of values: ${sum}`);\noutput = { keys, values, sum };"
}
Date operations:
{
"code": "const now = new Date();\nconst tomorrow = new Date(now.getTime() + 24 * 60 * 60 * 1000);\nconst formatted = tomorrow.toISOString().split('T')[0];\nconsole.log(`Tomorrow: ${formatted}`);\noutput = formatted;"
}
Sort array:
{
"code": "const items = input_data.items || ['banana', 'apple', 'cherry'];\nconst sorted = [...items].sort();\nconsole.log(`Sorted: ${sorted}`);\noutput = sorted;"
}
String processing:
{
"code": "const text = 'Hello World, Hello JavaScript';\nconst words = text.split(' ');\nconst unique = [...new Set(words)];\nconsole.log(`Unique words: ${unique}`);\noutput = unique;"
}
Destructuring and spread:
{
"code": "const { name, age } = input_data.user || { name: 'John', age: 30 };\nconst profile = { name, age, active: true };\nconst extended = { ...profile, role: 'admin' };\nconsole.log(JSON.stringify(extended));\noutput = extended;"
}
Success:
{
"success": true,
"result": { "total": 15, "average": 3 },
"output": "Total: 15, Average: 3"
}
Error:
{
"error": "ReferenceError: undefinedVar is not defined"
}
| Use Case | Approach |
|---|---|
| Array manipulation | Use map, filter, reduce |
| JSON processing | Use JSON.parse, JSON.stringify |
| Object operations | Use Object.keys, values, entries |
| String processing | Use split, join, replace |
| Math calculations | Use Math methods |
| Date operations | Use Date object |
| Data transformation | Use spread and destructuring |
output: This returns data to the workflowconsole.log() for debugging: Output is captured and returned|| defaultValue patternDefault values:
const data = input_data.value || 'default';
Null-safe access:
const name = input_data?.user?.name || 'Unknown';
Array to object:
const arr = [{id: 1, name: 'A'}, {id: 2, name: 'B'}];
const obj = Object.fromEntries(arr.map(x => [x.id, x.name]));
input-tools handle