verify

GitHub

用于验证 claude-for-msft-365-install 管理脚本的正确性。通过隔离环境运行 shell 和 PowerShell 脚本,执行 lint 检查、模拟操作及数据快照对比,确保清除插件缓存时不丢失用户聊天记录,并覆盖跨应用和大小写等边界情况。

claude-for-msft-365-install/.claude/skills/verify/SKILL.md anthropics/financial-services

Trigger Scenarios

需要验证安装或管理脚本在隔离环境中的行为 测试破坏性命令如 --apply 的安全性 检查脚本对真实数据(如聊天历史)的影响

Install

npx skills add anthropics/financial-services --skill verify -g -y
More Options

Non-standard path

npx skills add https://github.com/anthropics/financial-services/tree/main/claude-for-msft-365-install/.claude/skills/verify -g -y

Use without installing

npx skills use anthropics/financial-services@verify

指定 Agent (Claude Code)

npx skills add anthropics/financial-services --skill verify -a claude-code -g -y

安装 repo 全部 skill

npx skills add anthropics/financial-services --all -g -y

预览 repo 内 skill

npx skills add anthropics/financial-services --list

SKILL.md

Frontmatter
{
    "name": "verify",
    "description": "Verify changes to the claude-for-msft-365-install admin scripts and commands by driving them against an isolated fake $HOME."
}

Verifying claude-for-msft-365-install

