用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/revfactory/claude-code-harness --skill bytecode-vm-design命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Raft 합의 알고리즘 설계 및 구현 가이드. 분산 시스템, 합의 프로토콜, 리더 선출, 로그 복제를 구현할 때 사용한다.
리액티브 스프레드시트 엔진 설계 가이드. 셀 수식 파싱, 의존성 그래프(DAG), 증분 재계산, 내장 함수 구현 시 사용한다.
이벤트 소싱 + CQRS 패턴 설계 가이드. EventStore, Aggregate, Projection, Saga, Snapshot 구현 시 사용한다.
基于 SOC 职业分类
正在显示 SKILL.md
| name | bytecode-vm-design |
| description | 바이트코드 컴파일러 + 스택 VM 설계 가이드. MiniLang을 바이트코드로 컴파일하고 VM에서 실행할 때 사용한다. |
1바이트 opcode + 0~2바이트 오퍼랜드
예: OP_CONST 0x05 → [0x01, 0x05] (2바이트)
OP_ADD → [0x10] (1바이트)
OP_JUMP 0x00FF → [0x20, 0x00, 0xFF] (3바이트)
예: (10 + 3) * 2
OP_CONST 10 stack: [10]
OP_CONST 3 stack: [10, 3]
OP_ADD stack: [13]
OP_CONST 2 stack: [13, 2]
OP_MUL stack: [26]
fn outer() {
let x = 10; // 로컬 변수 (스택)
fn inner() {
return x; // upvalue로 캡처
}
return inner; // outer 종료 후에도 x 접근 가능해야 함
}
// 컴파일 시:
// inner의 upvalue 목록: [{ index: 0, isLocal: true }]
//
// 런타임:
// inner가 생성될 때 outer의 스택 슬롯 0을 가리키는 ObjUpvalue 생성
// outer가 반환될 때 ObjUpvalue를 "close" → 스택에서 힙으로 값 이동
run() {
while (true) {
const op = this.readByte();
switch (op) {
case OP_CONST:
this.push(this.readConstant());
break;
case OP_ADD: {
const b = this.pop();
const a = this.pop();
this.push(a + b);
break;
}
case OP_RETURN: {
const result = this.pop();
this.callFrames.pop();
if (this.callFrames.length === 0) return result;
this.push(result);
break;
}
// ...
}
}
}
// if (cond) { then } else { alt }
compileIf(node) {
this.compile(node.condition);
const jumpToElse = this.emitJump(OP_JUMP_IF_FALSE);
this.emit(OP_POP); // condition 제거
this.compile(node.thenBranch);
const jumpOverElse = this.emitJump(OP_JUMP);
this.patchJump(jumpToElse);
this.emit(OP_POP); // condition 제거
if (node.elseBranch) this.compile(node.elseBranch);
this.patchJump(jumpOverElse);
}