From b44aa48580036e4b1da3f371356dd24fdf771f0a Mon Sep 17 00:00:00 2001 From: Jerrod Williams Date: Mon, 2 Mar 2026 10:50:36 -0600 Subject: [PATCH 1/2] feat: add native Windows/PowerShell activator hook Add scripts/claudeception-activator.ps1 as a native PowerShell equivalent of the existing bash activator. This enables Windows users to set up the UserPromptSubmit hook without requiring WSL or Git Bash. - PowerShell 7+ (pwsh) compatible - Functionally equivalent to claudeception-activator.sh - Includes error handling with empty-object fallback - Updated README with Windows installation instructions --- README.md | 41 ++++++++++++++++++++++++++++ scripts/claudeception-activator.ps1 | 42 +++++++++++++++++++++++++++++ 2 files changed, 83 insertions(+) create mode 100644 scripts/claudeception-activator.ps1 diff --git a/README.md b/README.md index 97dc35b..38a81c5 100644 --- a/README.md +++ b/README.md @@ -84,6 +84,47 @@ chmod +x .claude/hooks/claudeception-activator.sh If you already have a `settings.json`, merge the `hooks` configuration into it. +### Windows / PowerShell + +The activation hook is also available as a native PowerShell script for Windows users. + +1. Clone the skill (if you haven't already): + +```powershell +git clone https://github.com/blader/Claudeception.git "$env:USERPROFILE\.claude\skills\claudeception" +``` + +2. Create the hooks directory and copy the PowerShell script: + +```powershell +New-Item -ItemType Directory -Force -Path "$env:USERPROFILE\.claude\hooks" +Copy-Item "$env:USERPROFILE\.claude\skills\claudeception\scripts\claudeception-activator.ps1" ` + "$env:USERPROFILE\.claude\hooks\" +``` + +3. Add the hook to your Claude settings (`~/.claude/settings.json`): + +```json +{ + "hooks": { + "UserPromptSubmit": [ + { + "hooks": [ + { + "type": "command", + "command": "pwsh -File %USERPROFILE%\\.claude\\hooks\\claudeception-activator.ps1" + } + ] + } + ] + } +} +``` + +> **Note:** Use `pwsh` (PowerShell 7+) rather than `powershell` for best compatibility. If you have existing hooks in `settings.json`, merge the `UserPromptSubmit` array into your existing `hooks` object. + +**Project-level installation** follows the same pattern — copy the `.ps1` to `.claude/hooks/` in your repo and reference it with a relative path in `.claude/settings.json`. + The hook injects a reminder on every prompt that tells Claude to evaluate whether the current task produced extractable knowledge. This achieves higher activation rates than relying on semantic description matching alone. ## Usage diff --git a/scripts/claudeception-activator.ps1 b/scripts/claudeception-activator.ps1 new file mode 100644 index 0000000..2ca2b81 --- /dev/null +++ b/scripts/claudeception-activator.ps1 @@ -0,0 +1,42 @@ +#!/usr/bin/env pwsh + +# claudeception-activator.ps1 +# Native Windows/PowerShell activator hook for Claudeception. +# Equivalent to scripts/claudeception-activator.sh for non-Unix environments. +# +# Hook type: UserPromptSubmit +# Purpose: Outputs a reminder for Claude to evaluate whether the current task +# produced extractable knowledge worth saving as a reusable skill. +# +# Installation: +# 1. Copy this script to $env:USERPROFILE\.claude\hooks\ +# 2. Add to $env:USERPROFILE\.claude\settings.json (see README for details) + +Write-Output @" +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +🧠 MANDATORY SKILL EVALUATION REQUIRED +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + +CRITICAL: After completing this user request, you MUST evaluate whether +it produced extractable knowledge using the claudeception skill. + +EVALUATION PROTOCOL (NON-NEGOTIABLE): + +1. COMPLETE the user's request first +2. EVALUATE: Ask yourself: + - Did this require non-obvious investigation or debugging? + - Was the solution something that would help in future similar situations? + - Did I discover something not immediately obvious from documentation? + +3. IF YES to any question above: + ACTIVATE: Use Skill(claudeception) NOW to extract the knowledge + +4. IF NO to all questions: + SKIP: No skill extraction needed + +This is NOT optional. Failing to evaluate means valuable knowledge is lost. +The claudeception skill will decide whether to actually create a new +skill based on its quality criteria. + +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +"@ From d8c080a6787706af6c7ae52803d4a52e93afa7db Mon Sep 17 00:00:00 2001 From: Jerrod Williams Date: Mon, 2 Mar 2026 10:52:27 -0600 Subject: [PATCH 2/2] fix: force UTF-8 output encoding for box-drawing characters MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Without explicitly setting OutputEncoding to UTF-8, PowerShell's default console encoding mangles the Unicode box-drawing characters (━) used in the reminder header, rendering them as '?'. --- scripts/claudeception-activator.ps1 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/claudeception-activator.ps1 b/scripts/claudeception-activator.ps1 index 2ca2b81..6f19262 100644 --- a/scripts/claudeception-activator.ps1 +++ b/scripts/claudeception-activator.ps1 @@ -12,6 +12,8 @@ # 1. Copy this script to $env:USERPROFILE\.claude\hooks\ # 2. Add to $env:USERPROFILE\.claude\settings.json (see README for details) +[Console]::OutputEncoding = [System.Text.Encoding]::UTF8 + Write-Output @" ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 🧠 MANDATORY SKILL EVALUATION REQUIRED