← 返回
未分类 中文

site-memory

Persistent memory for repeated browser work. Use when an agent revisits the same sites or flows and should load a few relevant notes up front, then save dura...
持久记忆用于重复的浏览器操作。当代理重新访问相同网站或流程时,先加载相关笔记,随后保存。
littleyier littleyier 来源
未分类 clawhub v1.0.0 1 版本 99734.7 Key: 无需
★ 1
Stars
📥 356
下载
💾 1
安装
1
版本
#latest

概述

site-memory

This skill adds a reusable note loop to browser automation.

Its job is intentionally narrow:

  • load a small number of high-value notes before acting
  • write back reusable lessons after the task completes

It does not define business schemas. It does not own the browser driver.

Pair it with whatever browser control tool you already trust.

Runtime location

Memory is global and shared across all projects. Notes about a website learned

in one project are automatically available in every other project.

The default location is ~/.site-memory/. Override with SITE_MEMORY_HOME or

--runtime-base .

Resolve it with:

node ./scripts/resolve-runtime-root.mjs

Initialize it with:

node ./scripts/init-memory-root.mjs

Memory shape

The runtime root contains:

  • INDEX.md as a compact index
  • topic files with frontmatter and reusable details

Supported note kinds:

  • operator
  • guidance
  • context
  • reference

Use them this way:

  • operator: collaboration preferences, pause points, tolerance for automation
  • guidance: reusable rules, warnings, and tactics
  • context: surrounding deadlines or constraints that matter across runs
  • reference: stable selectors, URL patterns, routes, and site structure

Lookup workflow

  1. Build the lookup inputs:
node ./scripts/build-recall-input.mjs --task "<current task>"
  1. Use the generated selector prompt to choose only the notes that are likely

to save real exploration time.

  1. Open only the chosen files:
node ./scripts/read-recalled-files.mjs --files "reference/foo.md,guidance/bar.md"
  1. Treat recalled notes as leads, not ground truth. Re-check selectors, button

labels, URLs, and flows against the live page before relying on them.

Capture workflow

After the browser task ends, build the write-back prompt:

node ./scripts/build-distill-input.mjs --message-count <n>

The output contains a prompt field. You MUST execute that prompt as an

after-action pass. This pass can:

  • read memory files
  • search memory files
  • update files only inside the memory root

That pass should:

  • update an existing topic file when possible
  • create a new topic file only when the lesson is genuinely new
  • keep INDEX.md short
  • avoid storing one-off outputs, secrets, or temporary task state

Design rules

  • Keep notes generic and reusable.
  • Save only information that should make a future visit cheaper or safer.
  • Prefer revising topic notes over appending session logs.
  • Load only a few notes per task; too much memory becomes noise.
  • If a remembered selector or route may be stale, verify it before use.

Browser automation

A CDP-based browser control skill is bundled at ./vendor/chrome-cdp-skill/.

Read its instructions before first use:

cat ./vendor/chrome-cdp-skill/skills/chrome-cdp/SKILL.md

Use node ./scripts/cdp-proxy.mjs [args] for browser interaction.

Commands

All commands use ./scripts/cdp-proxy.mjs. The is a unique

targetId prefix from list.

list                              List open pages
shot <target> [file]              Viewport screenshot
snap <target>                     Accessibility tree snapshot
nav  <target> <url>               Navigate and wait for load
click <target> <selector>         Click by CSS selector
clickxy <target> <x> <y>          Click at CSS pixel coordinates
type <target> <text>              Type text at current focus
eval <target> <expr>              Evaluate JavaScript
html <target> [selector]          Full page or element HTML
open [url]                        Open new tab

Coordinates

shot saves at native resolution: image pixels = CSS pixels x DPR.

CDP input events use CSS pixels: CSS px = screenshot px / DPR.

Tips

  • Prefer snap --compact over html for page structure
  • Use type (not eval) to enter text in cross-origin iframes
  • Chrome shows an "Allow debugging" modal once per tab on first access

Browser task workflow

For repeated browser work, follow these phases in order:

1. Prepare the runtime

node ./scripts/init-memory-root.mjs

2. Load likely-helpful notes

node ./scripts/build-recall-input.mjs --task "<url> <objective>"

Read the manifest from the output, choose the strongest matches, then open only

those notes:

node ./scripts/read-recalled-files.mjs --files "file1.md,file2.md"

3. Browse and verify

Use the browser tool to accomplish the objective. If notes mention selectors or

routes, verify them on the live page before depending on them.

4. Capture durable findings

After the task, save only the parts that should help a future visit. For site

knowledge, a reference note often benefits from a body structure like:

## What this site is
## How the site works
## Verified selectors
## Pitfalls
## Successful paths

Update INDEX.md after writing. If the task produced no durable lesson, skip

the write-back.

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-07 10:37 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-agent

self-improving agent

pskoett
捕获经验教训、错误及修正内容,以实现持续改进。适用于以下场景:(1)命令或操作意外失败;(2)用户纠正Claude(如“不,那不对……”“实际上……”);(3)用户请求的功能不存在;(4)外部API或工具出现故障;(5)Claude发现自身
★ 4,088 📥 816,315
ai-agent

Skill Vetter

spclaudehome
AI智能体技能安全预审工具。安装ClawdHub、GitHub等来源技能前,检查风险信号、权限范围及可疑模式。
★ 1,232 📥 268,472
ai-agent

ontology

oswalpalash
类型化知识图谱,用于结构化智能体记忆与可组合技能。适用于以下场景:创建/查询实体(人物、项目、任务、事件、文档)、关联相关对象、强制执行约束、将多步操作规划为图谱变换,或当技能需要共享状态时。触发关键词包括"记住""我知道关于什么""将X链
★ 723 📥 245,244