| name | anarlog-trim |
| description | Trim a Anarlog transcript to its logical end. Recordings are often left running after a meeting finishes — this skill finds the natural conclusion (goodbyes, sign-offs) and cuts the transcript there. Use when the user asks to trim, cut, or clean up a Anarlog transcript. |
| license | Apache-2.0 |
| metadata | {"version":"3.12.0","author":"forwardimpact"} |
Trim Transcript
Find the logical end of a Anarlog meeting transcript and trim everything after
it. Meetings recorded with Anarlog often have trailing noise — the mic stays on
after goodbyes, capturing ambient sound, unrelated chatter, or silence. This
skill identifies the natural conclusion and edits the transcript in place.
Trigger
Run this skill:
- When the user asks to trim, cut, or clean up a Anarlog transcript
- When given a specific session ID to trim
- When another skill (e.g., anarlog-process) flags a transcript as having
excessive trailing content
Prerequisites
- Anarlog installed with session data at
~/Library/Application Support/anarlog/sessions/
Inputs
- Session ID — a UUID identifying the Anarlog session to trim
~/Library/Application Support/anarlog/sessions/{uuid}/transcript.json — the
word-level transcript
Outputs
~/Library/Application Support/anarlog/sessions/{uuid}/transcript.json —
edited in place with words after the logical end removed
~/Library/Application Support/anarlog/sessions/{uuid}/audio.mp3 — deleted.
Trimming indicates the recording captured audio beyond the consented meeting,
so the full audio must be removed to respect participant privacy.
- Printed summary: original duration, trim point, new duration, words removed
Steps
Step 0 — Validate the session
-
Confirm the session directory exists:
~/Library/Application Support/anarlog/sessions/{uuid}/
-
Confirm transcript.json exists and has at least one transcript with words.
-
Read _meta.json to get the session title for context.
Step 1 — Reconstruct readable text
Convert the word-level transcript into readable text with timestamps. Group
words into lines by speaker channel and approximate sentence boundaries. The
goal is a human-readable view you can analyze for the logical end.
Use this approach:
import json
data = json.load(open('transcript.json'))
words = data['transcripts'][0]['words']
current_min = -1
for i, w in enumerate(words):
minute_mark = int(w['start_ms'] / 30000)
if minute_mark != current_min:
current_min = minute_mark
mins = w['start_ms'] / 60000
print(f'\n[{mins:.1f}m ch{w["channel"]}]', end='')
print(w['text'], end='')
Step 2 — Identify the logical end
Read through the reconstructed text and find the first point where the meeting
has clearly concluded. Look for these signals, roughly in order of strength:
Strong ending signals (any one is sufficient):
- Explicit farewells: "bye", "bye bye", "goodbye", "take care", "have a good
day/evening/weekend", "cheers"
- Final thank-yous followed by no substantive content: "thank you so much",
"thanks a lot", "thanks everyone"
- Meeting close phrases: "that's all", "we're done", "let's wrap up", "I'll let
you go"
Supporting signals (strengthen the case but not sufficient alone):
- Long silence gaps (>30 seconds) after a farewell exchange
- Channel drops — only one speaker remains after goodbyes
- Shift to clearly unrelated content (ambient noise transcribed as fragments)
- Filler-only content: repeated "um", "uh", fragments with no meaning
The trim point is the end of the last meaningful farewell exchange. Include
the final "bye" / "thank you" / "take care" from both parties if present, then
cut everything after.
Step 3 — Confirm with the user
Before modifying the file, show the user:
- The session title and original duration
- The last ~20 words before the proposed trim point (as readable text)
- The first ~20 words after the proposed trim point (what will be removed)
- The new duration and number of words being removed
Wait for the user to approve before proceeding.
Step 4 — Trim the transcript
Once approved:
- Read the current
transcript.json (fresh read, not cached).
- Slice the words array at the identified index.
- Write the modified JSON back to
transcript.json.
import json
path = f'~/Library/Application Support/anarlog/sessions/{uuid}/transcript.json'
data = json.load(open(path))
data['transcripts'][0]['words'] = data['transcripts'][0]['words'][:trim_index]
json.dump(data, open(path, 'w'), indent=2)
-
Print a summary:
Trimmed: {title}
Before: {original_words} words, {original_duration}
After: {new_words} words, {new_duration}
Removed: {removed_words} words ({removed_duration} of trailing content)
Step 5 — Delete the audio recording
The fact that a transcript needs trimming means the recording captured audio
beyond the consented meeting — ambient conversation, unrelated chatter, or other
people who did not consent to being recorded. The full audio file must be
deleted to respect participant privacy.
-
Delete the audio file:
rm "~/Library/Application Support/anarlog/sessions/{uuid}/audio.mp3"
-
Confirm deletion and inform the user:
Audio deleted: audio.mp3 removed (recording contained unconsented content beyond the meeting)
This step is not optional and does not require separate user
confirmation — the user already approved the trim, which implicitly
acknowledges the recording went beyond the meeting boundary.
Step 6 — Verify
Read back the last 10 words of the trimmed transcript to confirm the file was
written correctly and ends at the expected point. Confirm audio.mp3 no longer
exists in the session directory.
Quality checklist