thedotmack/claude-mem / plugin/skills/agent-cost-report
agent-cost-report
VerifiedBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json.
scripts/tests/test_render_encoding.py
View on GitHub"""Portable date formatting."""
import re
import unittest
from pathlib import Path
import _paths
class DateFormatting(unittest.TestCase):
def test_day_label_uses_unpadded_day(self):
from acr import render
self.assertEqual(render.day_label("2026-10-02"), "Fri Oct 2")
self.assertEqual(render.day_label("2026-10-02", short=True), "Oct 2")
def test_date_pill_retains_single_day_and_range_labels(self):
from acr import render
scope = {"kind": "period"}
cases = [
("2026-10-02", "2026-10-03", "Oct 2, 2026 (PT)"),
("2026-10-02", "2026-10-04", "Oct 2 – 3, 2026 (PT)"),
("2026-09-29", "2026-10-03", "Sep 29 – Oct 2, 2026 (PT)"),
]
for start, end, expected in cases:
with self.subTest(start=start, end=end):
self.assertEqual(render.date_pill({"start_pt": start, "end_exclusive_pt": end}, scope), expected)
def test_sources_use_no_platform_specific_strftime_flags(self):
# "%-d" (no zero padding) is a glibc/BSD extension: Windows strftime raises
# "ValueError: Invalid format string". Compose the day as f"{d:%b} {d.day}" instead.
sources = [Path(_paths.ACR_PY), *sorted(Path(_paths.SCRIPTS, "acr").glob("*.py"))]
hits = [f"{source.name}:{number}" for source in sources
for number, line in enumerate(source.read_text(encoding="utf-8").splitlines(), 1)
if re.search(r"%-[A-Za-z]", line)]
self.assertEqual(hits, [])
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| deprecation-and-migrationaddyosmani/agent-skillsManages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when migrating a database schema in production, such as renaming or dropping a column without downtime (expand/contract). Use when deciding whether to maintain or sunset existing code. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| performance-optimizationaddyosmani/agent-skillsOptimizes application performance across frontend, backend, queries, and databases. Use when performance requirements exist, when you suspect performance regressions, when Core Web Vitals or load times need improvement, when N+1 query patterns need fixing, or when profiling reveals bottlenecks. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| agent-cost-reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |
| backup-setupthedotmack/claude-memSet up, check, or restore local claude-mem database snapshots. Use when the user says "set up backups", "back up my memories", "backup status", or "restore my database". | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |