syou6162

Cchook — Data skill for Claude Code

Data community

A CLI tool that simplifies Claude Code's hook system by replacing complex JSON configurations with clean YAML syntax, template-based data access, and conditional logic.

How to install Cchook

This entry records only its repository, not the path inside it, so there is no exact command to give. Open syou6162/cchook and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Cchook does

A CLI tool that simplifies Claude Code's hook system by replacing complex JSON configurations with clean YAML syntax, template-based data access, and conditional logic.

Alternatives in Data

  • n8n Code JavaScript — JavaScript in n8n Code nodes with data access patterns 3.6k ★
  • Portaljs Architect — Recommend a data-portal architecture (storage, compute, catalog, access, hosting, metadata) from your needs, t 2.3k ★
  • Sprite Gen — Generate clean 2D game sprites & animation atlases — component-row pipeline: state rows, alpha cleanup, frame 763 ★

README

cchook

  ██████╗  ██████╗ ██╗  ██╗  ██████╗   ██████╗  ██╗  ██╗
 ██╔════╝ ██╔════╝ ██║  ██║ ██╔═══██╗ ██╔═══██╗ ██║ ██╔╝
 ██║      ██║      ███████║ ██║   ██║ ██║   ██║ █████╔╝
 ██║      ██║      ██╔══██║ ██║   ██║ ██║   ██║ ██╔═██╗
 ╚██████╗ ╚██████╗ ██║  ██║ ╚██████╔╝ ╚██████╔╝ ██║  ██╗
  ╚═════╝  ╚═════╝ ╚═╝  ╚═╝  ╚═════╝   ╚═════╝  ╚═╝  ╚═╝

A CLI tool for executing hooks at various stages of Claude Code operations.

Background & Motivation

Claude Code has a powerful [hook system](https://docs.anthropic.com/ja/docs/claude-code/hooks) that allows executing custom commands at various stages of operation. However, writing hooks can become unwieldy for several reasons:

  • Complex JSON configuration
    • Hooks are configured in JSON format within settings, making them hard to read and maintain
  • Repetitive jq processing
    • When using multiple elements from input JSON, you need temporary files and repeated jq filters
  • Single-line limitations
    • JSON strings don't support multi-line formatting like YAML, leading to very long, hard-to-read command lines

For example, a simple Stop hook that sends notifications via [ntfy](https://ntfy.sh) becomes a complex one-liner:

{
  "hooks": {
    "Stop": [
      {
        "matcher": "",
        "hooks": [
          {
            "type": "command",
            "command": "transcript_path=$(jq -r '.transcript_path') && cat \"${transcript_path}\" | jq -s 'reverse | map(select(.type == \"assistant\" and .message.content[0].type == \"text\")) | .[0].message.content[0]' > /tmp/cc_ntfy.json && ntfy publish --markdown --title 'Claude Code' \"$(cat /tmp/cc_ntfy.json | jq -r '.text')\""
          }
        ]
      }
    ]
  }
}

**cchook** solves these problems by providing:

  • YAML configuration
    • Clean, readable multi-line configuration
  • Template syntax
    • Simple {.field} syntax for accessing JSON data with full jq query support
  • Conditional logic
    • Built-in conditions for common scenarios (file exten