AgentSkillsCN

update-dashboard

根据当前AI员工状态,刷新Dashboard.md。当用户希望查看最新状态,或在处理完各项事务后,这一功能将为您提供及时的信息。

SKILL.md
--- frontmatter
name: update-dashboard
description: Refresh Dashboard.md with current AI Employee status. Use when user wants to see latest status or after processing items.
allowed-tools: Read, Write, Glob, Grep

Instructions

Update the Dashboard.md file in the Obsidian vault with current system status.

Steps

  1. Identify the vault path:

    • Check environment variable VAULT_PATH or use default ~/AI_Employee_Vault
    • Verify the vault exists
  2. Count pending items:

    • List all .md files in /Needs_Action/ folder (including /Needs_Action/Email/)
    • Report the total count
  3. Read recent activity:

    • Read the most recent entries from /Logs/claude_*.log (today's date)
    • Parse JSON lines format
    • Extract last 10 entries
  4. Check watcher status:

    • Check if /Logs/watcher_*.log exists for today
    • If modified within last 2 minutes, watcher is "running"
    • Otherwise, watcher is "stopped"
  5. Check for warnings:

    • Count errors in the last hour from activity log
    • If more than 5 errors, add warning to dashboard
  6. Generate Dashboard.md:

    • Use the following template:
markdown
# AI Employee Dashboard

**Last Updated**: [TIMESTAMP]

## Status

- **Watcher**: [running/stopped/unknown]
- **Pending Items**: [COUNT]
- **Processed Today**: [COUNT]

## Recent Activity

| Time | Action | Item | Result |
|------|--------|------|--------|
| [TIME] | [ACTION] | [ITEM] | [RESULT] |

## Warnings

[LIST OF WARNINGS OR "None"]

---
*Auto-generated by AI Employee*
  1. Write the file:
    • Write to [VAULT_PATH]/Dashboard.md
    • Report success

Arguments

$ARGUMENTS - Optional vault path override (e.g., /path/to/vault)

Error Handling

  • If vault doesn't exist, report error and suggest running vault init
  • If logs don't exist, use default values (0 counts, empty activity)
  • Always complete the update even if some data is missing