Token导航 LogoToken导航TokenDH.com
待分类操作浏览器github未标认证来源可访问许可证需确认审计异常

contextcontext 搜索

Agent Skill

context 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

275

周安装

11

GitHub Stars

37

下载量

89
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:context(context 搜索)
来源仓库:https://github.com/simhacker/moollm
仓库路径:skills/context
安装命令:
npx skills add https://github.com/simhacker/moollm --skill context
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/simhacker/moollm --skill context

简介

context用于处理GitHub仓库、Issue、Pull Request和代码协作信息。

  • 它适合围绕仓库状态、代码变更或协作事项进行整理,提升开发流程透明度。
  • 可通过npx skills add命令从GitHub仓库安装,具体用法需结合原始README进一步确认。
  • 安装前请核实权限范围、维护状态及是否涉及联网或文件操作。
  • context 属于待分类类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Context

*"The context IS the world as seen from inside the closure."* — Dave Ungar, on lexical scope

What Is It?

The world object is passed to every compiled closure. It provides:

  1. Standard keys — Always present (adventure, player, room, turn)
  2. Extended keys — Contextual (object, target, npc)
  3. Skill namespaces — Skills register state under world.skills.skill_name
  4. Utility functions — API for interacting with the world

Why "world" not "ctx"?

  • More evocative — closures see the WORLD
  • Self-documenting — world.player, world.room
  • Matches the mental model

Standard Keys

Always present in every world:

world.turn           // Current simulation turn
world.timestamp      // ISO timestamp

world.adventure      // Root adventure state
  .name
  .flags             // Global boolean flags
  .world_state       // Global key/value state

world.player         // Current player
  .id
  .name
  .location          // Path to current room
  .inventory         // Array of item ids
  .buffs             // Active buffs

world.room           // Current room
  .id
  .name
  .path
  .exits
  .objects
  .is_dark
  .is_dangerous

world.party          // Party state
  .members
  .leader

Extended Keys

Present when relevant:

// When running object simulate/methods:
world.object         // The object being simulated
  .id
  .state             // Object's mutable state
  // Methods are bound: world.consume_fuel(1)

// When action targets something:
world.target         // The target
  .id
  .type              // "object", "character", "room"

// When NPC is simulating:
world.npc            // The NPC
  .id
  .goals
  .state

Skill State Namespaces

Skills register state under world.skills.<skill_name> using underscores:

// Skill "economy" → world.skills.economy
world.skills.economy.gold        // 100

// Skill "pie-menu" → world.skills.pie_menu (underscore!)
world.skills.pie_menu.last_selection  // "north"

// Skill "time" → world.skills.time
world.skills.time.hour           // 14
world.skills.time.phase          // "afternoon"

Why underscores? Dashes aren't valid JS/Python identifiers. foo-bar skill → foo_bar namespace.

This keeps skill state organized and avoids collisions.


Utility Functions

Methods bound to world for interaction:

Narrative

world.emit("The lamp dies!")              // Show message
world.narrate("Darkness falls.", "dramatic")

Events

world.trigger_event("GRUE_APPROACHES", { room: world.room.path })

Inventory

world.has("brass-key")                    // true/false
world.give("gold-coins")                  // Add to inventory
world.take("used-potion")                 // Remove from inventory

Flags

world.flag("dragon_slain")                // Get flag
world.set_flag("treasure_found", true)    // Set flag

State

world.get("object.state.fuel")            // Get by path
world.set("object.state.lit", true)       // Set by path

Navigation

world.go("../maze/room-a/")               // Move player
world.can_go("north")                     // Check exit

Buffs

world.add_buff({ name: "Caffeinated", effect: { energy: +2 }, duration: 5 })
world.remove_buff("caffeinated")
world.has_buff("grue_immunity")

Logging

world.log("Debug: fuel = " + world.object.state.fuel)

Example: Lamp Simulate

simulate_js: (world) => {
  if (world.object.state.lit) {
    world.consume_fuel(1);                  // Call object method

    if (world.object.state.fuel <= 0) {
      world.extinguish();                   // Call object method
      world.emit("The lamp sputters and dies!");

      if (world.room.is_dark && world.room.is_dangerous) {
        world.trigger_event("GRUE_APPROACHES");
      }
    }
  }
}

Example: Guard Expression

guard: "player has the key AND room is not dark"
guard_js: (world) => world.has("brass-key") && !world.room.is_dark

