observation

Query hook event rows and write finding transitions in a SQLite observation sink.

Updated Jun 30, 2026
One-click install
npx skills add https://github.com/bsamiee/Rasm --skill observation-bsamiee
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: observation
Source: https://github.com/bsamiee/Rasm/tree/main/.claude/skills/observation
Command: npx skills add https://github.com/bsamiee/Rasm --skill observation-bsamiee

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Agents and checkers need a durable, queryable record of hook events and code findings across sessions, but raw transcripts and checker output are ephemeral and unstructured. This Skill defines the SQLite sink schema, views, finding state machine, and scripts that let agents read event rows and write finding rows consistently. ## Core Features & Use Cases - Event Sink & Views: Read hook event rows (SessionStart, PostToolUse, SubagentStop, turn steps) through prepared views like agent_cost, turn_cost, denials, and session_audit using parameterized sqlite3 queries. - Finding Lifecycle Management: Propose, confirm, move, close, and waive findings through transactional scripts (lifecycle.sql, transition.sql, batch.sql) with hash-based staleness detection. - Checker Integration: Confirm diagnostics from ast-grep, ruff, biome, and Roslyn SARIF output as site rows via dedicated mapping scripts. - Use Case: After a Stop hook delivers open findings on a branch, an agent reads the ids through confirmed_findings, fixes the sites, and writes one fixed transition per id with the edit's tool_use_id. ## Quick Start Use the observation skill to read the open findings for this worktree and write a transition for each one you resolve.

Frequently Asked Questions about observation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I query agent hook events from a SQLite database?▼

Run sqlite3 with -json and bind parameters via -cmd ".param set :name value" against the observation.db sink. Prepared views like session_audit, agent_cost, and denials filter by session_id or prompt_id to answer common audit questions.

How to record code checker findings from ruff or biome in SQLite?▼

Pipe the checker's JSON output into the matching script (ruff.sql, biome.sql, ast-grep.sql, roslyn.sql) with :worktree and :out bound. Each script parses diagnostics into site rows and confirms them as findings in one transaction.

Can DuckDB read a SQLite database for transcript analysis?▼

Yes, DuckDB attaches the sink read-only via attach '<db>' as s (type sqlite, read_only). Scripts like transcript.sql and agent-transcripts.sql join SubagentStop rows to JSONL transcripts for per-agent token and cost summaries.

Why does a finding transition fail with a foreign key error?▼

SQLite disables foreign key enforcement per connection until pragma foreign_keys = on runs, and the pragma must precede begin. Every writer script in this Skill opens with the pragma before its transaction to prevent orphan finding_id rows.

What happens when a finding's file changes after confirmation?▼

The lifecycle.sql script re-checks every live finding against disk: present text at a new hash reconfirms, removed text closes as fixed or vanished, and text relocated by an edit or git mv transitions to moved with the new path.