$npx -y skills add balabalabalading/huuuuuuho-skills --skill logging-sessionRecord and query AI conversation logs — what users asked, how it was solved, and the result. Use when users want to logging conversation, summarize recent work from sessions, or want daily/weekly project summaries from past conversations.
| 1 | # Logging Session |
| 2 | |
| 3 | This skill records coding session summaries to a local SQLite database stored in your local path, so you can later query and summarize your work across projects and time periods. |
| 4 | |
| 5 | ## Why this matters |
| 6 | |
| 7 | Coding sessions produce valuable knowledge — decisions made, problems solved, approaches tried and abandoned. Without capturing these, each session starts from scratch. This skill turns conversations into searchable, summarizable records that feed into daily standups, weekly reviews, and long-term project memory. |
| 8 | |
| 9 | ## Database location |
| 10 | |
| 11 | The database path is defined by `db_path` in `config.json`, defaulting to: |
| 12 | |
| 13 | ``` |
| 14 | ~/Library/Mobile Documents/iCloud~md~obsidian/Documents/vault4life/dev_knowledge.db |
| 15 | ``` |
| 16 | |
| 17 | To customize, edit `<skill-path>/config.json`. |
| 18 | |
| 19 | If the database doesn't exist yet, initialize it: |
| 20 | |
| 21 | ```bash |
| 22 | python3 <skill-path>/scripts/init_db.py |
| 23 | ``` |
| 24 | |
| 25 | The script reads the path from `config.json` automatically. You can also specify a path manually: |
| 26 | |
| 27 | ```bash |
| 28 | python3 <skill-path>/scripts/init_db.py /path/to/your/dev_knowledge.db |
| 29 | ``` |
| 30 | |
| 31 | ## Schema |
| 32 | |
| 33 | ```sql |
| 34 | CREATE TABLE dev_logs ( |
| 35 | id INTEGER PRIMARY KEY AUTOINCREMENT, |
| 36 | created_at DATETIME DEFAULT CURRENT_TIMESTAMP, |
| 37 | project_name TEXT NOT NULL, |
| 38 | session_id TEXT NOT NULL, |
| 39 | parent_id INTEGER DEFAULT NULL, |
| 40 | task_category TEXT, |
| 41 | user_query TEXT NOT NULL, |
| 42 | thought_process TEXT, |
| 43 | final_result TEXT, |
| 44 | file_paths TEXT, |
| 45 | git_hash TEXT, |
| 46 | extra_metadata TEXT, |
| 47 | FOREIGN KEY (parent_id) REFERENCES dev_logs (id) |
| 48 | ); |
| 49 | ``` |
| 50 | |
| 51 | ## When to record |
| 52 | |
| 53 | Record a session log entry when: |
| 54 | 1. **User explicitly asks** — they say "record this session", "log this conversation", "logging-session", etc. |
| 55 | 2. **A meaningful task completes** — when a significant coding task is done (bug fixed, feature added, refactoring completed), and the user wants it captured. |
| 56 | 3. **Via Stop hook** — when the hook fires automatically at session end, synthesize the entire conversation into a log entry. |
| 57 | |
| 58 | Do NOT record trivial interactions (quick questions, simple lookups, clarifications) unless the user asks. |
| 59 | |
| 60 | ## How to record a session log |
| 61 | |
| 62 | When recording, you need to synthesize the conversation into a structured entry. Don't just copy-paste — distill the essence. |
| 63 | |
| 64 | ### Step 1: Gather context |
| 65 | |
| 66 | Collect these fields from the conversation and environment: |
| 67 | |
| 68 | | Field | Source | Notes | |
| 69 | |-------|--------|-------| |
| 70 | | `project_name` | Current working directory's folder name | Use `basename $(pwd)` or equivalent | |
| 71 | | `session_id` | Generate from date + random suffix | Format: `YYYYMMDD_xxxx` (e.g., `20260513_a3f2`) | |
| 72 | | `parent_id` | If this continues a previous log entry, use that entry's ID | Otherwise `null` | |
| 73 | | `task_category` | Classify the task: `bugfix`, `feature`, `refactor`, `debug`, `setup`, `docs`, `test`, `other` | | |
| 74 | | `user_query` | The user's original question or task description | In the user's own words when possible | |
| 75 | | `thought_process` | Your analysis approach, alternatives considered, key decisions | Concise but informative — this is the "how" | |
| 76 | | `final_result` | What was actually done, the outcome | Include key code changes, file paths, or resolution | |
| 77 | | `file_paths` | Files that were created or modified | Comma-separated | |
| 78 | | `git_hash` | Current HEAD commit hash if in a git repo | Run `git rev-parse --short HEAD` | |
| 79 | | `extra_metadata` | Any additional context as JSON | Optional | |
| 80 | |
| 81 | ### Step 2: Write the entry |
| 82 | |
| 83 | Run the save script: |
| 84 | ```bash |
| 85 | python3 <skill-path>/scripts/save_log.py \ |
| 86 | --project "<project_name>" \ |
| 87 | --session "<session_id>" \ |
| 88 | --query "<user_query>" \ |
| 89 | --thought "<thought_process>" \ |
| 90 | --result "<final_result>" \ |
| 91 | --category "<task_category>" \ |
| 92 | --files <file1> <file2> \ |
| 93 | --git "<git_hash>" |
| 94 | ``` |
| 95 | |
| 96 | For fields with spaces or special characters, wrap in quotes. The `--parent`, `--category`, `--files`, `--git`, and `--meta` flags are optional. |
| 97 | |
| 98 | ### Step 3: Confirm |
| 99 | |
| 100 | After saving, tell the user: |
| 101 | - The log entry ID |
| 102 | - A brief summary of what was recorded |
| 103 | |
| 104 | Example: "Session logged as #5 — recorded the auth bug fix in project my-app." |
| 105 | |
| 106 | ## Querying session logs |
| 107 | |
| 108 | ### Summarize recent work |
| 109 | |
| 110 | When the user asks for a summary (daily, weekly, or custom range): |
| 111 | |
| 112 | ```bash |
| 113 | # Last 7 days for current project |
| 114 | python3 <skill-path>/scripts/query_logs.py \ |
| 115 | --project "<project_name>" \ |
| 116 | --days 7 \ |
| 117 | --format markdown |
| 118 | |
| 119 | # Today's logs across all projects |
| 120 | python3 <skill-path>/scripts/query_logs.py \ |
| 121 | --days 1 \ |
| 122 | --format markdown |
| 123 | |
| 124 | # Specific date range (YYYYMMDD format, inclusive) |
| 125 | python3 <skill-path>/scripts/query_logs.py \ |
| 126 | --start-date 20260501 \ |
| 127 | --end-date 20260515 \ |
| 128 | --format markdown |
| 129 | |
| 130 | # Specific session's full thread |
| 131 | python3 <skill-path>/scripts/query_logs.py \ |
| 132 | --session "<se |