agentleFS
tre-systemstre-systems/office-assistant/.claude/skills/calendar-setup/SKILL.md

calendar-setup

Skill1 starsChanged 9 months agoMITView on GitHub

Set up or troubleshoot Office 365 calendar authentication. Use when the user needs to log in, authenticate, reconnect, or fix auth issues.

  • Reads credentials

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. davekilleen/Dex★ 509same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository5 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 3 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If calling any mcp__office-assistant__* tool returns a "No such tool" or "tool not available" error, the MCP server is not registered with …

    line 21
  2. Distinctive:

    Do NOT attempt to call MCP tools again or use Bash workarounds — the server must be registered first, which requires restarting the …

    line 36
  3. Very specific:

    When the .env file already exists but the token has expired, the setup script skips the interactive .env prompts and goes straight to the …

    line 59
  4. Very specific:

    Run uv run python -m office_assistant.setup in the background with a long timeout (300000 ms / 5 minutes) using run_in_background: true.

    line 63
  5. Distinctive:

    Search for "App registrations" → click it → "New registration"

    line 76
  6. Very specific:

    "CLIENT_ID and TENANT_ID must be set": Run uv run python -m office_assistant.setup to create the .env file.

    line 99
  7. Distinctive:

    "ErrorAccessDenied": Check API permissions in the Azure Portal.

    line 107
  8. Very specific:

    Want to start fresh?: Run uv run python -m office_assistant.setup — it will detect the expired token and walk you through signing in again.

    line 111

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Help the user connect their Microsoft account to the calendar assistant.

How to call tools

The office-assistant MCP server is already registered and running. Call tools directly using the mcp__office-assistant__<tool_name> functions available in your tool list. Do NOT use Bash, Python scripts, or subprocess calls to invoke tools. All tool names below use their short form (e.g. get_my_profile); the actual callable tool is always mcp__office-assistant__<short_name>.

If MCP tools are not available

If calling any mcp__office-assistant__* tool returns a "No such tool" or "tool not available" error, the MCP server is not registered with Claude Code.

Tell the user:

The calendar assistant isn't connected yet. To set it up, run this command in your terminal:

cd <project directory> && ./setup.sh

This will install dependencies, register the assistant with Claude Code, and walk you through connecting your Microsoft account. Once it's done, start a new conversation and try again.

Replace <project directory> with the actual working directory of this project. Do NOT attempt to call MCP tools again or use Bash workarounds — the server must be registered first, which requires restarting the conversation.

Check current state

First, try calling get_my_profile. If it succeeds, authentication is already working. Tell the user they're connected and show their name and email.

If authentication fails

Quick setup

Tell the user to run this single command in a terminal:

uv run python -m office_assistant.setup

It will walk them through everything interactively: creating the .env file and signing in. They just need an Azure App Registration first (see below).

Re-authentication (token expired, .env already exists)

When the .env file already exists but the token has expired, the setup script skips the interactive .env prompts and goes straight to the device code flow. In this case you can run it programmatically:

Run uv run python -m office_assistant.setup in the background with a long timeout (300000 ms / 5 minutes) using run_in_background: true. After it starts, read its output to get the device code and URL, then show those to the user. The script blocks until the user completes browser sign-in and caches the token. Once the background task completes, authentication is restored.

Azure App Registration (one-time prerequisite)

The user needs to create an app in Azure before they can authenticate. Ask first: are you using a work/school account or a personal Microsoft account (outlook.com, hotmail.com, live.com)?

  1. Go to https://portal.azure.com
  2. Search for "App registrations" → click it → "New registration"
  3. Set:
    • Name: Office Assistant
    • Supported account types:
      • Work/school: "Accounts in this organizational directory only"
      • Personal: "Personal Microsoft accounts only"
    • Redirect URI: leave blank
  4. Click "Register"
  5. Copy the Application (client) ID from the overview page
  6. Go to Authentication → set Allow public client flows to Yes → Save
  7. Go to API permissions → "Add a permission" → Microsoft Graph → Delegated:
    • Work/school: Calendars.ReadWrite, Calendars.ReadWrite.Shared, Place.Read.All, User.Read
    • Personal: Calendars.ReadWrite and User.Read only
    • Click "Add permissions"

Tip: Work/school accounts may need an Azure AD admin to grant consent. If you can't get admin approval, use a personal account instead — it doesn't require any admin.

Then run uv run python -m office_assistant.setup and follow the prompts.

Troubleshooting

  • "CLIENT_ID and TENANT_ID must be set": Run uv run python -m office_assistant.setup to create the .env file.
  • "Application is configured for use by Microsoft Account users only" / "AADSTS9002346": Set TENANT_ID=consumers in .env for personal accounts.
  • Device code expires immediately: The requested scopes may be wrong. Personal accounts don't support Calendars.ReadWrite.Shared — make sure you're on the latest code.
  • "ErrorAccessDenied": Check API permissions in the Azure Portal.
  • "Approval required" / admin consent screen: The user's organisation requires admin approval. They can ask their IT admin to grant consent, or use a personal Microsoft account instead.
  • Want to start fresh?: Run uv run python -m office_assistant.setup — it will detect the expired token and walk you through signing in again.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.