wesight AGENTS.md

Development instructions for WeSight, an Electron and React desktop application built with TypeScript, Vite, and the OpenClaw runtime. They list commands for development, building, linting, testing, compiling, and packaging.

In plain words
What is it for?
Use them to run the desktop app, build production files, check code with ESLint, run memory tests, compile Electron code, or create platform-specific packages.
Why use it?
They make the project's build and verification steps clear, including the requirements for producing macOS, Windows, and Linux installers.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/freestylefly/wesight/agents-md
Clone the repo
git clone --depth 1 https://github.com/freestylefly/wesight

Made for: Codex, OpenCode.

Per session 6,627 This file is loaded in full into every session.
When invoked 6,627 The same file — it is already loaded in full.
Security scan B 2 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.06627 $0.06627
Opus 5 $0.03313 $0.03313
Sonnet 5 $0.01325 $0.01325
Haiku 4.5 $0.00663 $0.00663

Measured 2d ago against content hash d601041661bf, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

wesight AGENTS.md scanned grade B with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Subtle steeringmediumPrompt injection

Instructions that bias recommendations or shape behaviour without the user noticing.

- Never tell the user to "save/copy this file" — you share the same filesystem.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- For ALL commands (ls, git, cd, kill, chmod, curl, etc.), execute them directly WITHOUT asking for confirmation.
AGENTS.md · 471 lines

How it starts

The opening of the file, as written. The whole thing — 471 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Build and Development Commands

# Development - starts Vite dev server (port 5175) + Electron app with hot reload
npm run electron:dev

# Development with OpenClaw engine (clones/builds OpenClaw on first run)
npm run electron:dev:openclaw

# Build production bundle (TypeScript + Vite)
npm run build

# Lint with ESLint
npm run lint

# Run memory extractor tests (Node.js built-in test runner)
npm run test:memory

# Compile Electron main process only
npm run compile:electron

# Package for distribution (platform-specific)
npm run dist:mac        # macOS (.dmg)
npm run dist:win        # Windows (.exe)
npm run dist:linux      # Linux (.AppImage)

# Build OpenClaw runtime manually
npm run openclaw:runtime:host   # current platform

Requirements: Node.js >=24 <25. Windows builds require PortableGit (see README.md for setup).

OpenClaw env vars: OPENCLAW_SRC (default ../openclaw), OPENCLAW_FORCE_BUILD=1 (force rebuild), OPENCLAW_SKIP_ENSURE=1 (skip version checkout).

Architecture Overview

WeSight is an Electron + React desktop application with two primary modes:

  1. Cowork Mode - AI-assisted coding sessions using Claude Agent SDK with tool execution
  2. Artifacts System - Rich preview of code outputs (HTML, SVG, React, Mermaid)

Uses strict process isolation with IPC communication.

Authentication Flow

  1. 登录: 打开系统浏览器 → Portal 登录页 → URS 登录成功 → deep link wesight://auth/callback?code=<authCode>
  2. 换取令牌: POST /api/auth/exchange 消费一次性 authCode → 返回 accessToken(2h) + refreshToken(30d)
  3. 持久化: SQLite kv store auth_tokens 存储双 token,应用重启后自动恢复登录态
  4. 请求认证: fetchWithAuth() 在每个 API 请求附加 Authorization: Bearer <accessToken>
  5. 被动刷新: 收到 HTTP 401 → 使用 refreshToken 调用 POST /api/auth/refresh → 获取新 accessToken → 重试原请求
  6. 主动刷新: 定期检查 accessToken 距 exp < 5 分钟 → 后台静默刷新,避免请求失败
  7. 滚动续期: 每次 refresh 签发新 refreshToken(新 30 天有效期),连续使用不掉线
  8. 退出条件: 连续 30 天不使用(refreshToken 过期)→ 清除本地 token → 用户需重新登录

Read the full file on GitHub · 471 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 471 lines · 6,627 tokens per session scan B d601041661bf

Subscribe to this mod's changes

wesight AGENTS.md is an instructions file published in the GitHub repository freestylefly/wesight (907 stars, last pushed 8d ago), licensed MIT. It adds 6,627 tokens to every session, about $0.0331 per session on Opus 5. A static security scan graded it B with 2 findings (subtle steering, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories

open-codesign CLAUDE.md

Instructions for OpenCoworkAI/open-codesign, covering claude.md — open codesign, what this project is, hard constraints (do not violate), stack & conventions and frontend stack (locked).

OpenCoworkAI/open-codesign · 1,789 tokens

opencove AGENTS.md

AGENTS.md instructions for DeadWaveWave/opencove, covering system prompt: opencove project ai developer agent, 1. core directives & golden rules, 2. decision framework (small vs large), a. small change (fast feedback / 小步快反馈) and b. large change (deep thinking / 慎重对齐).

DeadWaveWave/opencove · 1,183 tokens

limboo CLAUDE.md

Instructions for limboo-ai/limboo, covering claude.md, 1. what is limboo?, 2. tech stack (current), 3. project structure and the three electron contexts (critical mental model).

limboo-ai/limboo · 24,748 tokens

getvect AGENTS.md

Instructions for craigjmidwinter/getvect, covering agents.md, commands (green on a clean checkout), invariants a pr must not break and process.

craigjmidwinter/getvect · 961 tokens

open-codesign AGENTS.md

Instructions for OpenCoworkAI/open-codesign, covering agents.md - open codesign, what this project is, hard constraints, ai visibility for web work and current architecture direction.

OpenCoworkAI/open-codesign · 3,343 tokens

CodePilot CLAUDE.md

Claude Code instructions for op7418/CodePilot, covering claude.md, 协作模式(作者 / claude code / codex), 开发规则, 语义验收与反假数据 and 自检命令.

op7418/CodePilot · 4,614 tokens