Activity2Context-for-openclaw

作者 lattice1992已验证

Real-time context layer that converts user activity into actionable signals for OpenClaw.

105
Stars
1
Forks
PowerShell
语言
2026/8/24
添加时间

⚠️ 第三方软件声明

本 Skill 为第三方开源软件,独立托管于 GitHub。SkillTip 仅为信息目录,不控制或维护底层仓库。所显示的安全检查为自动化且范围有限,安装前请自行审查源码。

阅读服务条款

安装

添加到你的 Claude Code skills 目录:

# Add to your Claude Code skills
git clone https://github.com/lattice1992/Activity2Context-for-openclaw

快速入门

使用 Activity2Context-for-openclaw 等 Skills 的指南。

安全报告

已验证

上次扫描:—

{
  "status": "PASSED",
  "issues": []
}

README.md

Activity2Context for OpenClaw

Chinese version: README.zh-CN.md

Imagine an agent that can "see what you see and track what you do."

When you want fast execution, you only provide the goal. You do not need to repeatedly feed background context every turn.

What problem does it solve?

  • Context gaps: you just edited files and read pages, but the agent does not know.
  • Repetitive briefing: you keep re-explaining what you were doing.
  • Token waste: raw behavior logs are noisy and expensive if sent directly to models.

How it works

Activity2Context is a Runtime Hook, not a Skill.

Pipeline:

  1. Capture: continuously record local activity (browser, document, app).
  2. Aggregate: compress raw streams into structured entities.
  3. Inject: before each chat turn, inject activity2context/memory.md into the OpenClaw system prompt.

What is captured (current)

  • Browser: page title, URL, focus duration, last active time.
  • Document: file path, edit count, last active time.
  • App: app name, window title, focus duration, last active time.

Outputs:

  • Raw stream: <workspace>/.openclaw/activity2context_behavior.md
  • Injected memory: <workspace>/activity2context/memory.md
  • Structured memory: <workspace>/activity2context/memory.semantic.json

Common concerns

1) Will token cost increase a lot?

Usually no. Only aggregated memory.md is injected, not full raw logs. Entity count is capped and ranked by recency/activity.

2) Is it safe for privacy?

By default, data is generated and stored locally. However, if you use cloud models, injected memory.md content is sent with prompts to your model provider. For sensitive environments, prefer local models or narrower capture scope.

3) Will it hurt performance?

The runtime is lightweight (polling + periodic aggregation). Raw logs are capped and trimmed, preventing unbounded I/O growth.

4) Will the logs grow indefinitely??

  • Raw log cap: observer.maxBehaviorLines (default 5000).
  • Auto-trim on startup to keep only the latest N lines.
  • Injected file is aggregated memory, not full raw logs.

Quick Start (Windows)

From repo root:

powershell -ExecutionPolicy Bypass -File .\install\windows\install.ps1 -Workspace "$PWD"

If your OpenClaw workspace is different from the current folder:

powershell -ExecutionPolicy Bypass -File .\install\windows\install.ps1 -Workspace "C:\path\to\your\workspace"

Control commands:

$env:USERPROFILE\.activity2context\activity2context.cmd status
$env:USERPROFILE\.activity2context\activity2context.cmd start
$env:USERPROFILE\.activity2context\activity2context.cmd stop
$env:USERPROFILE\.activity2context\activity2context.cmd index

Quick Start (macOS)

From repo root:

bash ./install/macos/install.sh --workspace "$PWD"

Control commands:

~/.activity2context/activity2context status
~/.activity2context/activity2context start
~/.activity2context/activity2context stop
~/.activity2context/activity2context index

Required macOS permissions:

  • Accessibility (foreground app/window detection)
  • Automation (read Chrome/Edge/Brave/Safari URL)
  • Python 3 (/usr/bin/python3)

OpenClaw Integration (core)

You only need memory.md injection. No Skill file is required.

openclaw config set hooks.internal.enabled true --strict-json
openclaw config set hooks.internal.entries.bootstrap-extra-files.enabled true --strict-json
openclaw config set "hooks.internal.entries.bootstrap-extra-files.paths[0]" "activity2context/memory.md"

More details: integrations/openclaw/README.md

Configuration

Config file:

  • ~/.activity2context/config.json

Templates:

  • config/activity2context.example.json
  • config/activity2context.macos.example.json

Key parameters:

  • observer.pollSeconds
  • observer.browserThreshold
  • observer.browserUpdateInterval
  • observer.appThreshold
  • observer.appUpdateInterval
  • observer.maxBehaviorLines (default 5000)
  • indexer.intervalSeconds
  • indexer.minDurationSeconds
  • indexer.maxAgeMinutes
  • indexer.maxTotal
  • indexer.maxWeb
  • indexer.maxDoc
  • indexer.maxApp
  • indexer.semanticOutput (structured JSON output path)
  • indexer.appAliases (normalize process names, optional type hints)

Uninstall

Windows:

powershell -ExecutionPolicy Bypass -File .\install\windows\uninstall.ps1

macOS:

bash ./install/macos/uninstall.sh

Keep data but remove runtime:

powershell -ExecutionPolicy Bypass -File .\install\windows\uninstall.ps1 -KeepData
bash ./install/macos/uninstall.sh --keep-data

常见问题

What is Activity2Context-for-openclaw?

Activity2Context-for-openclaw is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by lattice1992. Real-time context layer that converts user activity into actionable signals for OpenClaw. It has 105 GitHub stars.

Is Activity2Context-for-openclaw safe to use?

Yes. Activity2Context-for-openclaw passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.

How do I install Activity2Context-for-openclaw?

Clone the repository with "git clone https://github.com/lattice1992/Activity2Context-for-openclaw" and add it to your Claude Code skills directory (see the Installation section above).

What programming language is Activity2Context-for-openclaw written in?

Activity2Context-for-openclaw is primarily written in PowerShell. It is open-source under lattice1992 on GitHub, so you can review or fork the full source.

Are there alternatives to Activity2Context-for-openclaw?

Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh Activity2Context-for-openclaw against similar tools.

评论 (0)

暂无评论,成为第一个分享想法的人!

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI 智能体ai-agentsbrainstorming
查看详情

hermes-agent

by NousResearch

10

The agent that grows with you

234,43747,175Python
AI 智能体ai-agentsagent-orchestration
查看详情

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI 智能体claude-codeai-tools
查看详情

claude-code

by anthropics

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

120,03119,897Shell
AI 智能体
查看详情

开发者还喜欢

基于喜欢此 Skill 的开发者投票和收藏

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI 智能体ai-agentsbrainstorming
查看详情

hermes-agent

by NousResearch

10

The agent that grows with you

234,43747,175Python
AI 智能体ai-agentsagent-orchestration
查看详情

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP 服务器apisai-tools
查看详情

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI 智能体claude-codeai-tools
查看详情