Skip to content

Instantly share code, notes, and snippets.

View CJHwong's full-sized avatar
🧠

Hoss CJHwong

🧠
View GitHub Profile
@CJHwong
CJHwong / README.md
Last active May 18, 2026 15:07
Claude Code prompt PII hook with local OPF int8 detector

Claude Code Prompt PII Hook — moved

This project moved to github.com/CJHwong/agent-seatbelt under hooks-opf/.

The new version adds:

  • PostToolUse blocking — catches PII in tool responses before the LLM sees them next turn, in addition to the prompt-side check.
  • Codex support — auto-detects ~/.codex/ and wires hooks there too.
  • Block-level tiersPII_BLOCK_LEVEL=off|relaxed|standard|strict to choose what fires.
  • Per-prompt bypass — prefix a prompt with pii:off to skip the check once.
@CJHwong
CJHwong / README.md
Last active March 26, 2026 15:25
Agent team skills for Claude Code: multi-agent research and implementation workflows

Agent Team Skills for Claude Code

Two slash-command skills that spin up multi-agent teams in Claude Code.

Skills

/team-research

Spawns a read-only research team (3 agents) to investigate a question from multiple angles. No code changes. Agents cite file:line, cross-check each other's findings, and the lead synthesizes agreements/contradictions into options with trade-offs.

/team-implement

@CJHwong
CJHwong / README.md
Last active May 20, 2026 03:45
Claude Code rich status line — rate limits, context, tokens, cost, uptime

Claude Code Status Line

A rich status line for Claude Code that shows everything you need at a glance.

Claude Sonnet 4 high │ 5h:6%→1h46m │ 7d:26%→03/24 │ ctx:3% ↑3.7k ↓8.4k │ $0.72 │ ⏱11m api:3m │ +156/-23 │ myproject:main

When extended thinking is off, the effort level is hidden:

@CJHwong
CJHwong / README.md
Last active March 16, 2026 08:24
Claude Code + ntfy.sh: Mobile notifications & remote tool approval via action buttons

Claude Code + ntfy.sh: Mobile Notifications & Remote Approval

Push Claude Code notifications to your phone via ntfy.sh, and approve/reject tool calls with action buttons — no server required.

Scripts

Script Hook Purpose
ntfy_notify.sh Notification Push alerts when Claude needs input or finishes a task
ntfy_approve.sh PreToolUse Approve/reject tool calls from your phone
@CJHwong
CJHwong / my.sb
Created February 17, 2026 07:16
Sandbox.sh
;; my.sb — Personalized Seatbelt profile for macOS
;;
;; Policy: deny-default → allow reads globally → deny reads on secrets → allowlist writes only
;;
;; Parameters (injected by wrapper):
;; _HOME — user home directory
;; _PROJECT_DIR — resolved project working directory
;; _TMPDIR — macOS per-user temp directory
(version 1)
@CJHwong
CJHwong / README.md
Last active January 29, 2026 07:26
Git vs JJ Rebase Conflict Demo

Git vs JJ Rebase Conflict Demo

展示 Git 和 Jujutsu (jj) 在處理多提交 rebase 衝突時的差異。

前置需求

確保已安裝 gitjj

# macOS/Linux (Homebrew)
@CJHwong
CJHwong / 2025-ai-year-in-review.html
Created January 1, 2026 10:29
2025 AI 發展回顧
<!DOCTYPE html>
<html lang="C">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width,height=device-height,initial-scale=1.0" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<meta property="og:type" content="website" />
<meta name="twitter:card" content="summary" />
@CJHwong
CJHwong / tools.json
Created August 30, 2025 16:38
Atlassian MCP (2025-08-31)
[
{
"type": "function",
"function": {
"name": "mcp__atlassian__atlassianUserInfo",
"description": "Get current user info from Atlassian",
"parameters": {
"type": "object",
"properties": {},
"additionalProperties": false,
@CJHwong
CJHwong / README.md
Last active August 30, 2025 17:20
Claude Code Prompt Structure

Claude Code: Initial Prompt Analysis

This gist contains captured data representing the initial prompt payload sent by Claude Code v1.0.98.

The purpose of this project is purely for educational and research use, offering insight into how a sophisticated AI agent is instructed and contextualized for complex software engineering tasks.


Initial Prompt Token Usage: A Quick Summary

@CJHwong
CJHwong / oss.py
Last active August 8, 2025 08:06
Operating System Support, is an AI agent help interacting with your OS.
#!/usr/bin/env -S uv run --script
# /// script
# requires-python = ">=3.11"
# dependencies = [
# "ollama",
# ]
# ///
import argparse
import contextlib
import datetime