code-yeongyu/oh-my-openagent / packages/shared-skills/skills/coding-agent-sessions
coding-agent-sessions
VerifiedFinds, reads, and reconstructs coding-agent sessions across Codex, Claude, OpenCode, OMO/Senpi, and other local agent logs. Use when asked to find or search past sessions, transcripts, or subagent runs, or to recover what an earlier session did.
scripts/agent_sessions/jsonio.py
View on GitHubfrom __future__ import annotations
import json
from collections.abc import Iterator
from pathlib import Path
from typing import TYPE_CHECKING
from .types import Json, JsonMap
if TYPE_CHECKING:
def _loads(_text: str) -> Json: ...
else:
def _loads(text_value: str) -> Json:
return json.loads(text_value)
def as_map(value: Json | None) -> JsonMap | None:
return value if isinstance(value, dict) else None
def text(value: Json | None) -> str | None:
return value if isinstance(value, str) else None
def int_value(value: Json | None) -> int | None:
return value if isinstance(value, int) else None
def parse_json_text(value: str) -> Json | None:
try:
return _loads(value)
except json.JSONDecodeError:
return None
def read_json(path: Path) -> Json | None:
try:
return parse_json_text(path.read_text(encoding="utf-8", errors="replace"))
except OSError:
return None
def iter_jsonl(path: Path) -> Iterator[JsonMap]:
try:
with path.open(encoding="utf-8", errors="replace") as handle:
for line in handle:
value = parse_json_text(line)
if isinstance(value, dict):
yield value
except OSError:
return
def dumps(value: JsonMap) -> str:
return json.dumps(value, ensure_ascii=False, indent=2)
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 467k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |