wesight: Instructions file for Codex

AGENTS.md

wesight AGENTS.md is an instructions file for Codex, OpenCode from freestylefly/wesight. It costs 6,627 tokens per session, scanned B, original, MIT.

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

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions CLAUDE.md; mentions subagents; names the AskUserQuestion tool.

This is freestylefly/wesight's own configuration. It tells Codex and OpenCode how to work on wesight itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything wesight configures →

Reuse

Borrowing it

Nothing to install: this file belongs to freestylefly/wesight. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/freestylefly/wesight/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/freestylefly/wesight

Made for: Codex, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for wesight AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/freestylefly/wesight/agents-md/github.svg)](https://agentmods.dev/instructions/freestylefly/wesight/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/freestylefly/wesight/agents-md"><img src="https://agentmods.dev/badge/instructions/freestylefly/wesight/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for wesight AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/freestylefly/wesight/agents-md"><img src="https://agentmods.dev/badge/instructions/freestylefly/wesight/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.06627 $0.06627
Opus 5.5 $0.02651 $0.02651
Sonnet 5.5 $0.01325 $0.01325
Haiku 4.5 $0.00663 $0.00663

Measured 1mo ago against content hash d601041661bf, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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. 1mo 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 (961 stars, last pushed 26d ago), licensed MIT. It adds 6,627 tokens to every session, about $0.0265 per session on Opus 5.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

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 9,715 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,461 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,731 tokens

deno copilot-instructions.md

Copilot instructions for denoland/deno, covering deno development guide for github copilot, network access, high level overview, key directories and key files to understand first.

denoland/deno · 3,077 tokens