[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7ECKESAQERJRHN097F2NB35":3,"skill-same:01M7ECKESAQERJRHN097F2NB35":49},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":20,"frontMatter":21,"refName":22,"commitSha":23,"skillDirectory":24,"forksCount":13,"repositoryHtmlUrl":25,"repositoryHomepageUrl":6,"ownerHtmlUrl":26,"ownerBlogUrl":6,"ownerDescription":27,"updatedAt":28,"install":29,"resources":42},"01M7ECKESAQERJRHN097F2NB35","scheduled-briefing-agent",null,"jonahthan433\u002FCortexOS","jonahthan433","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F211465495?v=4","01M7ECH9HPHGA89DCXHHJBTS3C","jonah.ai","01M7ECH9JCEM45DZMWPT7148S1",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fjonahthan433\u002FCortexOS\u002Fblob\u002Fmain\u002Fskills\u002Fimported\u002F.archive\u002Fscheduled-briefing-agent\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"# scheduled-briefing-agent\n\n# Scheduled Briefing \u002F Digest Agent\n\nClass of work: the user wants a recurring auto-delivered brief — \"daily\nbriefing at 8am\", \"morning report\", \"ops digest\", \"weekly summary\". Sections\ntypically include priorities, calendar, email, news, project\u002Frepo updates,\nserver health, and recommended next actions.\n\nThe deliverable is a `cronjob` (action=create) whose prompt pulls REAL data\nfrom each wired source and delivers to the user's chat. The hard part is not\nthe cron — it's wiring each data source and handling credentials safely.\n\n## Workflow\n\n1. **Enumerate sources BEFORE scheduling.** Never schedule a brief that\n   guesses. For each requested section, ask: where does this data live and how\n   do I access it? Common mapping:\n   | Section | Typical source |\n   |---|---|\n   | Calendar \u002F email | Google Workspace (`google-workspace` skill) or IMAP (`himalaya`) |\n   | Project updates | GitHub repo(s) — `gh` CLI or public REST API |\n   | Server health | SSH into the host |\n   | News (AI\u002Ftech) | `web_search` |\n   | Top priorities | local task-list file the agent maintains |\n\n2. **Probe connectivity\u002Fauth in ONE parallel batch** before promising anything:\n   ping\u002FSSH reachability, `gh auth status`, google `setup.py --check`, `which`\n   for required binaries. Surface a status table (🟢 ready \u002F 🟡 works-with-fix \u002F\n   🔴 needs-setup) so the user sees exactly what's blocking.\n\n3. **Wire each source, stub what's unavailable.** If a source can't be reached,\n   the brief must print \"**\u003Csection>: unavailable — \u003Creason>**\", never fabricate.\n   Bake that instruction into the cron prompt explicitly.\n\n4. **Credentials: prefer keys\u002Ftokens over stored passwords (security flag).**\n   See the Security section. Ask before storing anything sensitive.\n\n5. **Create the cron.** `cronjob(action=create, schedule='0 8 * * *', ...)`.\n   Deliver to the origin chat (omit `deliver`). Make the prompt self-contained\n   (cron runs in a fresh session with no chat context) and restrict\n   `enabled_toolsets` to what it needs (e.g. web, terminal). Put the primary\n   user-facing content in the final response — cron auto-delivers it.\n\n6. **Format the brief clean & scannable:** urgent items first, then sections\n   with headers, tight bullets, a table where it helps. No fluff.\n\n## Security — credentials in cron jobs\n\n- **NEVER interpolate secrets into a cron prompt — the create is BLOCKED.**\n  A prompt containing a token-in-URL fetch (e.g. `curl ...\u002Fbot${TELEGRAM_BOT_TOKEN}\u002FgetChat`)\n  is rejected outright by the cron guard (`threat pattern 'exfil_curl_url'`,\n  prompt never saved). Workaround that both passes the guard and keeps the\n  secret out of the prompt: write a small stdlib script under\n  `~\u002F.hermes\u002Fscripts\u002F` that reads the token from `~\u002F.hermes\u002F.env` itself and\n  prints the result; the cron prompt only says `run \u002Fhome\u002Fhermes\u002F.hermes\u002Fscripts\u002Fcc_subs.py`.\n  This also survives prompt drift — the token never lives in job definitions.\n- **SSH server health:** do NOT store a root password in the cron prompt or\n  memory. Generate a dedicated keypair\n  (`ssh-keygen -t ed25519 -N '' -C hermes-\u003Cpurpose> -f ~\u002F.ssh\u002Fhermes_\u003Chost>`),\n  give the user a one-liner to append the `.pub` to the host's\n  `authorized_keys`, then SSH passwordless with `-i ~\u002F.ssh\u002Fhermes_\u003Chost>`.\n  Fallback (weaker, only if user insists): `sshpass` + root-only password file.\n- Confirm IPs by probing — users mistype (e.g. `192.16.1.11` vs\n  `192.168.1.11`). Test reachability before trusting the address.\n- **Verify the key actually landed on the RIGHT host.** A common failure: the\n  user pastes the `authorized_keys` one-liner into the WRONG terminal — e.g.\n  the Hermes CLI shell (`hermes@hermes`) instead of an SSH session on the\n  Proxmox host, or onto a different box than the target IP. Symptom: SSH still\n  returns `Permission denied (publickey,password)` after they say \"done\".\n  Give an install command that PRINTS PROOF so you can confirm placement:\n  ```bash\n  mkdir -p \u002Froot\u002F.ssh && chmod 700 \u002Froot\u002F.ssh\n  cat >> \u002Froot\u002F.ssh\u002Fauthorized_keys \u003C\u003C'EOF'\n  \u003Cpaste the .pub line here>\n  EOF\n  chmod 600 \u002Froot\u002F.ssh\u002Fauthorized_keys\n  echo \"keys matching:\"; grep -c hermes- \u002Froot\u002F.ssh\u002Fauthorized_keys\n  hostname -I   # confirms WHICH host received the key\n  ```\n  Cross-check the `hostname -I` output against the IP you intend to SSH to; if\n  they differ, the key went to the wrong machine.\n- Per user rule: ask before storing anything sensitive or temporary.\n\n## Google Workspace setup quirks (bundled skill)\n\nThe bundled `google-workspace` skill's `scripts\u002Fsetup.py` can vary by version:\n- Some versions do NOT accept `--services` \u002F `--format json`. If you get\n  `unrecognized arguments`, just run `setup.py --auth-url` bare (it emits the\n  URL as plain stdout with a fixed scope set).\n- `setup.py` auto-dep-install can fail with `No module named pip` \u002F\n  `Permission denied` writing to system site-packages. Fix: create a `uv` venv\n  and run setup.py with THAT interpreter:\n  ```bash\n  uv venv ~\u002F.hermes\u002Fgoogle-venv\n  uv pip install --python ~\u002F.hermes\u002Fgoogle-venv\u002Fbin\u002Fpython \\\n    google-api-python-client google-auth-oauthlib google-auth-httplib2\n  GSETUP=\"~\u002F.hermes\u002Fgoogle-venv\u002Fbin\u002Fpython ~\u002F.hermes\u002Fskills\u002Fproductivity\u002Fgoogle-workspace\u002Fscripts\u002Fsetup.py\"\n  ```\n  Note: `python3 -m venv` may produce a venv WITHOUT pip on Debian — use `uv`.\n- OAuth is PKCE with `redirect_uri=http:\u002F\u002Flocalhost:1`; the browser fails to\n  load localhost after consent — that's expected. User copies the full\n  redirected URL back; exchange with `setup.py --auth-code \"\u003Curl-or-code>\"`.\n- **The redirect-grab is where users get stuck (most common failure).** They\n  paste the `accounts.google.com\u002F...\u002Fconsentsummary?...` page instead of the\n  final `http:\u002F\u002Flocalhost:1\u002F?code=...` redirect. The URL you need MUST start\n  with `localhost` and contain `code=`. A `consentsummary` URL means the final\n  **Allow\u002FContinue** button (bottom of the last screen, often needs scrolling)\n  has NOT been tapped yet. Tell them: keep tapping Continue\u002FAllow until the\n  address bar switches to `localhost`.\n- **Any error on the `localhost:1` page = success**, whatever the text says\n  (\"can't reach\", \"connection refused\", \"address already in use\", or a spinner\n  that hangs forever). The code is already in the address bar — tell them to\n  tap **stop\u002F✕** to end the spinner, then copy the address bar.\n- **Pivot to a desktop browser after ~2 failed mobile attempts.** Mobile\n  browsers frequently hang on the localhost redirect and hide the address bar;\n  desktop makes the `localhost:1\u002F?code=...` trivial to copy. Don't loop on\n  mobile more than twice — offer desktop early. Generate a FRESH auth-url each\n  retry (codes\u002Fchallenges are single-use and expire fast).\n- 403 `access_denied` while app is in Testing → add the user's email at\n  `console.cloud.google.com\u002Fauth\u002Faudience` → Test users, OR publish the app.\n  Adding a test user only unblocks the consent screen; they still must complete\n  approval and paste the code — `setup.py --check` stays NOT_AUTHENTICATED\n  until the code is exchanged.\n- **`invalid_request` (Error 400) = redirect-URI mismatch.** The redirect_uri\n  the script sends MUST exactly match one registered on the OAuth client\n  (scheme, host, AND port). Desktop-type clients do NOT expose an editable\n  \"Authorized redirect URIs\" field in the console; a **Web application** client\n  does — and `setup.py` accepts BOTH `installed` and `web` client JSON. Easiest\n  resolution path that avoids repeated console edits: read what port the client\n  actually has (from the downloaded JSON `redirect_uris`) and make the script\n  match it by patching `REDIRECT_URI` in `setup.py` (a module-level constant,\n  e.g. `REDIRECT_URI = \"http:\u002F\u002Flocalhost:8080\"`). Then re-run `--auth-url` so\n  both the auth URL and the code exchange use the same port. Note: patching the\n  bundled skill file can be reverted by a Hermes update — if OAuth breaks later,\n  re-check this constant vs. the client's registered URI first.\n- **After token exchange, individual Google APIs must be ENABLED in the Cloud\n  project.** A working token still returns `403 accessNotConfigured` \u002F\n  \"\u003CAPI> has not been used in project N before or it is disabled\" for any API\n  not yet enabled. Enable each at\n  `console.developers.google.com\u002Fapis\u002Fapi\u002F\u003Capi>.googleapis.com\u002Foverview?project=\u003CN>`\n  (e.g. `gmail`, `calendar`), wait ~1 min, retry. Enabling one API (Calendar)\n  does not enable the others (Gmail) — enable each requested service.\n\n## Pitfalls\n\n- Scheduling before sources are wired → brief full of guesses. Enumerate first.\n- Storing plaintext root password → security hole on an exposed homelab.\n- Cron prompt referencing chat context → fails (fresh session). Self-contain it.\n- Not stubbing unavailable sources → fabricated data. Force explicit\n  \"unavailable\" lines.\n- **`schedule='15m'` creates a ONE-SHOT job** (create response shows `\"repeat\": \"once\"`).\n  Recurring needs `'every 15m'` — check `repeat`\u002F`state` in the create response and\n  fix with `cronjob(action=update, schedule='every 15m')` before trusting it.\n\n## Script-only (no_agent) jobs — watchdog pattern\n\nFor recurring health\u002Fstate watchers, skip the LLM entirely:\n- `no_agent=true` + `script=...` (relative paths resolve under `~\u002F.hermes\u002Fscripts\u002F`).\n- The script's stdout is delivered VERBATIM on each tick; **empty stdout = silent\n  tick** (nothing sent). So the script should print NOTHING when healthy and print\n  anomalies only — a silent watchdog, no token cost. Non-zero exit sends an error alert.\n- Give the script a second `--report` mode that prints full stats for on-demand use.\n- Keep the script stdlib-only (it runs under the scheduler's python, not the venv);\n  shell out to the project venv for anything heavier.\n- To run a state-changing job that must SURVIVE a service restart (e.g. verify a\n  gateway restart), don't use a background terminal child (children die with the\n  gateway's cgroup on `KillMode=mixed`); use `systemd-run --user --on-active=Ns\n  --unit=\u003Cname> \u003Ccmd>` — a transient unit outside the cgroup. Verify with its own\n  log\u002FTelegram confirmation, since the parent session may be killed mid-turn.\n",{},"main","38b32c99e7ed0b8e215d638e92cfa452c1ec3079","skills\u002Fimported\u002F.archive\u002Fscheduled-briefing-agent","https:\u002F\u002Fgithub.com\u002Fjonahthan433\u002FCortexOS","https:\u002F\u002Fgithub.com\u002Fjonahthan433","AI Consultant","2026-10-24 05:13:39",{"source":7,"skillName":5,"commands":30,"prompt":40,"zipAvailable":41},[31,34,37],{"tool":32,"command":33},"npx","npx skills add jonahthan433\u002FCortexOS --skill scheduled-briefing-agent",{"tool":35,"command":36},"bunx","bunx skills add jonahthan433\u002FCortexOS --skill scheduled-briefing-agent",{"tool":38,"command":39},"pnpm","pnpm dlx skills add jonahthan433\u002FCortexOS --skill scheduled-briefing-agent","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjonahthan433\u002FCortexOS\u002Fblob\u002Fmain\u002Fskills\u002Fimported\u002F.archive\u002Fscheduled-briefing-agent\u002FSKILL.md",true,[43],{"path":44,"resourceType":45,"resourceTypeDesc":46,"sizeBytes":47,"sourceHtmlUrl":48},"skill.json","REFERENCE","参考文档",455,"https:\u002F\u002Fgithub.com\u002Fjonahthan433\u002FCortexOS\u002Fblob\u002Fmain\u002Fskills\u002Fimported\u002F.archive\u002Fscheduled-briefing-agent\u002Fskill.json",[50,56,62,68,74,80],{"skillNo":51,"name":52,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":53,"categories":54,"keywords":55,"publishedAt":18},"01M7EDQZDQX3Q8Y7GCQX6KN9V7","opportunity-brief","https:\u002F\u002Fgithub.com\u002Fjonahthan433\u002FCortexOS\u002Fblob\u002Fmain\u002Fskills\u002Fsales\u002Fopportunity-brief\u002FSKILL.md",[],[],{"skillNo":57,"name":58,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":18},"01M7EDQYA0V9Y99VKBREJJ3MRT","morning-intel","https:\u002F\u002Fgithub.com\u002Fjonahthan433\u002FCortexOS\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fmorning-intel\u002FSKILL.md",[],[],{"skillNo":63,"name":64,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":18},"01M7EDQVX1JVY0B6PDHKKGM19G","decision-brief","https:\u002F\u002Fgithub.com\u002Fjonahthan433\u002FCortexOS\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fdecision-brief\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":18},"01M7EDQV1GENZAC2SZSD8KZ3GM","weekly-review","https:\u002F\u002Fgithub.com\u002Fjonahthan433\u002FCortexOS\u002Fblob\u002Fmain\u002Fskills\u002Fproductivity\u002Fweekly-review\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":18},"01M7EDQT2KETJ1Y3CGVN9EKW2J","system-health","https:\u002F\u002Fgithub.com\u002Fjonahthan433\u002FCortexOS\u002Fblob\u002Fmain\u002Fskills\u002Fops\u002Fsystem-health\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":18},"01M7EDQQN2JK3XPWMS1M4T0F3K","backup-restore","https:\u002F\u002Fgithub.com\u002Fjonahthan433\u002FCortexOS\u002Fblob\u002Fmain\u002Fskills\u002Fops\u002Fbackup-restore\u002FSKILL.md",[],[]]