add blog monitor skill - #717
Open
TylerMSFT wants to merge 3 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new cpp-blog-monitor skill to help users monitor the Microsoft C++ Team Blog over a requested date range, summarize unseen posts, and persist both a “reported posts” ledger and daily markdown summary output in the OS temp directory.
Changes:
- Added a new Skill definition (
SKILL.md) describing how to run the monitor, summarize posts, and record deduplication state. - Added a Python helper script to discover posts via the WordPress API, record reported posts in an atomic ledger, and append per-post markdown summaries to a daily temp file.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| CopilotStore/docs-cpp/skills/cpp-blog-monitor/SKILL.md | Defines the cpp-blog-monitor workflow, expected outputs, and deduplication behavior. |
| CopilotStore/docs-cpp/skills/cpp-blog-monitor/scripts/check_cpp_blog.py | Implements post discovery, ledger management, and atomic summary file writing. |
Suppressed comments (3)
CopilotStore/docs-cpp/skills/cpp-blog-monitor/scripts/check_cpp_blog.py:133
- When parsing explicit ranges (
<start> to <end>), the end endpoint should be interpreted as the inclusive end of that endpoint's month when the user supplies a month-only value likeMarch 2026. OtherwiseJan 2026 to March 2026would resolve to Mar 1 rather than Mar 31.
elif match := re.fullmatch(r"(.+?)\s+to\s+(.+)", normalized):
start, through = parse_calendar_date(match.group(1)), parse_calendar_date(match.group(2))
CopilotStore/docs-cpp/skills/cpp-blog-monitor/scripts/check_cpp_blog.py:350
save-summaryparses--date-throughwithparse_calendar_date(...). After adding support for month-only endpoints,--date-throughshould be parsed with the inclusive end-of-month behavior so saved reports reflect the resolved inclusive endpoints consistently.
start = parse_calendar_date(args.date_from)
through = parse_calendar_date(args.date_through)
CopilotStore/docs-cpp/skills/cpp-blog-monitor/scripts/check_cpp_blog.py:230
fetch_api_pageassumes theX-WP-TotalPagesheader is always a valid integer. If the header is missing or malformed,int(...)can raiseValueErrorand bypass theMonitorErrorwrapping, producing a raw traceback instead of a user-actionable JSON error.
with urllib.request.urlopen(request, timeout=timeout) as response:
data = json.loads(response.read().decode("utf-8"))
total_pages = int(response.headers.get("X-WP-TotalPages", "1"))
return data, total_pages
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+80
to
+88
| def parse_calendar_date(value: str) -> date: | ||
| for date_format in ("%m-%d-%Y", "%m/%d/%Y", "%Y-%m-%d"): | ||
| try: | ||
| return datetime.strptime(value.strip(), date_format).date() | ||
| except ValueError: | ||
| continue | ||
| raise MonitorError( | ||
| f"Unsupported date '{value.strip()}'. Use M-D-YYYY, M/D/YYYY, or YYYY-MM-DD." | ||
| ) |
Comment on lines
+13
to
+16
| 1. If the user hasn't supplied a date range, ask which date range to check. | ||
| Accept explicit inclusive ranges such as `1-1-2025 to 1-1-2026` and natural | ||
| ranges such as `this year`, `this month`, `last month`, or | ||
| `the last two months`. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
C++ blog monitor skill.
Call it with /cpp-blog-monitor last two months, or /cpp-blog-monitor Jan 2026 to March 2026, etc.
Summarizes the C++ Dev blog posts. Keeps track of the ones its pulled down so it doesn't repeat work.
It produces a markdown doc of the summary in your %temp% directory, e.g. BlogSummaries-8-17-2026.md
In addition to having the summary, I can use it with AI to look for doc holes.