Example: Score Calculation

score_if: "player is tired OR room is dark"
score_if_js: (world) => world.has_buff("tired") || world.room.is_dark

Example: Skill State

# Skill "economy" needs to check gold
guard: "player has at least 10 gold"
guard_js: (world) => world.skills.economy.gold >= 10

# Skill "pie-menu" checks last selection
score_if: "last pie menu selection was north"
score_if_js: (world) => world.skills.pie_menu.last_selection === "north"

Design Principles

Structured, Not Arbitrary

world is NOT just a bag of key/values. It has defined structure:

  • Standard keys are always present
  • Extended keys appear in context
  • Skills namespace their state (with underscores!)
  • Functions are bound methods

Skill Namespaces (Underscores!)

Skills don't pollute root world. They register under world.skills.skill_name:

// Skill "economy" → world.skills.economy
world.skills.economy.gold
world.skills.economy.currency

// Skill "pie-menu" → world.skills.pie_menu (underscore!)
world.skills.pie_menu.last_selection
world.skills.pie_menu.hover_direction

// Skill "foo-bar" → world.skills.foo_bar
world.skills.foo_bar.some_state

Rule: skill-name with dashes → skill_name with underscores in namespace.

Methods Are Bound

Object methods appear as functions on world:

// Object defines:
methods:
  consume_fuel: "reduce fuel by amount"

// At runtime, method is bound:
world.consume_fuel(1)  // Works!

Related Skills

  • object — Provides ctx.object
  • room — Provides ctx.room
  • adventure — Provides ctx.adventure
  • buff — Used by ctx.add_buff/has_buff

Dual Runtime: Python + JavaScript

CRITICAL: We always generate BOTH _js AND _py versions of compiled expressions.

# Natural language
guard: "player has the key AND room is not dark"

# BOTH generated:
guard_js: (world) => world.has("brass-key") && !world.room.is_dark
guard_py: lambda world: world.has("brass-key") and not world.room.is_dark

Why Dual Runtimes?

RuntimePurpose
PythonServer-side simulation, testing, LLM tethering
JavaScriptBrowser runtime, standalone play

Keeping Them In Sync

  1. Same semantics — Both should produce identical results
  2. Same world structureworld.player, world.room, etc.
  3. Same utility functionsworld.has(), world.emit(), etc.
  4. Generated together — LLM produces both in one pass

The Compilation Event

- event: COMPILE_EXPRESSION
  field: guard
  source: "player has the key"
  targets:
    - field: guard_js
      language: javascript
    - field: guard_py
      language: python
  expected_type: boolean

Python Runtime Class

class World:
    """Python runtime context — mirrors JavaScript World class."""

    def __init__(self, adventure_data):
        self.turn = 0
        self.adventure = adventure_data
        self.player = adventure_data['player']
        self.room = None  # Set on navigation
        self.party = adventure_data['party']
        self.object = None  # Set during object simulation
        self.skills = {}  # Skill state namespaces

    def has(self, item_id: str) -> bool:
        return item_id in self.player.get('inventory', [])

    def flag(self, name: str) -> bool:
        return self.adventure.get('flags', {}).get(name, False)

    def emit(self, message: str):
        print(message)  # Or queue for output

    def trigger_event(self, name: str, data=None):
        # Event system handles this
        pass

JavaScript Runtime Class

class World {
  /** JavaScript runtime context — mirrors Python World class. */

  constructor(adventureData) {
    this.turn = 0;
    this.adventure = adventureData;
    this.player = adventureData.player;
    this.room = null;  // Set on navigation
    this.party = adventureData.party;
    this.object = null;  // Set during object simulation
    this.skills = {};  // Skill state namespaces
  }

  has(itemId) {
    return (this.player.inventory || []).includes(itemId);
  }

  flag(name) {
    return (this.adventure.flags || {})[name] || false;
  }

  emit(message) {
    console.log(message);  // Or queue for UI
  }

  triggerEvent(name, data) {
    // Event system handles this
  }
}

Protocol Symbol

RUNTIME-CONTEXT — The world passed to closures (Python + JavaScript)

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.09%
按下载量换算32

Claude

26.15%
按下载量换算23

Cursor

19.55%
按下载量换算17

Gemini CLI

9.62%
按下载量换算9

安全审计

Gen Agent Trust Hub

未通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills