スキル一覧に戻る
pluginagentmarketplace

fundamentals

by pluginagentmarketplace

JavaScript Development Plugin

1🍴 0📅 2026年1月7日
GitHubで見るManusで実行

SKILL.md


name: fundamentals description: Core JavaScript fundamentals including variables, data types, operators, control flow, and basic syntax. Essential foundation for all JavaScript development. sasmp_version: "1.3.0" bonded_agent: 01-javascript-fundamentals bond_type: PRIMARY_BOND

Production-Grade Configuration

skill_type: reference response_format: code_first max_tokens: 1500

parameter_validation: required: [topic] optional: [depth, examples]

retry_logic: on_ambiguity: ask_clarification fallback: provide_basics_first

observability: entry_log: "Fundamentals skill activated" exit_log: "Fundamentals reference provided"

JavaScript Fundamentals Skill

Quick Reference Card

Variable Declaration

const PI = 3.14159;     // Immutable binding (preferred)
let count = 0;          // Reassignable
var legacy = "avoid";   // Function-scoped (avoid)

8 Data Types

TypeExampletypeof
String"hello""string"
Number42, 3.14, NaN"number"
Booleantrue, false"boolean"
Nullnull"object"
Undefinedundefined"undefined"
SymbolSymbol('id')"symbol"
BigInt9007199254740991n"bigint"
Object{}, [], fn"object"

Operators Cheat Sheet

// Arithmetic
+ - * / % **

// Comparison (always use strict)
=== !== > < >= <=

// Logical
&& || !

// Nullish
?? ?.

// Assignment
= += -= *= /= ??= ||= &&=

Control Flow Patterns

// Early return (preferred)
function validate(input) {
  if (!input) return { error: 'Required' };
  if (input.length < 3) return { error: 'Too short' };
  return { valid: true };
}

// Switch with exhaustive handling
function getColor(status) {
  switch (status) {
    case 'success': return 'green';
    case 'warning': return 'yellow';
    case 'error': return 'red';
    default: return 'gray';
  }
}

Type Coercion Rules

// Explicit conversion (preferred)
Number('42')     // 42
String(42)       // "42"
Boolean(1)       // true

// Truthy values: non-zero numbers, non-empty strings, objects
// Falsy values: 0, "", null, undefined, NaN, false

Modern Operators

// Nullish coalescing
const name = input ?? 'Guest';     // Only null/undefined

// Optional chaining
const city = user?.address?.city;  // Safe navigation

// Logical assignment
config.debug ??= false;            // Assign if nullish

Troubleshooting

Common Issues

ErrorCauseFix
ReferenceError: x is not definedVariable not declaredCheck spelling, scope
TypeError: Cannot read propertyAccessing null/undefinedUse optional chaining ?.
NaN resultInvalid number operationValidate input types
Unexpected true/falseLoose equality ==Use strict ===

Debug Checklist

// 1. Check type
console.log(typeof variable);

// 2. Check value
console.log(JSON.stringify(variable));

// 3. Check for null/undefined
console.log(variable === null, variable === undefined);

// 4. Use debugger
debugger;

Production Patterns

Input Validation

function processNumber(value) {
  if (typeof value !== 'number' || Number.isNaN(value)) {
    throw new TypeError('Expected a valid number');
  }
  return value * 2;
}

Safe Property Access

const city = user?.address?.city ?? 'Unknown';
const callback = options.onComplete?.();
  • Agent 01: JavaScript Fundamentals (detailed learning)
  • Skill: functions: Function patterns
  • Skill: data-structures: Objects and arrays

スコア

総合スコア

60/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です