Scanning git for tils

From ooloth/dotfiles · View interactive version

Scanning git for tils is an AI agent skill from the GitHub repository ooloth/dotfiles. Scans GitHub commit history for commits that might make good TIL blog posts. Queries all your repos across all orgs via GitHub API. Tracks assessed commits in Notion to avoid duplicates across machines. Use when user asks for TIL ideas from their recent work.

How to use this skill

Skill file

Scan Git for TILs Skill

Analyzes recent GitHub commits across all your repos to find TIL-worthy topics.

Notion Database

TIL Assessed Commits Database

Properties:

Usage

Step 1: Run the script

python3 ~/.claude/skills/scanning-git-for-tils/scan_git.py [days]

Arguments:

The script automatically:

Output: JSON with:

Step 2: Evaluate commits

Review the commits in the markdown field and identify the top 5-10 that would make good TILs.

Important: The markdown shows commits with an (index: N) - this maps to new_commits[N] array which contains full commit data you'll need for publishing.

Good TIL candidates have:

Skip commits that are:

For each selected commit:

  1. Note the index number from markdown
  2. Look up full commit data in new_commits[index]
  3. Generate:

Step 3: Display results

Present suggestions ranked from best to worst by TIL potential:

📝 TIL Opportunities from Git History (last N days):

1. **Suggested Title Here** [BEST]
   - Repo: owner/repo
   - Commit: abc1234 "original commit message"
   - Date: 3 days ago
   - Files: file1.py, file2.py
   - TIL angle: What makes this worth documenting
   - URL: https://github.com/...

2. **Second Best Title**
   ...

10. **Still Worth Documenting**
   ...

Ranking criteria (highest priority first):

  1. Broad applicability - Will help many developers, not project-specific
  2. Non-obvious insight - Gotcha, surprising behavior, or clever solution
  3. Recency - More recent commits are fresher to write about
  4. Clear learning - Easy to extract a concrete takeaway

Note: Don't create tracker entries at this stage. The publish_til.py script will create tracker entries when drafts are actually published. This prevents duplicates and ensures only drafted commits are marked as assessed.

What It Returns

JSON output example:

{
  "markdown": "Git commits from last 30 days:\n\n1. [ooloth/dotfiles] fix: properly ignore .env\n   Hash: abc1234 | Date: 3 days ago\n   ...",
  "new_commits": [
    {
      "hash": "abc1234567890...",
      "message": "fix: properly ignore .env after initial commit",
      "repo": "ooloth/dotfiles",
      "date": "2025-01-15"
    },
    ...
  ]
}

How It Works

  1. Script fetches commits - Queries GitHub API for your recent commits across all repos
  2. Filters obvious skips - Removes merge commits, dependabot, already-assessed
  3. Returns all candidates - Outputs commit details for Claude to evaluate
  4. Claude evaluates - Reviews commits and selects top 5-10 TIL candidates
  5. Records suggestions to Notion - Only suggested commits are marked as assessed (allows incremental backlog review)

Notes

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.