Skip to content

Instantly share code, notes, and snippets.

@thanhtantran
Created July 9, 2026 03:27
Show Gist options
  • Select an option

  • Save thanhtantran/79749ecea72f6ba300113ba7ae7ad648 to your computer and use it in GitHub Desktop.

Select an option

Save thanhtantran/79749ecea72f6ba300113ba7ae7ad648 to your computer and use it in GitHub Desktop.
This skill allows Hermes to search, analyze, and retrieve information from a user's exported Facebook archive.

Facebook Archive Search Skill

Purpose

This skill allows Hermes to search, analyze, and retrieve information from a user's exported Facebook archive.

The archive is expected to be exported from Facebook Account Center using:

  • Format: JSON
  • Date Range: All Time
  • Media Quality: High
  • All available categories selected

The skill must operate entirely on local files and never access Facebook directly.


Objectives

The skill must support:

  1. Search posts by Vietnamese keywords.
  2. Search comments by Vietnamese keywords.
  3. Search reactions (Like, Love, Care, Haha, Wow, Sad, Angry).
  4. Find reactions related to posts containing specific keywords.
  5. Link comments back to their original posts.
  6. Display Facebook URLs whenever available.
  7. Provide direct links so the user can manually delete posts or comments.
  8. Generate timeline and statistics.
  9. Work correctly with Vietnamese Unicode text.

Data Import

When a Facebook export archive is uploaded:

  1. Extract ZIP files.

  2. Parse all JSON files.

  3. Detect and normalize:

    • Posts
    • Comments
    • Reactions
    • Stories
    • Videos
    • Photos
    • Groups activity
    • Pages activity
  4. Store normalized data in SQLite.

Suggested tables:

posts

  • post_id
  • timestamp
  • title
  • content
  • author
  • source_file
  • facebook_url
  • raw_json

comments

  • comment_id
  • post_id
  • timestamp
  • content
  • facebook_url
  • raw_json

reactions

  • reaction_id
  • target_type
  • target_id
  • reaction_type
  • timestamp
  • facebook_url
  • raw_json

Full Text Search

Create FTS5 indexes.

Requirements:

Vietnamese Search

Must support:

  • Unicode Vietnamese
  • Accent-sensitive search
  • Accent-insensitive search
  • Exact phrase search

Examples:

Search:

Orange Pi

Must find:

Orange Pi 5

Orange Pi Zero 3

Search:

AI Agent

Must find:

AI Agent

AI agent

AI-Agent

Search:

"Orange Pi Zero"

Must return exact phrase matches first.


Search Modes

Mode 1 - Exact Keyword Search

Search only literal text.

Example:

Find all posts containing:

Orange Pi

Return:

  • Date
  • Content snippet
  • Post URL

Mode 2 - Comment Search

Search comments only.

Example:

Find all comments containing:

Gemma

Return:

  • Comment content
  • Date
  • Parent post title
  • Parent post URL
  • Comment URL

Mode 3 - Semantic Search

Use embeddings if available.

Example:

Find posts related to:

Edge AI

Even if the words "Edge AI" do not appear.

Return most relevant results.


Reaction Analysis

The skill must be able to analyze reactions.

Examples:

Find all posts that received Angry reactions.

Find all posts that received Love reactions.

Count total Like reactions during 2025.

Return:

  • Post title
  • Post URL
  • Reaction count
  • Reaction breakdown

Keyword + Reaction Search

The skill must support:

Find posts containing:

Orange Pi

and show:

  • Total reactions
  • Like count
  • Love count
  • Haha count
  • Wow count
  • Angry count

Return top results ordered by reaction count.


Comment Context

When a matching comment is found:

The skill must identify:

  • Original post
  • Post author
  • Post date
  • Comment date

Output:

Post:

Comment:

This allows the user to understand the context of the comment.


Facebook URL Recovery

Highest priority.

The skill must always try to recover:

Post URL

Examples:

https://www.facebook.com/

Comment URL

Examples:

https://www.facebook.com/?comment_id=

Use URLs found in export data whenever available.

If missing:

Generate URLs from available Facebook IDs.

If a URL cannot be reconstructed:

Display:

URL unavailable in archive.


Delete Assistance

For every result returned:

Display:

  • Post URL
  • Comment URL
  • Open URL action

The skill must NEVER attempt deletion.

The skill only helps the user locate content.

The user performs deletion manually on Facebook.


Timeline Queries

Examples:

When did I first mention Orange Pi?

When did I first mention picoERP?

When did I first mention AI Agent?

Return:

  • First occurrence date
  • Matching content
  • Facebook URL

Statistics

Examples:

Top 100 most-used keywords.

Posts per year.

Comments per year.

Most reacted posts.

Most active months.

Most active years.


Output Format

For every search result:

Date: YYYY-MM-DD HH:MM

Type: Post | Comment | Reaction

Content:

Facebook URL:

Parent Post URL:

Reaction Summary: Like: X Love: X Care: X Haha: X Wow: X Sad: X Angry: X


Safety Rules

  • Never modify archive files.
  • Never delete Facebook content.
  • Never log in to Facebook.
  • Never request Facebook credentials.
  • Never perform actions on behalf of the user.
  • Read-only mode only.

The skill acts as a Facebook Archive Search Engine and Knowledge Retrieval System.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment