From claude-usage-toolkit
Use when estimating the COCOMO development cost or hours saved for code committed by a specific author across multiple git repos, using scc at a given hourly rate.
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-usage-toolkit:scc-cocomoThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Uses `scc` (Sloc Cloc and Code) to estimate what committed code would cost to produce conventionally, using the COCOMO organic model. Useful for quantifying AI-assisted productivity in reports.
Uses scc (Sloc Cloc and Code) to estimate what committed code would cost to produce conventionally, using the COCOMO organic model. Useful for quantifying AI-assisted productivity in reports.
Check for scc before running — install if missing:
if ! which scc &>/dev/null; then
if which brew &>/dev/null; then
brew install scc
elif which go &>/dev/null; then
go install github.com/boyter/scc/v3@latest
else
# Linux direct binary — install to ~/.local/bin (user-writable)
mkdir -p ~/.local/bin
curl -L "https://github.com/boyter/scc/releases/latest/download/scc_Linux_x86_64.tar.gz" \
| tar xz -C ~/.local/bin scc
export PATH="$HOME/.local/bin:$PATH"
fi
fi
| Input | How to get it |
|---|---|
| Hourly rate | Ask the user |
| Annual wage | hourly × 2080 |
| Author handle | Git author name (e.g. jeremypng) |
| Date range | Since/until dates |
| Repo root | Directory containing the git repos |
scc requires real files — it cannot operate on raw diff output. The practical approach is to collect every file added or modified by the author in the date range, then run scc on those files at HEAD.
Tradeoff: This measures the full current state of touched files, not strictly the committed delta. For COCOMO purposes this is acceptable — COCOMO estimates the value of the work product, not the incremental diff.
AUTHOR="jeremypng"
SINCE="2026-04-13"
UNTIL="2026-05-19"
ANNUAL_WAGE=291200 # $140/hr × 2080
TMPDIR=$(mktemp -d)
git log --since="$SINCE" --until="$UNTIL" \
--author="$AUTHOR" --diff-filter=AM \
--name-only --format="" | sort -u | while read f; do
mkdir -p "$TMPDIR/$(dirname "$f")"
git show HEAD:"$f" > "$TMPDIR/$f" 2>/dev/null || true
done
scc --avg-wage "$ANNUAL_WAGE" --cocomo-project-type organic "$TMPDIR"
rm -rf "$TMPDIR"
COMBINED=$(mktemp -d)
for repo in /path/to/repos/*/; do
[ -d "$repo/.git" ] || continue
git -C "$repo" log --since="$SINCE" --until="$UNTIL" \
--author="$AUTHOR" --diff-filter=AM \
--name-only --format="" | sort -u | while read f; do
mkdir -p "$COMBINED/$repo/$(dirname "$f")"
git -C "$repo" show HEAD:"$f" > "$COMBINED/$repo/$f" 2>/dev/null || true
done
done
scc --avg-wage "$ANNUAL_WAGE" --cocomo-project-type organic "$COMBINED"
rm -rf "$COMBINED"
Note: The combined run produces a higher estimate than the sum of per-repo runs because COCOMO scales nonlinearly with total project size. Use the combined number as the headline figure.
From scc output, extract:
Hours saved = Estimated Cost ÷ hourly rate
ROI ratio = Estimated Cost ÷ actual AI spend
| Metric | Value |
|---|---|
| Total SLOC | X |
| COCOMO Estimated Cost | $X |
| Estimated Hours | X hrs |
| Actual AI Cost | $X |
| Cost Ratio | ~Nx ROI |
| Schedule Effort | X months |
| People Required | X |
.arc, .fw, .eks-sg-rfc1918 are git worktrees — [ -d "$repo/.git" ] will return false for them if .git is a file pointer, so they'll be skipped automatically. Verify with git -C "$repo" rev-parse --is-inside-work-tree.--avg-wage takes annual salary, not hourly. Always multiply: hourly × 2080.npx claudepluginhub csbproserve/claude-usage-toolkit --plugin claude-usage-toolkitSearches MemPalace before answering questions about past work, people, projects, or prior decisions. Returns verbatim stored content instead of guessing from model memory.
Guides Payload CMS config (payload.config.ts), collections, fields, hooks, access control, APIs. Debugs validation errors, security, relationships, queries, transactions, hook behavior.
Implements vector databases with Pinecone, Weaviate, Qdrant, Milvus, pgvector for semantic search, RAG, recommendations, and similarity systems. Optimizes embeddings, indexing, and hybrid search.