Skip to content
AI & Agents
Hook

Hooks

What qiushi-skill runs automatically, and when. A hook is a command Claude Code fires at a fixed moment, without you asking for it.

From plugin
qiushi-skill
3.9k11 skills2 agents10 commands1 hook

Claude Code

> /plugin marketplace add hughyau/qiushi-skill
> /plugin install qiushi-skill@qiushi-skill

What fires, and when

SessionStart

Fires once when a session begins, and again after a context compaction. It is where a plugin sets up its environment, or restores state the compaction dropped.

  • Matchesstartup|clear|compact"${CLAUDE_PLUGIN_ROOT}/hooks/run-hook.cmd" session-start
Read hooks/hooks.json

Where it lives

  • hooks/session-start.ps1GitHub
    Read the script
    [CmdletBinding()]
    param()
    
    Set-StrictMode -Version Latest
    $ErrorActionPreference = "Stop"
    [Console]::OutputEncoding = [System.Text.UTF8Encoding]::new($false)
    
    function ConvertTo-AsciiJsonString {
        param([string]$Value)
    
        $builder = [System.Text.StringBuilder]::new()
        [void]$builder.Append('"')
    
        for ($i = 0; $i -lt $Value.Length; $i++) {
            $char = $Value[$i]
            $codePoint = [int][char]$char
    
            if ($codePoint -eq 34) {
                [void]$builder.Append('\"')
                continue
            }
    
            if ($codePoint -eq 92) {
                [void]$builder.Append('\\')
                continue
            }
    
            if ($codePoint -eq 8) {
                [void]$builder.Append('\b')
                continue
            }
    
            if ($codePoint -eq 12) {
                [void]$builder.Append('\f')
                continue
            }
    
            if ($codePoint -eq 10) {
                [void]$builder.Append('\n')
                continue
            }
    
            if ($codePoint -eq 13) {
                [void]$builder.Append('\r')
                continue
            }
    
            if ($codePoint -eq 9) {
                [void]$builder.Append('\t')
                continue
            }
    
            if ([char]::IsHighSurrogate($char) -and ($i + 1) -lt $Value.Length -and [char]::IsLowSurrogate($Value[$i + 1])) {
                [void]$builder.AppendFormat('\u{0:x4}\u{1:x4}', [int][char]$char, [int][char]$Value[$i + 1])
                $i++
                continue
            }
    
            if ($codePoint -lt 32 -or $codePoint -gt 126) {
                [void]$builder.AppendFormat('\u{0:x4}', $codePoint)
                continue
            }
    
            [void]$builder.Append($char)
        }
    
        [void]$builder.Append('"')
        $builder.ToString()
    }
    
    $scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
    $pluginRoot = Split-Path -Parent $scriptDir
    $skillPath = Join-Path $pluginRoot "skills\arming-thought\SKILL.md"
    
    if (-not (Test-Path -LiteralPath $skillPath)) {
        throw "Missing skill file: $skillPath"
    }
    
    $armingThoughtContent = Get-Content -LiteralPath $skillPath -Raw -Encoding UTF8
    $sessionContext = @"
    <QIUSHI_SKILL>
    已加载 qiushi:arming-thought。请先遵守用户指令、项目约束和宿主平台规则,再在明确适用时把这份方法论作为补充的路由与校验框架。
    
    $armingThoughtContent
    
    </QIUSHI_SKILL>
    "@
    
    $sessionContextJson = ConvertTo-AsciiJsonString -Value $sessionContext
    
    if ($env:CURSOR_PLUGIN_ROOT) {
        @"
    {
      "additional_context": $sessionContextJson
    }
    "@
    } elseif ($env:CLAUDE_PLUGIN_ROOT) {
        @"
    {
      "hookSpecificOutput": {
        "hookEventName": "SessionStart",
        "additionalContext": $sessionContextJson
      }
    }
    "@
    } else {
        @"
    {
      "additional_context": $sessionContextJson
    }
    "@
    }
    

Read the script before you install anything that runs on your machine. This is the one part of a plugin that acts without being asked.

@hughyau
Ships withqiushi-skill

语言: 简体中文 | English 🌟 "我们的同志在困难的时候,要看到成绩,要看到光明,要提高我们的勇气。" ✊ "世界上怕就怕'认真'二字。" 你的 AI 不应该是一个唯唯诺诺的工具。它应该是一个先看事实、再下判断的行动者。 「求是 Skill」是一个 AI Agent Skills 合集,从经典唯物辩证法与实践哲学中提炼出一条总原则和九大方法论工具,系统性地武装 AI 的大脑。不是口号,不是鸡汤,而是可操作的方法论集合。 每一条方法都有据可依、有迹可循,直接引用经典著作原文(详见各 skill 目录下的

3.9k11 skills2 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
3.9k
Star history of hughyau/qiushi-skill on GitHub, a chart by star-history.com

More plugins that ship hooks.

allium

allium

Gives Claude Code agents a structured specification language called Allium. Skills let you write, distil from existing code, elicit requirements into, and generate tests from Allium specs.

7 skills+2546
@juxt@juxt
Install Plugin
taskmaster

taskmaster

Taskmaster is a completion guard for coding agents. It addresses a common failure mode: the agent makes partial progress, writes a summary, and stops before the user goal is actually finished.

1 skill2 hooks537
@blader@blader
Install Plugin
copilot-studio

copilot-studio

Lets you write, test and troubleshoot Microsoft Copilot Studio standard agents by editing their YAML files from your terminal or editor, instead of working only in the portal. Covers adding actions, adaptive cards, knowledge sources and generative answers.

31 skills+2500
@microsoft@microsoft
Install Plugin
codex-skill

codex-skill

Give Claude Code a "second opinion" by letting it consult OpenAI's Codex CLI for independent verification.

1 skill1 hook233
@cathrynlavery@cathrynlavery
Install Plugin
harness

harness

A practical configuration kit for Claude Code, Codex, and other coding agents. It contains architectural principles, enforcement hooks, skills, drop-in rules, starter templates, and dynamic-workflow commands.

60 skills+2218
@anastasiyaw@anastasiyaw
Install Plugin
uipath

uipath

UiPath Agent Skills give AI coding agents the domain knowledge to build, run, test, and deploy UiPath automations and agents, directly from your development environment.

34 skills+2186
@uipath@uipath
Install Plugin

Questions about the hooks in qiushi-skill.

Which coding agents can use the hooks in qiushi-skill?
The hooks in qiushi-skill install in Claude Code and Cursor: each runs Claude Code hooks from .claude/settings.json, so copy the hooks there.