This skill should be used when the user asks to access secured work data through "office", "email", "calendar", "microsoft graph", or "notion" using auth.freshhub.ai and the Freshwater secure auth proxy.
Use this skill as the single entry point for secure, identity-aware access to Microsoft 365 (Graph) and Notion.
office-cli.office-cli.office-cli.office-cli.notion-query.https://auth.freshhub.ai for Microsoft Graph and Notion actions.~/.config/fresh-auth/agent-session at secure mode (600).~/.config/office-cli/agent-session is still read for compatibility.OPENROUTER_API_KEY for Office PDF/image conversion.AUTH_SERVICE_URL only when overriding the default proxy endpoint.scripts/office-cli.js and scripts/notion-query.js.# Resolve skill location for common installers
export FRESH_AUTH_DIR="${HOME}/.agents/skills/fresh-auth"
[ -d "$FRESH_AUTH_DIR" ] || export FRESH_AUTH_DIR="${HOME}/.codex/skills/fresh-auth"
export OFFICE_CLI="${FRESH_AUTH_DIR}/scripts/office-cli.js"
export NOTION_CLI="${FRESH_AUTH_DIR}/scripts/notion-query.js"
export AUTH_SERVICE_URL="https://auth.freshhub.ai"
# Quick command discovery
[ -f "$OFFICE_CLI" ] && node "$OFFICE_CLI" status
[ -f "$NOTION_CLI" ] && node "$NOTION_CLI" status
scripts/office-cli.js for Microsoft Graph-backed Drive, Mail, Calendar, and People actions.scripts/notion-query.js for Notion read/write workflows through auth service proxy.Follow this flow when granting access for Graph-backed tools.
# Register and create grants
node "$OFFICE_CLI" login
node "$OFFICE_CLI" request drive
node "$OFFICE_CLI" request mail
node "$OFFICE_CLI" request cal
node "$NOTION_CLI" request
# Verify active grants
node "$OFFICE_CLI" status
node "$NOTION_CLI" status
When the agent runs login or request, the CLI may print a verification URL and code for human approval.
https://auth.freshhub.ai/agent/verify?code=<CODE>Verify Code, then manually clicks Approve on the next screen.If approval fails, repeat the flow and confirm the user is signed into the intended Fresh Auth account before entering the code.
node "$OFFICE_CLI" drive list
node "$OFFICE_CLI" drive list "/Documents"
node "$OFFICE_CLI" drive search "Quarterly report"
node "$OFFICE_CLI" drive download <file-id> out.docx
node "$OFFICE_CLI" drive content <file-id>
node "$OFFICE_CLI" drive convert <file-id> --output=notes.md
node "$OFFICE_CLI" drive share <file-id> --type edit
node "$OFFICE_CLI" drive share <file-id> --anyone
node "$OFFICE_CLI" drive permissions <file-id>
node "$OFFICE_CLI" drive unshare <file-id> <permission-id>
node "$OFFICE_CLI" mail inbox
node "$OFFICE_CLI" mail inbox --count 50
node "$OFFICE_CLI" mail unread
node "$OFFICE_CLI" mail search "team update"
node "$OFFICE_CLI" mail read <message-id>
node "$OFFICE_CLI" mail send --to "[email protected]" --subject "Brief" --body "Thanks for the update"
node "$OFFICE_CLI" mail send --to "brad" --subject "Quick check" --body "Approved" --yes
node "$OFFICE_CLI" mail reply <message-id> --body "Got it."
node "$OFFICE_CLI" mail reply-all <message-id> --body "Thanks everyone."
node "$OFFICE_CLI" cal today
node "$OFFICE_CLI" cal tomorrow
node "$OFFICE_CLI" cal events --days 14
node "$OFFICE_CLI" cal events --full
node "$OFFICE_CLI" people "brad"
node "$OFFICE_CLI" people "brad" --verbose
node "$NOTION_CLI" login
node "$NOTION_CLI" request
node "$NOTION_CLI" status
node "$NOTION_CLI" me
node "$NOTION_CLI" find-db "my database"
node "$NOTION_CLI" search "my database"
node "$NOTION_CLI" get-db <database-id>
node "$NOTION_CLI" query-db <database-id>
node "$NOTION_CLI" get-page <page-id>
node "$NOTION_CLI" get-markdown <page-id>
node "$NOTION_CLI" create <database-id> "Title" -p "Status=In progress" -p "Priority=High"
node "$NOTION_CLI" update <page-id> -p "Status=Done"
node "$NOTION_CLI" set-body <page-id> -
node "$NOTION_CLI" append-body <page-id> -
Use find-db first when the database ID is unknown. It returns database id, title, and url so the ID can be copied directly into get-db, query-db, or create.
# Optional: enable shortcuts for a specific Notion backlog database
export NOTION_BACKLOG_DB_ID="<database-id>"
node "$NOTION_CLI" backlog
node "$NOTION_CLI" backlog "In Progress"
node "$NOTION_CLI" create-backlog "New task"
people first, then mail send --to <resolved email> for safer identity resolution.search or query-db, then append context with append-body.drive convert, then store notes in Notion via append-body.no_agent_session: run node "$OFFICE_CLI" login.no_grant: run node "$OFFICE_CLI" request <drive|mail|cal>.token expired: run node "$OFFICE_CLI" status and follow the returned re-authorisation URL.no agent session (Notion): run node "$NOTION_CLI" login.no grant (Notion): run node "$NOTION_CLI" request.NOTION_BACKLOG_DB_ID missing: set variable or call generic query-db/create commands instead of backlog shortcuts.AUTH_SERVICE_URL.https://auth.freshhub.ai by default.scripts/ folder for self-contained installation.