Skip to content

Instantly share code, notes, and snippets.

@wong2
wong2 / SKILL.md
Created May 9, 2026 12:57
Codex Chrome use skill
name Chrome
description Browser automation for the user's Chrome browser. Use for browser tasks that require the user's cookies, logged-in sessions, existing tabs, extensions, or remote authenticated sites.

Chrome

Use this skill when the user mentions @chrome.

Chrome is the routing touchpoint for the Codex Chrome Extension:

```
vscode:mcp/install?encodeURIComponent(JSON.stringify({
"name": "fetch",
"command": "npx",
"args": [],
}))
``
```
cherrystudio://mcp/install?servers={base64Encode(JSON.stringify({
@wong2
wong2 / claude-code-tools.md
Last active May 18, 2026 04:08
Tools and system prompt of Claude Code

Task

Launch a new agent that has access to the following tools: Bash, Glob, Grep, LS, exit_plan_mode, Read, Edit, MultiEdit, Write, NotebookRead, NotebookEdit, WebFetch, TodoRead, TodoWrite, WebSearch. When you are searching for a keyword or file and are not confident that you will find the right match in the first few tries, use the Agent tool to perform the search for you.

When to use the Agent tool:

  • If you are searching for a keyword like "config" or "logger", or for questions like "which file does X?", the Agent tool is strongly recommended

When NOT to use the Agent tool:

  • If you want to read a specific file path, use the Read or Glob tool instead of the Agent tool, to find the match more quickly
  • If you are searching for a specific class definition like "class Foo", use the Glob tool instead, to find the match more quickly
  • If you are searching for code within a specific file or set of 2-3 files, use the Read tool instead of the Agent tool, to find the match more quickly
@wong2
wong2 / README.md
Last active May 11, 2026 17:58
How to run Claude computer use demo on macOS

Note

It is necessary to give Terminal (or iTerm or whatever you use) the permission to control the computer. This can be done in System Settings ➔ Privacy & Security ➔ Accessibility.

Guide

  • Install cliclick for mouse & keyboard emulation
    • brew install cliclick
  • Clone Anthropic quickstart repo
    • git clone https://github.com/anthropics/anthropic-quickstarts.git
  • cd computer-use-demo
  • Replace computer-use-demo/computer_use_demo/tools/computer.py with the modified version below
from io import BytesIO
import torch
from fastapi.responses import StreamingResponse
from leptonai.photon import Photon
from loguru import logger
class JPEGResponse(StreamingResponse):
media_type = "image/jpeg"
async function* streamAsyncIterable<T = unknown>(stream: ReadableStream<T>) {
const reader = stream.getReader()
try {
while (true) {
const { done, value } = await reader.read()
if (done) {
return
}
yield value
}
import { Chain, Common } from "@nomicfoundation/ethereumjs-common";
import { TransactionFactory } from "@nomicfoundation/ethereumjs-tx";
import { VM } from "@nomicfoundation/ethereumjs-vm";
import { ForkBlockchain } from "hardhat/internal/hardhat-network/provider/fork/ForkBlockchain";
import { ForkStateManager } from "hardhat/internal/hardhat-network/provider/fork/ForkStateManager";
import { makeForkClient } from "hardhat/internal/hardhat-network/provider/utils/makeForkClient";
const JSON_RPC_URL = "https://rpc.ankr.com/eth";
async function simulateTx(signedTx: string) {
@wong2
wong2 / SocialRecoveryAccount.sol
Last active August 26, 2022 04:00
Minimum social recovery wallet implementation on zkSync https://vitalik.ca/general/2021/01/11/recovery.html
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@matterlabs/zksync-contracts/l2/system-contracts/interfaces/IAccountAbstraction.sol";
import "@matterlabs/zksync-contracts/l2/system-contracts/TransactionHelper.sol";
import "@matterlabs/zksync-contracts/l2/system-contracts/Constants.sol";
import "@openzeppelin/contracts/interfaces/IERC1271.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import HDWalletProvider from "@truffle/hdwallet-provider";
import { OpenSeaPort, Network } from "opensea-js";
import { PRIVATE_KEY } from "./consts.mjs";
const provider = new HDWalletProvider({
privateKeys: [PRIVATE_KEY],
providerOrUrl: "https://rpc.ankr.com/eth",
});
provider.engine.on("error", (err) => {
{
"contracts": {
"@openzeppelin/contracts/access/Ownable.sol": {
"Ownable": {
"storageLayout": {
"storage": [
{
"astId": 7,
"contract": "@openzeppelin/contracts/access/Ownable.sol:Ownable",
"label": "_owner",