notebooklm
VerifiedInstall, authenticate, troubleshoot, and operate Gemini Notebook through the notebooklm-py CLI or typed async Python API. Use for notebook and source management, grounded chat and research, and artifact generation or download when the user mentions Gemini Notebook, notebooklm-py, the notebooklm CLI, or its Python API. Do not use for the generic Gemini API or unrelated content creation.
scripts/_ci_progress.py
View on GitHub"""Live-CI reporting for caller-validated, resource-free diagnostics.
Callers must supply only owned labels, counts and allowlisted status values;
credential scrubbing alone cannot make upstream exception bodies safe to publish.
"""
from __future__ import annotations
import os
import re
import sys
from collections.abc import Iterator
from contextlib import contextmanager
from datetime import datetime, timezone
from pathlib import Path
from typing import TextIO
@contextmanager
def open_progress_stream(fd: int) -> Iterator[TextIO | None]:
"""Best-effort duplicate; setup and final flush must not replace the verdict."""
duplicate: int | None = None
try:
duplicate = os.dup(fd)
stream = os.fdopen(duplicate, "w", encoding="utf-8")
except (OSError, ValueError):
if duplicate is not None:
try:
os.close(duplicate)
except OSError:
pass
print(
"WARNING: could not open CI progress stream; see normal report",
file=sys.stderr,
flush=True,
)
yield None
return
try:
yield stream
finally:
try:
stream.close()
except OSError:
print("WARNING: could not close CI progress stream", file=sys.stderr, flush=True)
def safe_test_name(node_id: str) -> str:
"""Keep source identifiers, excluding parametrized resource handles."""
name = node_id.split("[", 1)[0]
if re.fullmatch(r"tests/e2e/(?:\w+/)*test_\w+\.py(?:::\w+)*", name):
return name
return "unavailable test name"
def write_summary(markdown: str) -> None:
path = os.environ.get("GITHUB_STEP_SUMMARY")
if path:
try:
with Path(path).open("a", encoding="utf-8") as stream:
stream.write(markdown + "\n")
except OSError:
# Reporting must never replace the command's original failure.
print("WARNING: could not write CI step summary", file=sys.stderr, flush=True)
def report(message: str, *, summary: bool = False, error: bool = False) -> None:
timestamp = datetime.now(timezone.utc).strftime("%H:%M:%S UTC")
print(f"[{timestamp}] {message}", file=sys.stderr if error else sys.stdout, flush=True)
if summary or error:
write_summary(f"- {message}")
if error and os.environ.get("GITHUB_ACTIONS") == "true":
escaped = message.replace("%", "%25").replace("\r", "%0D").replace("\n", "%0A")
print(f"::error::{escaped}", flush=True)
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 |
| 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 |