Communitygithub.com

TongyiDai/boss-reports-to-me

老板向我汇报|Boss Reports To Me — 每周五自动沿组织架构向上取各层 leader,把他们本周你有权限可见的飞书发言/文档/纪要,按人名结构化成含总结·观点·原文·下一步的周报推给你。Agent Skill。

boss-reports-to-me 是什么?

boss-reports-to-me is a Codex agent skill that 老板向我汇报|Boss Reports To Me — 每周五自动沿组织架构向上取各层 leader,把他们本周你有权限可见的飞书发言/文档/纪要,按人名结构化成含总结·观点·原文·下一步的周报推给你。Agent Skill。.

兼容平台~Claude Code✓Codex CLI~Cursor
npx skills add TongyiDai/boss-reports-to-me

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

Boss Reports To Me (老板向我汇报)

What This Skill Does

Traverses your organizational hierarchy to collect your direct and indirect leaders (your direct supervisor + any higher levels you choose to cover) this week's Feishu assets that you have permission to view (meeting minutes, messages, documents, sorted by information density), summarizes them per person into a weekly report, and pushes it to you. Scheduled to run every Friday by default.

Important Boundary: Only uses content the current user already has permission to see (--as user does this naturally); only produces a "weekly dynamic summary", does not build leader profiles, does not evaluate performance/capability, is not used for monitoring. Collected original content is not persisted to disk and not stored in memory.

Prerequisites

  • Company Feishu account (--as user). Before running, confirm lark-cli auth status --json --verify shows identity=user and correct tenant. Strictly separate work and personal Feishu; do not mix profiles/tokens.
  • Private state directory ~/.codex/boss-reports-to-me/ (0600): roster.json (list of leaders) + state.json (scheduling + deduplication fingerprints). Can be overridden with environment variables BOSS_REPORTS_ROSTER_PATH / BOSS_REPORTS_STATE_PATH.

Decision Flow

  • First run / roster is empty → Go through "A. First-time Setup" to create roster and schedule, then run the weekly report once.
  • Roster exists, user wants a weekly report → Go through "B. Weekly Run".
  • User wants to change style, time, or add/remove leaders → Go through "C. Adjustments".
  • User wants to enable scheduled runs → Read references/scheduling.md.

A. First-time Setup

  1. Identity Check: lark-cli auth status --json --verify, confirm identity=user and correct tenant.

  2. Build Roster — Manual by default, always available (no additional authorization required):

    • Directly ask the user two things: ① "Who is your direct supervisor?" ② "Besides your direct supervisor, which higher-level leaders do you want to regularly report to you?". (Provide level hints: +2 is your boss's boss, and so on, up to +4.)
    • Resolve each name/email to an open_id:
      lark-cli contact +search-user --as user --query "name or email" --format json
      
      For multiple matches, use has_chatted: true / p2p_chat_id / department to help confirm the correct person. The user must verify before writing.
    • Write to roster (use level labels like 直属上级 or +2/+3/+4):
      python3 scripts/roster.py add --name "Zhang San" --open-id ou_xxx --level 直属上级
      python3 scripts/roster.py add --name "Li Si" --open-id ou_yyy --level +2
      
  3. (Optional) Automatic Leader Chain: If the user is willing to grant additional permissions, can automatically traverse up 4 levels via leader_open_id, saving the manual step:

    python3 scripts/leader_chain.py --levels 4
    
    • If output shows needs_scope: true: the contact:contact.base:readonly scope is missing. Guide the user through one-time authorization (lark-cli auth login --scope "contact:contact.base:readonly" --no-wait --json → give the verification_url to the user as-is, end this round → after user confirms, lark-cli auth login --device-code <device_code>), then re-run.
    • Authorization is one-time; subsequent automatic runs do not need it. Lack of authorization does not block — silently remain in manual roster mode.
    • Once the chain is obtained, read each leader's name to the user for confirmation, then use roster.py add to write them.
  4. Initialize Scheduling (default Friday 17:00, Chief-of-Staff style):

    python3 scripts/state.py init --report-time 17:00 --timezone Asia/Shanghai --weekday 4 --style chief
    
  5. Then run "B. Weekly Run" once to send the first report to the user for format confirmation before discussing scheduled runs.


B. Weekly Run

  1. Get Time Window ("last success → now", equivalent to "last Friday → this Friday"):
    python3 scripts/state.py window --at "$(date -Iseconds)"
    
  2. Get Roster: python3 scripts/roster.py show.
  3. Collect Per Leader (by information density, meeting minutes first): For each leader, collect ① Meeting minutes/notes (primary channel) → ② Messages → ③ Documents (weak signal, supplement if available). Commands, field names, and parsing pitfalls see references/collection.md. Three common gotchas:
    • For minutes, use --participant-ids (not --owner-ids, owner is almost always empty); results are in data.items;
    • IM results are in data.messages, the content field is already plain text, do not double json.loads;
    • Documents often yield no output for higher-level leaders; do not force all three categories. An empty result is a valid result.
  4. Deduplicate: Generate fingerprints for candidate content and filter those already reported:
    printf '%s' "$content" | python3 scripts/state.py fingerprint --source minute   # im / doc
    cat all_fps.txt | python3 scripts/state.py seen   # only returns items not yet reported
    
  5. Write Report: Follow the references/output-contract.md standard field template — section header metadata (name, level, department, evidence count, primary scenario) + fixed four sections (Summary/Viewpoint/Original Text/Next Steps) + uniform original item format, sorted by density (meeting minutes → messages → documents). Field order is immutable; missing fields use "—" as placeholder. Leaders with high content overlap form independent sections; higher-level leaders with fewer than 3 pieces of evidence and a single source are merged into "Higher-level Scattered Signals". Current default style is chief; when humor is selected, use nicknames ("Xiao X") instead of leader names (chief/sair use real names). Triple relevance filter.
  6. Send: Get your own open_id (lark-cli contact +get-user --as user), push:
    lark-cli im +messages-send --as user --user-id ou_SELF --markdown "<weekly report>"
    
    Rich cards go through lark-im's forced card workflow; do not manually write card JSON.
  7. Persist: After successful sending, record the success time and fingerprints (to prevent cross-week duplication):
    cat all_fps.txt | python3 scripts/state.py mark-success --at "<window.end RFC3339>"
    

C. Adjustments

  • Change style: python3 scripts/state.py set-schedule --style <chief|sair|humor> (see output-contract.md for three styles).
  • Change time/day of week: python3 scripts/state.py set-schedule --report-time 09:30 --weekday 0 (0=Monday…4=Friday).
  • Add/remove leaders: python3 scripts/roster.py add ... / remove --open-id ou_xxx / show.
  • Enable/confirm scheduled runs: See references/scheduling.md (adjust host automation to create periodic tasks and read back; if pure cron cannot trigger inference, inform user that manual triggering is required).

Privacy and Security Rules

  • Always use --as user; mixing in bot identity will result in 99992361 open_id cross app errors.
  • Only use content you have permission to view; if no permission, mark it in the report (e.g., "No permission to view minutes"), do not fabricate or extrapolate.
  • Do not treat AI meeting summaries as facts; stop drilling down when primary evidence is missing.
  • State only stores scheduling parameters + source:sha256 fingerprints; never store original content/tokens/credentials; roster only stores name/open_id/level label.
  • This is "upward" reading of people, more sensitive than reading peers: abstract into behaviors/themes, do not create character profiles, do not evaluate performance, do not use for monitoring.
  • The "Xiao X" nickname in humor style appears only in this report for the user themselves; it is a tone treatment, not persisted or shared externally.

相关技能