[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7ATQ2AVRVM0YNNDR4CD7T8R":3,"skill-same:01M7ATQ2AVRVM0YNNDR4CD7T8R":65},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":33,"commitSha":34,"skillDirectory":35,"forksCount":36,"repositoryHtmlUrl":37,"repositoryHomepageUrl":6,"ownerHtmlUrl":38,"ownerBlogUrl":39,"ownerDescription":6,"updatedAt":40,"install":41,"resources":54},"01M7ATQ2AVRVM0YNNDR4CD7T8R","hello-world",null,"Says hello to the user.","kody-w\u002Frapp-monorepo","kody-w","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1735900?v=4","01M7ARKSSTS4CWJWDPXM775TDT","Kody Wildfeuer","01M7ARKSTSEP6F9Z9F5EVX157F",1,"MIT","https:\u002F\u002Fgithub.com\u002Fkody-w\u002Frapp-monorepo\u002Fblob\u002Fmain\u002Frepos\u002Frapp-skills\u002Fskills\u002Fhello-world\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: \"hello-world\"\ndescription: \"Says hello to the user.\"\nlicense: \"MIT\"\ncompatibility: \"Requires python3 (3.11+).\"\nmetadata:\n  source: \"agent.py\"\n  file: \"hello_world_agent.py\"\n  tool-name: \"HelloWorldAgent\"\n  agent-sha256: \"d2695f70a412909546a49586487a471e6bca9c2d215d0367d440a80473b75bd1\"\n  version: \"1.0.3\"\n  author: \"kody-w\"\n  tags: \"tutorial, hello-world, starter\"\n  origin: \"https:\u002F\u002Fgithub.com\u002Fkody-w\u002FRAR\u002Fblob\u002Fmain\u002Fagents\u002F@kody-w\u002Fhello_world_agent.py\"\n---\n\n# Hello World\n\nSays hello to the user.\n\n## What it needs\n\n```json\n{\n  \"type\": \"object\",\n  \"properties\": {\n    \"name\": {\n      \"type\": \"string\",\n      \"description\": \"Name to greet\"\n    }\n  },\n  \"required\": []\n}\n```\n\n## How to run it\n\nPass what it needs as one JSON object. This file is complete on its own: everything\nneeded to run it is below.\n\n1. If `scripts\u002Frun.py` exists beside this file, run from this skill's directory:\n\n   ```bash\n   python3 scripts\u002Frun.py --json '{\"name\": \"\u003Cstring>\"}'\n   ```\n\n2. Otherwise save the **code** block below as `agent.py` and the **launcher** block as\n   `run.py` in one directory, then run `python3 run.py --json '...'` there.\n3. If Python is unavailable, read the code block and do what its `perform`\n   method does yourself; it is the exact description of this skill.\n\nReturn the printed output to the user as the result.\n\n## The code\n\nThe code that does the work, unmodified from its source. Its sha256 is in the marker.\n\n\u003C!-- agent sha256=d2695f70a412909546a49586487a471e6bca9c2d215d0367d440a80473b75bd1 -->\n```python\n\"\"\"Hello World Agent — A friendly greeting agent that demonstrates the basics.\"\"\"\n\n__manifest__ = {\n    \"schema\": \"rapp-agent\u002F1.0\",\n    \"name\": \"@kody-w\u002Fhello_world_agent\",\n    \"version\": \"1.0.3\",\n    \"display_name\": \"Hello World\",\n    \"description\": \"Greets the user by name with a canned hello message; a starter example touching no external systems.\",\n    \"author\": \"kody-w\",\n    \"tags\": [\"tutorial\", \"hello-world\", \"starter\"],\n    \"category\": \"general\",\n    \"quality_tier\": \"community\",\n    \"requires_env\": [],\n    \"dependencies\": [\"@rapp\u002Fbasic_agent\"],\n}\n\nfrom agents.basic_agent import BasicAgent\n\n\nclass HelloWorldAgent(BasicAgent):\n    def __init__(self):\n        self.name = \"HelloWorldAgent\"\n        self.metadata = {\n            \"name\": self.name,\n            \"description\": \"Says hello to the user.\",\n            \"parameters\": {\n                \"type\": \"object\",\n                \"properties\": {\n                    \"name\": {\"type\": \"string\", \"description\": \"Name to greet\"}\n                },\n                \"required\": []\n            }\n        }\n        super().__init__(self.name, self.metadata)\n\n    def perform(self, **kwargs) -> str:\n        name = kwargs.get(\"name\", \"World\")\n        return f\"Hello, {name}! Welcome to the RAPP Agent ecosystem.\"\n```\n\u003C!-- \u002Fagent -->\n\n## The launcher\n\nLoads the code above and calls `perform` with your JSON input.\n\n\u003C!-- runner sha256=8d6cc7c145c772a5f9ac580f38cf28d5ca2b2a76c57813b5409a606115a6cff5 -->\n```python\nimport hashlib as _hashlib, json as _json, os as _os, sys as _sys, types as _types\nfrom pathlib import Path as _Path\n\n\nclass BasicAgent:\n    \"\"\"BasicAgent contract: name, metadata, perform(**kwargs), to_tool().\"\"\"\n\n    def __init__(self, name=None, metadata=None):\n        if name is not None:\n            self.name = name\n        elif not hasattr(self, \"name\"):\n            self.name = \"BasicAgent\"\n        if metadata is not None:\n            self.metadata = metadata\n        elif not hasattr(self, \"metadata\"):\n            self.metadata = {\n                \"name\": self.name,\n                \"description\": \"Base agent -- override this.\",\n                \"parameters\": {\"type\": \"object\", \"properties\": {}, \"required\": []},\n            }\n\n    def perform(self, **kwargs):\n        return \"Not implemented.\"\n\n    def system_context(self):\n        return None\n\n    def to_tool(self):\n        return {\n            \"type\": \"function\",\n            \"function\": {\n                \"name\": self.name,\n                \"description\": self.metadata.get(\"description\", \"\"),\n                \"parameters\": self.metadata.get(\"parameters\", {\"type\": \"object\", \"properties\": {}}),\n            },\n        }\n\n\nclass AzureFileStorageManager:\n    \"\"\"Local stand-in for the cloud storage helper some agents import.\n\n    Used only if the agent itself saves something. Everything goes under one\n    folder, $AGENT_STORAGE (default ~\u002F.agent-storage); delete it to erase all of it.\n    Nothing can be read or written outside that folder: a path that would leave it\n    (\"..\" or an absolute path) is refused, the same as on a real server. A share\n    name never becomes a path either: each named share gets its own folder under\n    shares\u002F, named by the sha256 of the name (lower-cased, trimmed), as on a server.\n    \"\"\"\n\n    DEFAULT_MARKER_GUID = \"c0p110t0-aaaa-bbbb-cccc-123456789abc\"\n    _RESERVED_STEMS = {\"CON\", \"PRN\", \"AUX\", \"NUL\", *(\"COM%d\" % i for i in range(1, 10)), *(\"LPT%d\" % i for i in range(1, 10))}\n\n    def __init__(self, share_name=None, **kwargs):\n        root = _os.environ.get(\"AGENT_STORAGE\") or str(_Path.home() \u002F \".agent-storage\")\n        self.base = _Path(root)\n        share = str(share_name or \"\").strip().lower()\n        self.share_name = share or None\n        if share:\n            self.root = self.base \u002F \"shares\" \u002F _hashlib.sha256(share.encode(\"utf-8\")).hexdigest()\n        else:\n            self.root = self.base \u002F \"default\"\n        self.root.mkdir(parents=True, exist_ok=True)\n        # What agents read off the helper, named as on a server: the share's folder,\n        # the shared memory folder, the memory file name, and the current context.\n        self.storage_root = self.root\n        self.shared_memory_path = self.root\n        self.default_file_name = \"memory.json\"\n        self.current_guid = None\n        self.current_memory_path = self.shared_memory_path\n\n    def set_memory_context(self, user_guid=None):\n        \"\"\"One sub-folder per user. None, \"\" or the marker guid means the shared folder. Returns True.\"\"\"\n        if user_guid is None or user_guid == \"\" or user_guid == self.DEFAULT_MARKER_GUID:\n            self.current_guid = None\n            self.current_memory_path = self.shared_memory_path\n            return True\n        self._folder_name(user_guid)\n        self.current_guid = user_guid\n        self.current_memory_path = self.root \u002F user_guid\n        return True\n\n    def _folder_name(self, user_guid):\n        \"\"\"user_guid when it is one literal folder name; ValueError otherwise (the server's rule).\"\"\"\n        if not isinstance(user_guid, str):\n            raise ValueError(\"user_guid must be a string\")\n        if (user_guid in (\"\", \".\", \"..\") or user_guid.endswith((\".\", \" \"))\n                or any(ch in '\u003C>:\"\u002F\\\\|?*' or ord(ch) \u003C 32 for ch in user_guid)\n                or user_guid.split(\".\", 1)[0].upper() in self._RESERVED_STEMS):\n            raise ValueError(\"user_guid must be a single path component\")\n        return user_guid\n\n    def _inside(self, *parts):\n        \"\"\"The resolved path of root\u002Fparts; refuses anything that leaves this share's folder.\n\n        The folder checked against is always a fixed child of self.base (the\n        $AGENT_STORAGE folder), never anything a caller chose, so nothing an agent\n        passes in can move the boundary.\n        \"\"\"\n        base = self.root.resolve()\n        p = self.root.joinpath(*parts).resolve()\n        if p != base and base not in p.parents:\n            raise ValueError(\"path escapes data directory: \" + \"\u002F\".join(str(x) for x in parts if str(x)))\n        return p\n\n    def _path(self, file_path):\n        p = self._inside(self.current_guid or \"\", file_path or self.default_file_name)\n        p.parent.mkdir(parents=True, exist_ok=True)\n        return p\n\n    def ensure_directory_exists(self, directory_path=\"\"):\n        \"\"\"Create a folder inside the store, under the current memory context, and return its path.\"\"\"\n        d = self._inside(self.current_guid or \"\", directory_path or \"\")\n        d.mkdir(parents=True, exist_ok=True)\n        return d\n\n    def read_json(self, file_path=None):\n        p = self._path(file_path)\n        return _json.loads(p.read_text(encoding=\"utf-8\")) if p.exists() else {}\n\n    def write_json(self, data, file_path=None):\n        self._path(file_path).write_text(_json.dumps(data, indent=2), encoding=\"utf-8\")\n        return True\n\n    def update_json(self, update_fn, file_path=None):\n        data = update_fn(self.read_json(file_path))\n        self.write_json(data, file_path)\n        return data\n\n    def read_file(self, file_path):\n        p = self._path(file_path)\n        return p.read_text(encoding=\"utf-8\") if p.exists() else None\n\n    def write_file(self, file_path, content):\n        self._path(file_path).write_text(content, encoding=\"utf-8\")\n        return True\n\n    def list_files(self, directory=\"\"):\n        d = self._inside(self.current_guid or \"\", directory)\n        return [x.name for x in d.iterdir()] if d.exists() else []\n\n    def delete_file(self, file_path):\n        p = self._path(file_path)\n        if p.exists():\n            p.unlink()\n            return True\n        return False\n\n    def file_exists(self, file_path):\n        return self._path(file_path).exists()\n\n\ndef get_storage_manager(*args, **kwargs):\n    \"\"\"What utils.storage_factory hands out on a server: the one storage helper.\"\"\"\n    return AzureFileStorageManager(*args, **kwargs)\n\n\n# Every module name a RAPP agent may import, and what each must hold. This is\n# exactly what a server exposes: BasicAgent under three names (a bare import works\n# there because the agents folder is on sys.path), and one local storage helper\n# under the three names cloud agents use for it.\n_BASIC_AGENT_ALIASES = (\"basic_agent\", \"agents.basic_agent\", \"openrappter.agents.basic_agent\")\n_STORAGE_ALIASES = {\n    \"utils.azure_file_storage\": {\"AzureFileStorageManager\": AzureFileStorageManager},\n    \"utils.dynamics_storage\": {\"DynamicsStorageManager\": AzureFileStorageManager},\n    \"utils.storage_factory\": {\"get_storage_manager\": get_storage_manager},\n}\n\n\ndef _shim_table():\n    \"\"\"{module name: {attribute: value}} for install_shims, from the alias tables above.\n\n    Every BasicAgent alias exposes one class: the one an already-present alias\n    holds (a real server's, when running inside one), else the stand-in above.\n    \"\"\"\n    base = BasicAgent\n    for name in _BASIC_AGENT_ALIASES:\n        present = _sys.modules.get(name)\n        if isinstance(getattr(present, \"BasicAgent\", None), type):\n            base = present.BasicAgent\n            break\n    table = {name: {\"BasicAgent\": base} for name in _BASIC_AGENT_ALIASES}\n    table.update(_STORAGE_ALIASES)\n    return table\n\n\ndef _register_module(dotted, attrs):\n    \"\"\"Put a module holding attrs in sys.modules under dotted, creating parent packages as needed.\n\n    A module already present under any of those names is left exactly as it is;\n    a parent only gains a __path__ (so it counts as a package) and an attribute\n    for the child when it has neither.\n    \"\"\"\n    parts = dotted.split(\".\")\n    parent = None\n    for depth in range(1, len(parts) + 1):\n        name = \".\".join(parts[:depth])\n        module = _sys.modules.get(name)\n        if module is None:\n            module = _types.ModuleType(name)\n            if depth == len(parts):\n                for attr, value in attrs.items():\n                    setattr(module, attr, value)\n            _sys.modules[name] = module\n        if depth \u003C len(parts) and not hasattr(module, \"__path__\"):\n            module.__path__ = []\n        if parent is not None and not hasattr(parent, parts[depth - 1]):\n            setattr(parent, parts[depth - 1], module)\n        parent = module\n\n\ndef install_shims():\n    \"\"\"Make every module name in the alias tables importable; never replace one already imported.\"\"\"\n    for dotted, attrs in _shim_table().items():\n        _register_module(dotted, attrs)\n\n\ndef _import_agent_module(path):\n    install_shims()\n    path = _Path(path).resolve()\n    util = __import__(\"importlib.util\").util\n    spec = util.spec_from_file_location(\"skill_agent_\" + path.stem, path)\n    module = util.module_from_spec(spec)\n    _sys.modules[spec.name] = module\n    spec.loader.exec_module(module)\n    return module\n\n\ndef _agent_name(agent):\n    return str(agent.metadata.get(\"name\") or agent.name)\n\n\ndef _agents_in(module):\n    \"\"\"[(attribute name, instance), ...] for every agent the module defines, in definition order.\n\n    An agent is a class defined in that module that subclasses BasicAgent (not\n    BasicAgent itself), has a callable perform, and whose name does not start\n    with \"_\". This is what a server serves from the file, so it is what a skill\n    sees too.\n    \"\"\"\n    base = _sys.modules[\"agents.basic_agent\"].BasicAgent\n    agents = []\n    for attr, obj in list(vars(module).items()):\n        if attr.startswith(\"_\") or not isinstance(obj, type):\n            continue\n        if obj is base or not issubclass(obj, base) or obj.__module__ != module.__name__:\n            continue\n        if not callable(getattr(obj, \"perform\", None)):\n            continue\n        agents.append((attr, obj()))\n    return agents\n\n\ndef load_agents(path):\n    \"\"\"Import an agent file by path and return [(attribute name, agent instance), ...].\"\"\"\n    agents = _agents_in(_import_agent_module(path))\n    if not agents:\n        raise RuntimeError(f\"{_Path(path).name}: no BasicAgent subclass found\")\n    return agents\n\n\ndef load_agent(path, tool_name=None):\n    \"\"\"Import an agent file by path and return (module, agent instance).\n\n    The file's only agent when it defines one. When it defines several, the one\n    whose tool name equals tool_name; without a match, an error naming them all.\n    \"\"\"\n    module = _import_agent_module(path)\n    agents = _agents_in(module)\n    if not agents:\n        raise RuntimeError(f\"{_Path(path).name}: no BasicAgent subclass found\")\n    if len(agents) == 1:\n        return module, agents[0][1]\n    names = [_agent_name(agent) for _, agent in agents]\n    if tool_name is not None:\n        for name, (_, agent) in zip(names, agents):\n            if name == tool_name:\n                return module, agent\n        raise RuntimeError(f\"{_Path(path).name} has no agent named {tool_name!r}; it defines: {', '.join(names)}\")\n    raise RuntimeError(f\"{_Path(path).name} defines {len(agents)} agents ({', '.join(names)}); choose one by its tool name\")\n\n\ndef main(argv=None):\n    import argparse\n    ap = argparse.ArgumentParser(description=\"Run this skill's agent locally.\")\n    ap.add_argument(\"--json\", default=None, help=\"arguments as a JSON object\")\n    ap.add_argument(\"--tool\", default=None, help=\"which agent to run when agent.py defines several (its tool name)\")\n    ap.add_argument(\"--describe\", action=\"store_true\", help=\"print the agent's tool definition\")\n    ap.add_argument(\"pairs\", nargs=\"*\", help=\"key=value arguments (alternative to --json)\")\n    args = ap.parse_args(argv)\n    here = _Path(__file__).resolve().parent\n    try:\n        module, agent = load_agent(here \u002F \"agent.py\", args.tool)\n    except RuntimeError as exc:\n        hint = \" (run again with --tool \u003Cname>)\" if args.tool is None and \"choose one\" in str(exc) else \"\"\n        print(f\"error: {exc}{hint}\", file=_sys.stderr)\n        return 2\n    if args.describe:\n        print(_json.dumps(agent.to_tool(), indent=2))\n        return 0\n    kwargs = _json.loads(args.json) if args.json else {}\n    for pair in args.pairs:\n        key, _, value = pair.partition(\"=\")\n        kwargs[key] = value\n    result = agent.perform(**kwargs)\n    if isinstance(result, (dict, list)):\n        print(_json.dumps(result, indent=2, ensure_ascii=False))\n    else:\n        print(result if result is not None else \"\")\n    return 0\n\n\nif __name__ == \"__main__\":\n    _sys.exit(main())\n```\n\u003C!-- \u002Frunner -->\n","# Hello World\n\nSays hello to the user.\n\n## What it needs\n\n```json\n{\n  \"type\": \"object\",\n  \"properties\": {\n    \"name\": {\n      \"type\": \"string\",\n      \"description\": \"Name to greet\"\n    }\n  },\n  \"required\": []\n}\n```\n\n## How to run it\n\nPass what it needs as one JSON object. This file is complete on its own: everything\nneeded to run it is below.\n\n1. If `scripts\u002Frun.py` exists beside this file, run from this skill's directory:\n\n   ```bash\n   python3 scripts\u002Frun.py --json '{\"name\": \"\u003Cstring>\"}'\n   ```\n\n2. Otherwise save the **code** block below as `agent.py` and the **launcher** block as\n   `run.py` in one directory, then run `python3 run.py --json '...'` there.\n3. If Python is unavailable, read the code block and do what its `perform`\n   method does yourself; it is the exact description of this skill.\n\nReturn the printed output to the user as the result.\n\n## The code\n\nThe code that does the work, unmodified from its source. Its sha256 is in the marker.\n\n\u003C!-- agent sha256=d2695f70a412909546a49586487a471e6bca9c2d215d0367d440a80473b75bd1 -->\n```python\n\"\"\"Hello World Agent — A friendly greeting agent that demonstrates the basics.\"\"\"\n\n__manifest__ = {\n    \"schema\": \"rapp-agent\u002F1.0\",\n    \"name\": \"@kody-w\u002Fhello_world_agent\",\n    \"version\": \"1.0.3\",\n    \"display_name\": \"Hello World\",\n    \"description\": \"Greets the user by name with a canned hello message; a starter example touching no external systems.\",\n    \"author\": \"kody-w\",\n    \"tags\": [\"tutorial\", \"hello-world\", \"starter\"],\n    \"category\": \"general\",\n    \"quality_tier\": \"community\",\n    \"requires_env\": [],\n    \"dependencies\": [\"@rapp\u002Fbasic_agent\"],\n}\n\nfrom agents.basic_agent import BasicAgent\n\n\nclass HelloWorldAgent(BasicAgent):\n    def __init__(self):\n        self.name = \"HelloWorldAgent\"\n        self.metadata = {\n            \"name\": self.name,\n            \"description\": \"Says hello to the user.\",\n            \"parameters\": {\n                \"type\": \"object\",\n                \"properties\": {\n                    \"name\": {\"type\": \"string\", \"description\": \"Name to greet\"}\n                },\n                \"required\": []\n            }\n        }\n        super().__init__(self.name, self.metadata)\n\n    def perform(self, **kwargs) -> str:\n        name = kwargs.get(\"name\", \"World\")\n        return f\"Hello, {name}! Welcome to the RAPP Agent ecosystem.\"\n```\n\u003C!-- \u002Fagent -->\n\n## The launcher\n\nLoads the code above and calls `perform` with your JSON input.\n\n\u003C!-- runner sha256=8d6cc7c145c772a5f9ac580f38cf28d5ca2b2a76c57813b5409a606115a6cff5 -->\n```python\nimport hashlib as _hashlib, json as _json, os as _os, sys as _sys, types as _types\nfrom pathlib import Path as _Path\n\n\nclass BasicAgent:\n    \"\"\"BasicAgent contract: name, metadata, perform(**kwargs), to_tool().\"\"\"\n\n    def __init__(self, name=None, metadata=None):\n        if name is not None:\n            self.name = name\n        elif not hasattr(self, \"name\"):\n            self.name = \"BasicAgent\"\n        if metadata is not None:\n            self.metadata = metadata\n        elif not hasattr(self, \"metadata\"):\n            self.metadata = {\n                \"name\": self.name,\n                \"description\": \"Base agent -- override this.\",\n                \"parameters\": {\"type\": \"object\", \"properties\": {}, \"required\": []},\n            }\n\n    def perform(self, **kwargs):\n        return \"Not implemented.\"\n\n    def system_context(self):\n        return None\n\n    def to_tool(self):\n        return {\n            \"type\": \"function\",\n            \"function\": {\n                \"name\": self.name,\n                \"description\": self.metadata.get(\"description\", \"\"),\n                \"parameters\": self.metadata.get(\"parameters\", {\"type\": \"object\", \"properties\": {}}),\n            },\n        }\n\n\nclass AzureFileStorageManager:\n    \"\"\"Local stand-in for the cloud storage helper some agents import.\n\n    Used only if the agent itself saves something. Everything goes under one\n    folder, $AGENT_STORAGE (default ~\u002F.agent-storage); delete it to erase all of it.\n    Nothing can be read or written outside that folder: a path that would leave it\n    (\"..\" or an absolute path) is refused, the same as on a real server. A share\n    name never becomes a path either: each named share gets its own folder under\n    shares\u002F, named by the sha256 of the name (lower-cased, trimmed), as on a server.\n    \"\"\"\n\n    DEFAULT_MARKER_GUID = \"c0p110t0-aaaa-bbbb-cccc-123456789abc\"\n    _RESERVED_STEMS = {\"CON\", \"PRN\", \"AUX\", \"NUL\", *(\"COM%d\" % i for i in range(1, 10)), *(\"LPT%d\" % i for i in range(1, 10))}\n\n    def __init__(self, share_name=None, **kwargs):\n        root = _os.environ.get(\"AGENT_STORAGE\") or str(_Path.home() \u002F \".agent-storage\")\n        self.base = _Path(root)\n        share = str(share_name or \"\").strip().lower()\n        self.share_name = share or None\n        if share:\n            self.root = self.base \u002F \"shares\" \u002F _hashlib.sha256(share.encode(\"utf-8\")).hexdigest()\n        else:\n            self.root = self.base \u002F \"default\"\n        self.root.mkdir(parents=True, exist_ok=True)\n        # What agents read off the helper, named as on a server: the share's folder,\n        # the shared memory folder, the memory file name, and the current context.\n        self.storage_root = self.root\n        self.shared_memory_path = self.root\n        self.default_file_name = \"memory.json\"\n        self.current_guid = None\n        self.current_memory_path = self.shared_memory_path\n\n    def set_memory_context(self, user_guid=None):\n        \"\"\"One sub-folder per user. None, \"\" or the marker guid means the shared folder. Returns True.\"\"\"\n        if user_guid is None or user_guid == \"\" or user_guid == self.DEFAULT_MARKER_GUID:\n            self.current_guid = None\n            self.current_memory_path = self.shared_memory_path\n            return True\n        self._folder_name(user_guid)\n        self.current_guid = user_guid\n        self.current_memory_path = self.root \u002F user_guid\n        return True\n\n    def _folder_name(self, user_guid):\n        \"\"\"user_guid when it is one literal folder name; ValueError otherwise (the server's rule).\"\"\"\n        if not isinstance(user_guid, str):\n            raise ValueError(\"user_guid must be a string\")\n        if (user_guid in (\"\", \".\", \"..\") or user_guid.endswith((\".\", \" \"))\n                or any(ch in '\u003C>:\"\u002F\\\\|?*' or ord(ch) \u003C 32 for ch in user_guid)\n                or user_guid.split(\".\", 1)[0].upper() in self._RESERVED_STEMS):\n            raise ValueError(\"user_guid must be a single path component\")\n        return user_guid\n\n    def _inside(self, *parts):\n        \"\"\"The resolved path of root\u002Fparts; refuses anything that leaves this share's folder.\n\n        The folder checked against is always a fixed child of self.base (the\n        $AGENT_STORAGE folder), never anything a caller chose, so nothing an agent\n        passes in can move the boundary.\n        \"\"\"\n        base = self.root.resolve()\n        p = self.root.joinpath(*parts).resolve()\n        if p != base and base not in p.parents:\n            raise ValueError(\"path escapes data directory: \" + \"\u002F\".join(str(x) for x in parts if str(x)))\n        return p\n\n    def _path(self, file_path):\n        p = self._inside(self.current_guid or \"\", file_path or self.default_file_name)\n        p.parent.mkdir(parents=True, exist_ok=True)\n        return p\n\n    def ensure_directory_exists(self, directory_path=\"\"):\n        \"\"\"Create a folder inside the store, under the current memory context, and return its path.\"\"\"\n        d = self._inside(self.current_guid or \"\", directory_path or \"\")\n        d.mkdir(parents=True, exist_ok=True)\n        return d\n\n    def read_json(self, file_path=None):\n        p = self._path(file_path)\n        return _json.loads(p.read_text(encoding=\"utf-8\")) if p.exists() else {}\n\n    def write_json(self, data, file_path=None):\n        self._path(file_path).write_text(_json.dumps(data, indent=2), encoding=\"utf-8\")\n        return True\n\n    def update_json(self, update_fn, file_path=None):\n        data = update_fn(self.read_json(file_path))\n        self.write_json(data, file_path)\n        return data\n\n    def read_file(self, file_path):\n        p = self._path(file_path)\n        return p.read_text(encoding=\"utf-8\") if p.exists() else None\n\n    def write_file(self, file_path, content):\n        self._path(file_path).write_text(content, encoding=\"utf-8\")\n        return True\n\n    def list_files(self, directory=\"\"):\n        d = self._inside(self.current_guid or \"\", directory)\n        return [x.name for x in d.iterdir()] if d.exists() else []\n\n    def delete_file(self, file_path):\n        p = self._path(file_path)\n        if p.exists():\n            p.unlink()\n            return True\n        return False\n\n    def file_exists(self, file_path):\n        return self._path(file_path).exists()\n\n\ndef get_storage_manager(*args, **kwargs):\n    \"\"\"What utils.storage_factory hands out on a server: the one storage helper.\"\"\"\n    return AzureFileStorageManager(*args, **kwargs)\n\n\n# Every module name a RAPP agent may import, and what each must hold. This is\n# exactly what a server exposes: BasicAgent under three names (a bare import works\n# there because the agents folder is on sys.path), and one local storage helper\n# under the three names cloud agents use for it.\n_BASIC_AGENT_ALIASES = (\"basic_agent\", \"agents.basic_agent\", \"openrappter.agents.basic_agent\")\n_STORAGE_ALIASES = {\n    \"utils.azure_file_storage\": {\"AzureFileStorageManager\": AzureFileStorageManager},\n    \"utils.dynamics_storage\": {\"DynamicsStorageManager\": AzureFileStorageManager},\n    \"utils.storage_factory\": {\"get_storage_manager\": get_storage_manager},\n}\n\n\ndef _shim_table():\n    \"\"\"{module name: {attribute: value}} for install_shims, from the alias tables above.\n\n    Every BasicAgent alias exposes one class: the one an already-present alias\n    holds (a real server's, when running inside one), else the stand-in above.\n    \"\"\"\n    base = BasicAgent\n    for name in _BASIC_AGENT_ALIASES:\n        present = _sys.modules.get(name)\n        if isinstance(getattr(present, \"BasicAgent\", None), type):\n            base = present.BasicAgent\n            break\n    table = {name: {\"BasicAgent\": base} for name in _BASIC_AGENT_ALIASES}\n    table.update(_STORAGE_ALIASES)\n    return table\n\n\ndef _register_module(dotted, attrs):\n    \"\"\"Put a module holding attrs in sys.modules under dotted, creating parent packages as needed.\n\n    A module already present under any of those names is left exactly as it is;\n    a parent only gains a __path__ (so it counts as a package) and an attribute\n    for the child when it has neither.\n    \"\"\"\n    parts = dotted.split(\".\")\n    parent = None\n    for depth in range(1, len(parts) + 1):\n        name = \".\".join(parts[:depth])\n        module = _sys.modules.get(name)\n        if module is None:\n            module = _types.ModuleType(name)\n            if depth == len(parts):\n                for attr, value in attrs.items():\n                    setattr(module, attr, value)\n            _sys.modules[name] = module\n        if depth \u003C len(parts) and not hasattr(module, \"__path__\"):\n            module.__path__ = []\n        if parent is not None and not hasattr(parent, parts[depth - 1]):\n            setattr(parent, parts[depth - 1], module)\n        parent = module\n\n\ndef install_shims():\n    \"\"\"Make every module name in the alias tables importable; never replace one already imported.\"\"\"\n    for dotted, attrs in _shim_table().items():\n        _register_module(dotted, attrs)\n\n\ndef _import_agent_module(path):\n    install_shims()\n    path = _Path(path).resolve()\n    util = __import__(\"importlib.util\").util\n    spec = util.spec_from_file_location(\"skill_agent_\" + path.stem, path)\n    module = util.module_from_spec(spec)\n    _sys.modules[spec.name] = module\n    spec.loader.exec_module(module)\n    return module\n\n\ndef _agent_name(agent):\n    return str(agent.metadata.get(\"name\") or agent.name)\n\n\ndef _agents_in(module):\n    \"\"\"[(attribute name, instance), ...] for every agent the module defines, in definition order.\n\n    An agent is a class defined in that module that subclasses BasicAgent (not\n    BasicAgent itself), has a callable perform, and whose name does not start\n    with \"_\". This is what a server serves from the file, so it is what a skill\n    sees too.\n    \"\"\"\n    base = _sys.modules[\"agents.basic_agent\"].BasicAgent\n    agents = []\n    for attr, obj in list(vars(module).items()):\n        if attr.startswith(\"_\") or not isinstance(obj, type):\n            continue\n        if obj is base or not issubclass(obj, base) or obj.__module__ != module.__name__:\n            continue\n        if not callable(getattr(obj, \"perform\", None)):\n            continue\n        agents.append((attr, obj()))\n    return agents\n\n\ndef load_agents(path):\n    \"\"\"Import an agent file by path and return [(attribute name, agent instance), ...].\"\"\"\n    agents = _agents_in(_import_agent_module(path))\n    if not agents:\n        raise RuntimeError(f\"{_Path(path).name}: no BasicAgent subclass found\")\n    return agents\n\n\ndef load_agent(path, tool_name=None):\n    \"\"\"Import an agent file by path and return (module, agent instance).\n\n    The file's only agent when it defines one. When it defines several, the one\n    whose tool name equals tool_name; without a match, an error naming them all.\n    \"\"\"\n    module = _import_agent_module(path)\n    agents = _agents_in(module)\n    if not agents:\n        raise RuntimeError(f\"{_Path(path).name}: no BasicAgent subclass found\")\n    if len(agents) == 1:\n        return module, agents[0][1]\n    names = [_agent_name(agent) for _, agent in agents]\n    if tool_name is not None:\n        for name, (_, agent) in zip(names, agents):\n            if name == tool_name:\n                return module, agent\n        raise RuntimeError(f\"{_Path(path).name} has no agent named {tool_name!r}; it defines: {', '.join(names)}\")\n    raise RuntimeError(f\"{_Path(path).name} defines {len(agents)} agents ({', '.join(names)}); choose one by its tool name\")\n\n\ndef main(argv=None):\n    import argparse\n    ap = argparse.ArgumentParser(description=\"Run this skill's agent locally.\")\n    ap.add_argument(\"--json\", default=None, help=\"arguments as a JSON object\")\n    ap.add_argument(\"--tool\", default=None, help=\"which agent to run when agent.py defines several (its tool name)\")\n    ap.add_argument(\"--describe\", action=\"store_true\", help=\"print the agent's tool definition\")\n    ap.add_argument(\"pairs\", nargs=\"*\", help=\"key=value arguments (alternative to --json)\")\n    args = ap.parse_args(argv)\n    here = _Path(__file__).resolve().parent\n    try:\n        module, agent = load_agent(here \u002F \"agent.py\", args.tool)\n    except RuntimeError as exc:\n        hint = \" (run again with --tool \u003Cname>)\" if args.tool is None and \"choose one\" in str(exc) else \"\"\n        print(f\"error: {exc}{hint}\", file=_sys.stderr)\n        return 2\n    if args.describe:\n        print(_json.dumps(agent.to_tool(), indent=2))\n        return 0\n    kwargs = _json.loads(args.json) if args.json else {}\n    for pair in args.pairs:\n        key, _, value = pair.partition(\"=\")\n        kwargs[key] = value\n    result = agent.perform(**kwargs)\n    if isinstance(result, (dict, list)):\n        print(_json.dumps(result, indent=2, ensure_ascii=False))\n    else:\n        print(result if result is not None else \"\")\n    return 0\n\n\nif __name__ == \"__main__\":\n    _sys.exit(main())\n```\n\u003C!-- \u002Frunner -->\n",{"name":5,"license":15,"metadata":24,"description":7,"compatibility":32},{"file":25,"tags":26,"author":9,"origin":27,"source":28,"version":29,"tool-name":30,"agent-sha256":31},"hello_world_agent.py","tutorial, hello-world, starter","https:\u002F\u002Fgithub.com\u002Fkody-w\u002FRAR\u002Fblob\u002Fmain\u002Fagents\u002F@kody-w\u002Fhello_world_agent.py","agent.py","1.0.3","HelloWorldAgent","d2695f70a412909546a49586487a471e6bca9c2d215d0367d440a80473b75bd1","Requires python3 (3.11+).","main","2a4fd9b52f62e916b386cae9ece63d7399ed1c29","repos\u002Frapp-skills\u002Fskills\u002Fhello-world",0,"https:\u002F\u002Fgithub.com\u002Fkody-w\u002Frapp-monorepo","https:\u002F\u002Fgithub.com\u002Fkody-w","http:\u002F\u002Fwww.kodyw.com","2026-11-10 02:49:11",{"source":8,"skillName":5,"commands":42,"prompt":52,"zipAvailable":53},[43,46,49],{"tool":44,"command":45},"npx","npx skills add kody-w\u002Frapp-monorepo --skill hello-world",{"tool":47,"command":48},"bunx","bunx skills add kody-w\u002Frapp-monorepo --skill hello-world",{"tool":50,"command":51},"pnpm","pnpm dlx skills add kody-w\u002Frapp-monorepo --skill hello-world","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fkody-w\u002Frapp-monorepo\u002Fblob\u002Fmain\u002Frepos\u002Frapp-skills\u002Fskills\u002Fhello-world\u002FSKILL.md",true,[55,61],{"path":56,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":59,"sourceHtmlUrl":60},"scripts\u002Fagent.py","SCRIPT","脚本",1267,"https:\u002F\u002Fgithub.com\u002Fkody-w\u002Frapp-monorepo\u002Fblob\u002Fmain\u002Frepos\u002Frapp-skills\u002Fskills\u002Fhello-world\u002Fscripts\u002Fagent.py",{"path":62,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":63,"sourceHtmlUrl":64},"scripts\u002Frun.py",12800,"https:\u002F\u002Fgithub.com\u002Fkody-w\u002Frapp-monorepo\u002Fblob\u002Fmain\u002Frepos\u002Frapp-skills\u002Fskills\u002Fhello-world\u002Fscripts\u002Frun.py",[66,74,79,86,93,100],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":70,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":19},"01M7ATYG34NC624S0HFXXFWMV4","rappterbook","Use Rappterbook with the AI you already have. Read the public network, choose the authorized GitHub identity, register with verified receipts, read complete conversations, contribute useful evidence, and return to real replies. Use for Rappterbook participation, onboarding, contribution repair, or explicitly approved outreach.","https:\u002F\u002Fgithub.com\u002Fkody-w\u002Frapp-monorepo\u002Fblob\u002Fmain\u002Frepos\u002Frappterbook\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fkody-w\u002Frapp-monorepo\u002Fblob\u002Fmain\u002Frepos\u002Frappterbook\u002Fskill.md",[],[],{"skillNo":75,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":19},"01M7ATY3N9G207SRTC097MK9M9","https:\u002F\u002Fgithub.com\u002Fkody-w\u002Frapp-monorepo\u002Fblob\u002Fmain\u002Frepos\u002Frappterbook\u002F.github\u002Fskills\u002Frappterbook\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":19},"01M7ATQZGYPEPB03SXTEQCTY79","writing-brief","Turn a rough idea into a one-page writing brief: audience, promise, outline, tone, and the first sentence. Use when someone has a topic but no structure yet.","https:\u002F\u002Fgithub.com\u002Fkody-w\u002Frapp-monorepo\u002Fblob\u002Fmain\u002Frepos\u002Frapp-skills\u002Ftests\u002Ffixtures\u002Fwriting-brief\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":19},"01M7ATQT2SM6WANEXEHW63W0RF","rapp-work","Safely verify, inspect, discover, scaffold, update, or migrate RAPP Work through the exact canonical SDK and RAPP\u002F1 checkout. Use when someone wants the same plan-first RAPP Work workflow from Claude Code, GitHub Copilot CLI, or another Agent Skills host without copying protocol logic into the host.","https:\u002F\u002Fgithub.com\u002Fkody-w\u002Frapp-monorepo\u002Fblob\u002Fmain\u002Frepos\u002Frapp-skills\u002Fskills\u002Frapp-work\u002FSKILL.md",[],[],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":19},"01M7ATQN2NSPFMQDCMTAWEQKHD","rapp-skills","Turn a Python agent file into a skill anyone can use, turn a skill into one Python file that can run on a server, check a skill for problems, show nothing was lost either way, and run a skill's code locally. Use when a user hands over an agent file or a skill and wants to use it here, share it as one file, or take it somewhere else.","https:\u002F\u002Fgithub.com\u002Fkody-w\u002Frapp-monorepo\u002Fblob\u002Fmain\u002Frepos\u002Frapp-skills\u002Fskills\u002Frapp-skills\u002FSKILL.md",[],[],{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":19},"01M7ATQE6JD3QTSP6ZRMVVFAV5","hive-network","Use a public Hive Hub organization seed on your own device, coordinate scoped work with your existing AI, and prepare reviewed contributions for the network. Discover real seed packages, verify their contents, plan native RAPP Work setup, work a ready task, and share only owner-approved public artifacts.","https:\u002F\u002Fgithub.com\u002Fkody-w\u002Frapp-monorepo\u002Fblob\u002Fmain\u002Frepos\u002Frapp-skills\u002Fskills\u002Fhive-network\u002FSKILL.md",[],[]]