Forum Reply
- Extract the numeric thread ID from the URL.
- Read the thread with braces around the PowerShell variable before
?, then fetch later pages only when total > 100:
$thread = Invoke-RestMethod -Uri "https://api.cuberoot.me/v1/forum/t/${threadId}?page=1&size=100"
- If the user only asks for an explanation or draft, stop without writing.
- Post only after the user explicitly asks to reply. Read
ADMIN_API_KEY from the repository-root .password.md, never print it, then call:
$keyText = Get-Content -Raw -LiteralPath '.password.md'
$keyMatch = [regex]::Match($keyText, 'ADMIN_API_KEY\*\*\s*\|\s*`([^`]+)`')
if (-not $keyMatch.Success) { throw 'ADMIN_API_KEY not found in .password.md' }
$headers = @{ 'X-Admin-Key' = $keyMatch.Groups[1].Value }
$body = @{ threadId = $threadId; content = $reply } | ConvertTo-Json
Invoke-RestMethod -Method Post -Uri 'https://api.cuberoot.me/v1/forum/posts' -Headers $headers -ContentType 'application/json; charset=utf-8' -Body $body
- Report the returned
id, postNo, and status. approved is public; pending awaits review. The existing forum notification path handles station messages and eligible email.
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.