Skip to content
Development
Skill

/cco-patterns

Share learned file patterns across a team — export an anonymized digest of what's usually waste/useful/co-edited, and import a teammate's so a fresh clone benefits day one

From plugin
claude-context-optimizer
11022 skills1 agent6 hooks
Install
$ npx -y skills add egorfedorov/claude-context-optimizer --skill cco-patterns --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/cco-patterns

Context preview

The summary Claude sees to decide when to auto-load this skill.

Share learned file patterns across a team — export an anonymized digest of what's usually waste/useful/co-edited, and import a teammate's so a fresh clone benefits day one

SKILL.md

cco-patterns.SKILL.md
name: cco-patterns
description: Share learned file patterns across a team — export an anonymized digest of what's usually waste/useful/co-edited, and import a teammate's so a fresh clone benefits day one
license: MIT
argument-hint: "[export [--out <file>] | import <file> | show]"
allowed-tools: [Bash, Read]

CCO Patterns — share what the project has learned

Patterns are learned per-machine, per-project: which files are usually waste, which are usually useful, which get edited together. A teammate's fresh clone starts blind and re-learns the same lessons by wasting the same tokens.

This makes them portable. Run from the plugin root (the directory containing `src/patterns-share.js`).

Parse $ARGUMENTS:

`export`

node src/patterns-share.js export

Writes `.cco/patterns.digest.json` in the project (override with `--out`).

The digest contains **relative paths and counts only** — no file contents, no absolute paths, no home directory. Entries that can't be expressed relative to the project root are dropped, and the command reports how many. The file is audited before writing; if anything identifying slipped in, it refuses to write rather than produce a file someone might commit.

Tell the user the digest is safe to commit, and that committing it is the point: teammates get it on clone.

`import <file>`

node src/patterns-share.js import .cco/patterns.digest.json

Merges into the current project's patterns. **Imported data is stored as a separate prior — it never touches the user's own counts.**

This matters and is worth saying out loud: `confidence` is computed from how many sessions *this machine* observed a file in. Folding someone else's sessions into that number would make the user's own confidence a lie. So the import fills in only where the user has no observations of their own — the fresh-clone case — and local evidence always wins.

The digest is audited on the way in too, since it came from elsewhere. A file with absolute paths or traversal segments is rejected, not sanitized.

`show`

node src/patterns-share.js show

Lists what was imported for this project and how each file is labelled.

Suggesting this

Worth offering when:

  • The user is setting up a repo for a team and asks about onboarding cost.
  • A project has meaningful waste history (`/cco-shield` shows repeat offenders)

that every teammate will otherwise rediscover.

  • Someone just cloned a repo that already has `.cco/patterns.digest.json` —

offer to import it.

Read more
Ships withclaude-context-optimizer

Claude Code plugin that tracks token usage, identifies wasted context, and saves 30-50% on API costs. Heatmaps, ROI reports, budget alerts, efficiency scores, git-aware suggestions — all local, zero config.

Get the whole plugin
Stats
111
Stars
11
Forks
Active
Maintenance
JavaScript
Language
MIT
License
12d ago
Last commit
6mo ago
Created

Repo: egorfedorov/claude-context-optimizer

Other skills on claude-context-optimizer.