Skip to content

yurukusa/cc-sequence

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

cc-sequence

npm version npm downloads

Analyze Claude Code 3-tool sequences (trigrams). What follows what follows what?

npx cc-sequence

Zero dependencies. Reads ~/.claude/projects/ directly.

Output

cc-sequence — Tool Trigram Analyzer
=====================================
Total trigrams: 142,304

Top 10 Cross-Tool Sequences (≥2 distinct tools)
------------------------------------------------
Bash→Bash→Read            ████████████████░░ 4,662  3.28%
Read→Bash→Bash            █████████████░░░░░ 3,270  2.30%
Bash→Read→Bash            █████████████░░░░░ 3,176  2.23%
Edit→Read→Edit            ████████████░░░░░░ 2,444  1.72%
Bash→Read→Read            █████████████░░░░░ 2,365  1.66%
Read→Edit→Edit            ████████████░░░░░░ 2,299  1.62%
Grep→Read→Read            ███████████░░░░░░░ 2,187  1.54%
Edit→Read→Read            ██████████░░░░░░░░ 1,948  1.37%
Edit→Bash→Bash            ██████████░░░░░░░░ 1,948  1.37%
Read→Grep→Read            █████████░░░░░░░░░ 1,702  1.20%

Top 10 ABA Patterns (X→Y→X — ping-pong loops)
-----------------------------------------------
Bash→Read→Bash            ████████████████░░ 3,176  2.23%
Edit→Read→Edit            ████████████░░░░░░ 2,444  1.72%
Read→Edit→Read            ██████████░░░░░░░░ 2,090  1.47%
Read→Grep→Read            █████████░░░░░░░░░ 1,702  1.20%
Read→Bash→Read            █████████░░░░░░░░░ 1,702  1.20%
Bash→Write→Bash           █████████░░░░░░░░░ 1,922  1.35%

What it tells you

  • Bash→Read→Bash (2.23%) — run, check a file, run again. The debugging ping-pong.
  • Edit→Read→Edit (1.72%) — edit, verify what you wrote, edit again. The micro-fix cycle.
  • After Edit→Bash: 53.8% is another Bash — execution chains, not results inspection.
  • After Edit→Read: 67.3% goes back to Edit — reading confirms → immediately fix again.
  • Grep→Read→Edit (1.00%) — search, read the match, fix it. The fastest path to a fix.

The core loops

The Debugging Loop

Bash → Read → Bash    (3,176×)

Run a command. Check a file. Run again.

The Micro-Edit Cycle

Edit → Read → Edit    (2,444×)

Edit. Verify what you wrote. Edit again (67% of the time).

The Fix-After-Search

Grep → Read → Edit    (1,425×)

Search for a pattern. Read the file containing it. Edit immediately.

The Investigation Chain

Grep → Read → Read    (2,187×)

Find a pattern. Start reading. Keep reading.

Query a specific pair

npx cc-sequence --after=Edit→Bash    # what follows Edit→Bash?
npx cc-sequence --after=Grep→Read    # what follows Grep→Read?
npx cc-sequence --after=Read→Edit    # what follows Read→Edit?

Options

npx cc-sequence --json              # Raw JSON output
npx cc-sequence --after=A→B        # What's the 3rd tool after A→B?

Browser version

yurukusa.github.io/cc-sequence — drag and drop your projects folder.

Part of cc-toolkit — tools for understanding your Claude Code sessions.


Want to optimize how Claude Code uses its tools?

Claude Code Ops Kit ($19) — 16 production hooks + 5 templates + 3 tools. Built from 160+ hours of autonomous operation.


Source: yurukusa/cc-sequence

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors