-
Notifications
You must be signed in to change notification settings - Fork 1
Add TIL workflow system for Claude #106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add TIL workflow system for Claude #106
Conversation
…ust one local repo's
…(ignored by future scans)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a /suggest-tils command that automates the discovery and drafting of TIL (Today I Learned) blog posts from git commit history. The system uses Claude to evaluate commits, ranks them by TIL potential, and creates drafts in Notion with automatic tracking.
Key Changes:
- Python scripts fetch commits via GitHub API and manage Notion publishing workflow
- Claude skills evaluate commit TIL potential and generate content matching user's writing voice
- Automated linking between Writing database entries and commit tracker prevents duplicate suggestions
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/claude/config/skills/scan-notion-for-tils/SKILL.md | Documentation for planned Notion scanning feature (marked as under development) |
| tools/claude/config/skills/scan-git-for-tils/scan_git.py | Fetches commits from GitHub, filters assessed ones from Notion, outputs JSON for Claude evaluation |
| tools/claude/config/skills/scan-git-for-tils/publish_til.py | Creates Writing pages and tracker entries in Notion, handles markdown-to-blocks conversion |
| tools/claude/config/skills/scan-git-for-tils/SKILL.md | Instructions for Claude on evaluating commits and ranking TIL suggestions |
| tools/claude/config/skills/draft-til/SKILL.md | Comprehensive voice guide and formatting rules for generating TIL content |
| tools/claude/config/commands/suggest-tils.md | Command orchestration workflow from scanning to publishing |
| tools/claude/config/CLAUDE.md | Global hint for Claude to suggest TILs during problem-solving |
| .claude/specs/til-workflow.md | Complete specification documenting architecture and implementation approach |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
PR Review: TIL Workflow ImplementationThis is an impressive, well-thought-out implementation of an automated TIL content generation workflow! The architecture is solid and the code quality is generally high. Below are my findings organized by category. ✅ StrengthsArchitecture & Design
Code Quality
Documentation
🔍 Issues & Recommendations🔴 High Priority1. Rate Limiting Risk (scan_git.py:158)with ThreadPoolExecutor(max_workers=15) as executor:Issue: 15 concurrent GitHub API requests could hit rate limits (5,000/hour authenticated)
2. Error Handling Silences Failures (scan_git.py:165-168)try:
commit["files"] = future.result()
except Exception:
commit["files"] = []Issue: Broad exception handling hides legitimate errors (network, auth, API changes) except Exception as e:
# Log warning for debugging but continue
print(f"Warning: Failed to fetch files for {commit['hash']}: {e}", file=sys.stderr)
commit["files"] = []3. Missing Input Validation (publish_til.py:287)Issue: After JSON validation, there's no sanitization of markdown content or title length
if len(input_data["title"]) > 2000:
print(json.dumps({"error": "Title exceeds 2000 characters"}))
sys.exit(1)4. Page ID Extraction Fragile (publish_til.py:268-281)parts = url.rstrip("/").split("-")
candidate = parts[-1].split("/")[-1]Issue: Assumes Notion URL format. If Notion changes URL structure, this breaks silently 🟡 Medium Priority5. Incomplete Markdown Parsing (publish_til.py:194-265)Missing support:
Impact: TILs won't match the voice guide's examples that use inline formatting 6. Date Parsing Assumes ISO Format (scan_git.py:254-255)dt = datetime.fromisoformat(iso_date.replace("Z", "+00:00"))Issue: GitHub sometimes returns dates in RFC3339 format with milliseconds 7. No Retry Logic for API CallsIssue: Network hiccups or transient Notion/GitHub API errors cause immediate failure 8. Hardcoded Database IDsNOTION_ASSESSED_COMMITS_DB = "928fcd9e47a84f98824790ac5a6d37ca"
WRITING_DATA_SOURCE_ID = "c296db5b-d2f1-44d4-abc6-f9a05736b143"Issue: Not configurable for other users (though this is personal dotfiles) 🟢 Low Priority9. Code Style Consistency
10. Performance Optimization
11. Test Coverage
🔒 Security Review✅ Good Practices
|
- Separate Python skill tests from bash/shell tests - Uses uv run for dependency-free test execution - Runs on Python file changes in tools/claude/config/skills/ - Provides clear test output and summary
💪 What
Primary Changes: TIL Workflow System
/suggest-tilsslash command - Interactive workflow for discovering and drafting TIL blog posts from git historyscan-git-for-tilsskill - Python-based skill that scans GitHub commits for TIL-worthy topics, tracks assessed commits in Notion, and formats results for Claude evaluationdraft-tilskill - Voice guide and workflow instructions for drafting TIL posts in the user's writing stylescan-notion-for-tilsskill - Workflow for scanning Notion Writing database backlog for TIL opportunities.claude/specs/til-workflow.mdSecondary Changes: Infrastructure
@template/README.mdwith Python best practices, PEP 723 patterns, and type safety guidelines/suggest-tilscommand documentation🤔 Why
👀 Usage
Run the slash command to start the TIL workflow:
The workflow will:
Individual skill usage (for debugging):
👩🔬 How to validate
Test the complete workflow
Ensure you have required tools:
Run the slash command and test the full flow:
Test the Python skill independently
Navigate to skill directory:
cd tools/claude/config/skills/scan-git-for-tilsRun the scan script:
Expected: Markdown-formatted list of TIL candidates from last 30 days, excluding previously assessed commits
Run tests:
Expected: All tests pass (formatting, validation, mocking)
Run linting and type checking:
Expected: No errors from either tool
Verify CI workflow
Check that CI ran on this PR and passed all checks:
The workflow runs automatically on:
🔗 Related links
data_sources.query()pattern