본문으로 건너뛰기
cccskills
무료GitHub에 공개

cost-speed-meter

Use when the user asks to measure command execution time or optimize a feedback loop. Records explicit measurements and recommends faster alternatives such as unit tests versus integration tests. It is opt-in; it does not run on every command.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(3)

  • SKILL.md4.5 KB
  • meter-hook.sh1.6 KB
  • meter.sh4.2 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Cost & Speed Meter

Track execution time. Suggest faster paths. Prove optimizations worked.

Measure only commands the user asks to compare. Across sessions, the optional metrics file can show trends without adding noise or overhead to normal work.

When to Use

  • User asks to measure tests, builds, or lint commands
  • User asks: "is this slow?", "how long did that take?", "what's the slowest operation?"
  • User asks: "what's a faster way to do this?", "what's the quick feedback loop?"
  • User is optimizing something — measure before, optimize, measure after to prove it worked
  • Working across multiple repos — compare execution costs

What It Tracks

OperationTracked?Example
pytest, jest, cargo test, go test✓ Tests45s
npm run build, cargo build, pip install✓ Builds8s
ruff check ., eslint ., cargo clippy✓ Lint2s
git push, git pull✓ VCS3s
Custom commands✓ Named in .claude/metrics.jsoncustom:deploy

Output

Command Reports

On demand:

Use `skills/cost-speed-meter/meter.sh show` for current measurements or
`skills/cost-speed-meter/meter.sh report` for a weekly summary.

Fast-Path Recommendations

Auto-detect patterns:

Full suite: pytest (45s)
Unit only: pytest -m 'not integration' (15s)

→ Recommendation: For quick feedback, use unit tests (3x faster)
  Use full suite before pushing.

Per-language:

  • Python: pytest -m 'not slow', pytest tests/unit/
  • Node: npm run test:unit, vitest --run (vs jest)
  • Rust: cargo test --lib (vs full + integration)
  • Go: go test ./... (vs go test ./... -v with benchmarks)

Metrics File (.claude/metrics.json, gitignored)

{
  "repo": "code-to-docs",
  "timestamp": "2026-08-20T14:30:00Z",
  "operations": [
    {
      "name": "tests",
      "category": "test",
      "last_run_seconds": 45,
      "last_run_time": "2026-08-20T14:30:00Z",
      "run_count_7d": 12,
      "avg_7d": 43,
      "trend_7d": "+2s",
      "trend_pct": "+4.7%"
    },
    {
      "name": "unit_tests",
      "category": "test",
      "last_run_seconds": 15,
      "run_count_7d": 4,
      "avg_7d": 14
    },
    {
      "name": "build",
      "category": "build",
      "last_run_seconds": 8,
      "run_count_7d": 8,
      "avg_7d": 8.2,
      "trend_7d": "-0.5s"
    }
  ],
  "slowest_op": {
    "name": "tests",
    "seconds": 45,
    "reason": "integration tests (50 of 1000 tests)"
  },
  "recommendations": [
    "For quick feedback, run unit tests (15s vs 45s) — 3x faster",
    "Test suite grew 4.7% last week; check for new integration tests"
  ]
}

How It Saves Tokens

Feedback loops:

  • Run fast path (unit tests 15s) instead of full suite (45s)
  • 10 iterations per day × 30s saved = 5 min/day = fewer re-runs
  • Fewer retries = fewer tokens

Prevents wasted optimization:

  • Data-driven: you know tests are slow, not build (actual problem)
  • Don't optimize wrong thing (wastes time, tokens)

Team alignment:

  • Everyone sees same metrics
  • "Let's optimize integration tests" (shared understanding)
  • No "why is my machine slow?" guessing

Integration with RTK

RTK compresses output noise.
Meter tracks execution time.

You: pytest
RTK: filters output (-85% noise)
Meter: records 45s
Status: [METRICS: tests 45s] [RTK: -85% output]

No conflict, complementary.

Per-Language Detection

Auto-detects test framework and suggests fast paths:

# Python
if "pytest.ini" or "pyproject.toml" with [tool.pytest]:
  fast_path = "pytest -m 'not slow'"
  full_path = "pytest"
// Node
if "vitest.config.ts" exists:
  fast_path = "vitest --run"  // unit only
  full_path = "vitest --run --include='**/*.integration.ts'"
// Rust
if "Cargo.toml" with [dev-dependencies]:
  fast_path = "cargo test --lib"  // unit only
  full_path = "cargo test"

Behavioral Rules

  • Opt-in only — never intercept or time unrelated commands
  • No alerts — just data, no noise
  • Trends — report 7-day moving average, flag +10% growth
  • Respect RTK — if RTK is filtering, meter still gets accurate time
  • No command interception — measurement is explicit and does not change command output

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

User asks for design, planning, or approach exploration before implementation. Covers new features, components, refactors, or architecture decisions. Creates design docs and proposes approaches with trade-offs.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Benkapner/claude-code-basecamp182026년 10월 1일 업데이트

ci-guard

무료

Use when starting work in a repository under repositories/ that may lack CI configuration. Detects missing CI workflows (GitHub Actions, GitLab CI, CircleCI) and alerts the user to add one. Skips repos marked as research-only.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Benkapner/claude-code-basecamp182026년 10월 1일 업데이트

Team conventions for Python development — credentials, API clients, LLM response parsing, testing patterns, and data pipeline structure. Covers dotenv loading, retry logic, secret validation, and pipeline anti-patterns.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Benkapner/claude-code-basecamp182026년 10월 1일 업데이트

Measurement-driven code refactoring — profile before changing, measure after, keep only if metrics improve. Covers complexity reduction, extraction patterns, and bulk refactoring for mechanical changes across many files.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Benkapner/claude-code-basecamp182026년 10월 1일 업데이트

Scan projects for credential leaks, secrets in code, insecure patterns, LLM API key exposure, PII leakage to external AI services, and .env/.gitignore misconfigurations. Especially useful for data and API integrations, regardless of implementation language.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Benkapner/claude-code-basecamp182026년 10월 1일 업데이트

Use when committing or pushing changes and the repository needs a version bump. Analyzes commits using conventional commit prefixes to determine whether the next release is a major, minor, or patch increment. Also use when the user asks about versioning, release planning, or changelog generation.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Benkapner/claude-code-basecamp182026년 10월 1일 업데이트

Benkapner의 스킬 모두 보기

이 스킬의 문제 신고