Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
44 changes: 44 additions & 0 deletions scripts/claudeception-activator.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/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)

[Console]::OutputEncoding = [System.Text.Encoding]::UTF8

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.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
"@