AGENT SKILL
javascript
JavaScript programming language for web development
- License 许可
- MIT
- 最近更新
- 2026-03-01
- Stars
- ★ 3
- Forks
- 2
01 前言 Front Matter
- name
- javascript
- license
- MIT
- metadata
- { "audience": "developers", "category": "programming-languages" }
- description
- JavaScript programming language for web development
- compatibility
- opencode
02 资源文件 17
- 参考文档agents/analyzer.md10.1 KB
- 参考文档agents/comparator.md7.1 KB
- 参考文档agents/grader.md8.8 KB
- 资产文件assets/eval_review.html6.9 KB
- 脚本eval-viewer/generate_review.py16.0 KB
- 参考文档eval-viewer/viewer.html43.9 KB
- 许可证LICENSE.txt11.1 KB
- 参考文档references/schemas.md11.8 KB
- 脚本scripts/__init__.py—
- 脚本scripts/aggregate_benchmark.py14.0 KB
- 脚本scripts/generate_report.py12.5 KB
- 脚本scripts/improve_description.py10.9 KB
- 脚本scripts/package_skill.py4.1 KB
- 脚本scripts/quick_validate.py3.9 KB
- 脚本scripts/run_eval.py11.2 KB
- 脚本scripts/run_loop.py13.3 KB
- 脚本scripts/utils.py1.6 KB
03 SKILL.md 正文
What I do
- Write modern JavaScript (ES6+)
- Handle async operations with promises and async/await
- Use array methods (map, filter, reduce)
- Work with objects and arrays
- Handle DOM manipulation
- Use modules and imports
- Implement error handling
When to use me
When building web applications or server-side code with Node.js.
Variables & Types
// Let and const
const PI = 3.14159;
let count = 0;
// Template literals
const greeting = `Hello, ${name}!`;
// Destructuring
const { name, age } = user;
const [first, second] = array;
// Spread operator
const copy = { ...original, newProp: value };
const merged = [...arr1, ...arr2];
Arrays
const numbers = [1, 2, 3, 4, 5];
// Map, Filter, Reduce
const doubled = numbers.map(n => n * 2);
const evens = numbers.filter(n => n % 2 === 0);
const sum = numbers.reduce((acc, n) => acc + n, 0);
// Find
const found = numbers.find(n => n > 3);
const index = numbers.findIndex(n => n === 3);
// Other methods
numbers.includes(3);
numbers.flatMap(x => [x, x * 2]);
Objects
const user = {
name: 'John',
age: 30,
greet() { return `Hi, I'm ${this.name}`; }
};
// Shorthand
const name = 'John';
const obj = { name };
// Optional chaining
const city = user?.address?.city;
// Nullish coalescing
const value = data ?? 'default';
Async
// Promises
fetch('/api/data')
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));
// Async/await
async function fetchData() {
try {
const res = await fetch('/api/data');
const data = await res.json();
return data;
} catch (err) {
console.error(err);
}
}
// Parallel
const [users, posts] = await Promise.all([
fetch('/api/users').then(r => r.json()),
fetch('/api/posts').then(r => r.json())
]);
Modules
// export.js
export const API_URL = 'https://api.example.com';
export function fetchData() { }
export default class MyClass { }
// import.js
import MyClass, { fetchData, API_URL } from './export.js';
04 同仓库更多 Skills
xamarin
Xamarin cross-platform development
★ 3
wrangling
Data wrangling fundamentals
★ 3
windows
Windows operating system administration and scripting
★ 3
wide-column
Wide-column data model
★ 3
wide-column-stores
Wide-column database stores
★ 3
websockets
WebSocket implementation and best practices
★ 3