This plugin is admin CLI tooling, not an app. There is nothing to build and no server to boot. The surface is the terminal: scripts/*.sh on macOS, scripts/*.ps1 on Windows.

Lint gate

python3 scripts/check.py           # from the REPO ROOT, not the plugin dir
bash -n claude-for-msft-365-install/scripts/<script>.sh

check.py lints every manifest and self-installs the pre-commit hook that patch-bumps .claude-plugin/plugin.json. Run it before committing.

Drive the scripts against a fake $HOME

Every macOS script resolves Office paths from $HOME, so overriding it gives a throwaway sandbox — you can exercise the destructive --apply paths without touching real Office data.

S=<scratchpad>/sandbox
for app in Excel Word Powerpoint; do
  mkdir -p "$S/Library/Containers/com.microsoft.$app/Data/Documents/wef"
done
printf '<x/>' > "$S/Library/Containers/com.microsoft.Excel/Data/Documents/wef/aaaaaaaa-1111-1111-1111-111111111111.manifest-a.xml"

HOME=$S ./scripts/clear-addin-cache.sh                      # list
HOME=$S ./scripts/clear-addin-cache.sh --id <GUID>          # dry-run
HOME=$S ./scripts/clear-addin-cache.sh --id <GUID> --apply  # destructive

Seed at least two IDs across two apps, with mixed upper/lowercase. Both properties have caught real bugs: cross-app blast radius, and a case-sensitive glob that reported "already clear" and sent admins to a folder-wide wipe.

Prove storage is retained

The load-bearing claim of this plugin is that clearing a manifest never touches the user's chat history. Verify it by snapshot-diffing both trees around the operation, against the real $HOME:

snap() {
  for app in Excel Word Powerpoint; do
    find "$HOME/Library/Containers/com.microsoft.$app/Data/Library/WebKit/WebsiteData" \
         -type f -exec stat -f '%N %z %m' {} \; 2>/dev/null
    find "$HOME/Library/Containers/com.microsoft.$app/Data/Documents/wef" \
         -type f -exec stat -f 'WEF %N %z' {} \; 2>/dev/null
  done | sort
}
snap > before.txt;  <run the script>;  snap > after.txt;  diff before.txt after.txt

Manifests live in Data/Documents/wef; storage lives in Data/Library/WebKit/WebsiteData. Different subtrees — the diff should show only the manifest you removed. Restore any planted files and re-diff to confirm you left the machine as you found it.

Gotchas

  • The Bash tool runs zsh. Scripts are #!/usr/bin/env bash; test bash-only behaviour (shopt, glob semantics) inside bash <<'EOF' … EOF, not inline.

  • PRAGMA integrity_check and SELECT count(*) fail on exported IndexedDB files with no such collation sequence: IDBKEY. That is WebKit's custom collation, not corruption — it fails on the source file too. Verify completeness with SELECT sum(length(value)) FROM Records; on both sides.

  • Never claim the .ps1 scripts work without running them on Windows. macOS has no PowerShell, so a .ps1 change verified only here is unverified. Run it on a real Windows host against Windows PowerShell 5.1, and always include a parse check before the behavioural ones:

    $e = $null
    [System.Management.Automation.PSParser]::Tokenize(
      (Get-Content -Raw .\clear-addin-cache.ps1), [ref]$e) | Out-Null
    if ($e.Count) { $e | ForEach-Object { $_.Message } } else { 'parse ok' }
    

    A file can be perfectly fine on macOS and fail to parse outright on Windows (see the ASCII note below), so parsing is the first thing to establish.

  • .ps1 files must be pure ASCII (enforced by scripts/check.py). Windows PowerShell 5.1 reads a BOM-less .ps1 as ANSI, so an em dash decodes to mojibake containing ", which terminates a string and breaks the parse. clear-addin-cache.ps1 shipped broken this way and no macOS check caught it.

  • Probe the arg parser. --flag as the final argument makes shift 2 fail under set -e and exits 1 with no output; each flag needs a [ $# -ge 2 ] guard.

Version History

  • 3865222 Current 2026-08-20 07:51

Same Skill Collection

plugins/agent-plugins/earnings-reviewer/skills/audit-xls/SKILL.md
plugins/agent-plugins/earnings-reviewer/skills/earnings-analysis/SKILL.md
plugins/agent-plugins/earnings-reviewer/skills/earnings-preview/SKILL.md
plugins/agent-plugins/earnings-reviewer/skills/model-update/SKILL.md
plugins/agent-plugins/earnings-reviewer/skills/morning-note/SKILL.md
plugins/agent-plugins/earnings-reviewer/skills/xlsx-author/SKILL.md
plugins/agent-plugins/gl-reconciler/skills/audit-xls/SKILL.md
plugins/agent-plugins/gl-reconciler/skills/break-trace/SKILL.md
plugins/agent-plugins/gl-reconciler/skills/gl-recon/SKILL.md
plugins/agent-plugins/gl-reconciler/skills/xlsx-author/SKILL.md
plugins/agent-plugins/kyc-screener/skills/kyc-doc-parse/SKILL.md
plugins/agent-plugins/kyc-screener/skills/kyc-rules/SKILL.md
plugins/agent-plugins/kyc-screener/skills/xlsx-author/SKILL.md
plugins/agent-plugins/market-researcher/skills/competitive-analysis/SKILL.md
plugins/agent-plugins/market-researcher/skills/idea-generation/SKILL.md
plugins/agent-plugins/market-researcher/skills/pptx-author/SKILL.md
plugins/agent-plugins/market-researcher/skills/sector-overview/SKILL.md
plugins/agent-plugins/meeting-prep-agent/skills/client-report/SKILL.md
plugins/agent-plugins/meeting-prep-agent/skills/client-review/SKILL.md
plugins/agent-plugins/meeting-prep-agent/skills/investment-proposal/SKILL.md
plugins/agent-plugins/meeting-prep-agent/skills/pptx-author/SKILL.md
plugins/agent-plugins/model-builder/skills/3-statement-model/SKILL.md
plugins/agent-plugins/model-builder/skills/audit-xls/SKILL.md
plugins/agent-plugins/model-builder/skills/dcf-model/SKILL.md
plugins/agent-plugins/model-builder/skills/lbo-model/SKILL.md
plugins/agent-plugins/model-builder/skills/xlsx-author/SKILL.md
plugins/agent-plugins/month-end-closer/skills/accrual-schedule/SKILL.md
plugins/agent-plugins/month-end-closer/skills/audit-xls/SKILL.md
plugins/agent-plugins/month-end-closer/skills/roll-forward/SKILL.md
plugins/agent-plugins/month-end-closer/skills/variance-commentary/SKILL.md
plugins/agent-plugins/month-end-closer/skills/xlsx-author/SKILL.md
plugins/agent-plugins/pitch-agent/skills/3-statement-model/SKILL.md
plugins/agent-plugins/pitch-agent/skills/audit-xls/SKILL.md
plugins/agent-plugins/pitch-agent/skills/dcf-model/SKILL.md
plugins/agent-plugins/pitch-agent/skills/deck-refresh/SKILL.md
plugins/agent-plugins/pitch-agent/skills/lbo-model/SKILL.md
plugins/agent-plugins/pitch-agent/skills/pitch-deck/SKILL.md
plugins/agent-plugins/pitch-agent/skills/pptx-author/SKILL.md
plugins/agent-plugins/pitch-agent/skills/sector-overview/SKILL.md
plugins/agent-plugins/pitch-agent/skills/xlsx-author/SKILL.md
plugins/agent-plugins/statement-auditor/skills/audit-xls/SKILL.md
plugins/agent-plugins/statement-auditor/skills/nav-tieout/SKILL.md
plugins/agent-plugins/statement-auditor/skills/xlsx-author/SKILL.md
plugins/agent-plugins/valuation-reviewer/skills/ic-memo/SKILL.md
plugins/agent-plugins/valuation-reviewer/skills/portfolio-monitoring/SKILL.md
plugins/agent-plugins/valuation-reviewer/skills/returns-analysis/SKILL.md
plugins/agent-plugins/valuation-reviewer/skills/xlsx-author/SKILL.md
plugins/partner-built/lseg/skills/bond-futures-basis/SKILL.md
plugins/partner-built/lseg/skills/bond-relative-value/SKILL.md

Metadata

Files
0
Version
3865222
Hash
71b261fb
Indexed
2026-08-20 07:51

inicio - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-22 09:49
浙ICP备14020137号-1 $mapa de visitantes$