一键导入
update
Skill-first update: refresh plugin methodology through the install path, then review law and practice content changes for your vault.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Skill-first update: refresh plugin methodology through the install path, then review law and practice content changes for your vault.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Legal work across any practice area — contracts, data privacy, employment, IP, corporate, securities, financial services, litigation, antitrust, M&A, tax, real estate, healthcare, government contracts, AI, insurance, international trade, consumer protection, bankruptcy, environmental. Composes five primitives (read, research, evaluate, draft, remember) to answer legal questions, research law and past decisions, review and redline documents, evaluate clauses against positions, draft memos and correspondence, manage matters and entities, and build institutional knowledge. Use PROACTIVELY for ANY legal, regulatory, or compliance request — anything mentioning a law, regulator, contract, clause, counterparty, deal, dispute, filing, policy, IP asset, or a question calling for legal judgment.
Read-only deadline sweep across your open matters: reads the deadlines: frontmatter on every matter file and reports what's overdue, due within a window (default 60 days), and upcoming — auto-renewal windows, termination-notice deadlines, sub-processor objection periods, filing and milestone dates. One sorted table; changes nothing. Missed dates are the practice's #1 malpractice vector. Use weekly, or whenever you ask 'what's due', 'what deadlines are coming up', 'anything expiring', 'what do I owe across my matters'.
Health check for a Counsel OS install: legal-root config, vault structure, plugin version vs latest, law-content currency, optional dependencies (pandoc, python-docx, bun, Playwright Chromium, qmd), browse daemon, backups, vault git, search-index freshness, vault consistency (standards ↔ library ↔ law floors), and matter-aware law impact (open matters whose law areas were refreshed after their last update) — one ✅/⚠️/❌ table with a one-line fix per finding. Pass --consistency to run only the consistency + law-impact checks (cheap pre-deal spot-check). Read-only: reports and recommends, never changes anything. Use monthly, after /counsel-os:update, or when something seems off.
Practice analytics: matter and counterparty trends, knowledge-base health, and harvesting promotable knowledge from matters (archetype/corridor playbooks, proven clause language) — plus, at sufficient volume, position drift and exception-rate analysis. Use quarterly, or every ~10 closed matters.
Guided onboarding: configure your legal root, seed content, and set up your practice profile. Run once to get started.
Refresh USER-OWNED law content in the vault against current law: custom law areas you created, files marked managed-by: user, or the entire law library when config.md sets law_management: user. Verify-and-patch with primary-source citations, supervised review, and dated last-reviewed attestations. Plugin-managed law areas are excluded — those are refreshed upstream and arrive via /counsel-os:update. Use when your own law files are stale, after adding a custom law area, or on a periodic (e.g., quarterly) cadence.
| name | update |
| description | Skill-first update: refresh plugin methodology through the install path, then review law and practice content changes for your vault. |
Counsel OS updates are LLM-orchestrated. The skill decides what is safe to do in the current runtime, explains each step, and asks before changing user-owned knowledge.
Resolve the plugin root first: the directory containing this skill. You need this to distinguish plugin documentation from the user's legal root and to find shipped content.
This is a one-time migration path for users upgrading from earlier Counsel OS versions. It is intentionally limited to /counsel-os:update; normal counsel/setup path discovery remains strict and does not silently accept legacy config.
A valid legal-root config is marked:
counsel-os-config: true
legal_root: /absolute/path/to/legal/root
First try the Finding the Legal Root procedure in skills/counsel/SKILL.md.
Check these sources in order. A source may be read only for this migration, not as a recurring fallback.
~/.counsel-os/legal-root if home-directory access is available. If it points to a directory that exists, treat that directory as the candidate legal root.{plugin_root}/config.local.md, if present. Read only legal_root:, entities_path:, matters_path:, and entity_properties: fields.Do not scan arbitrary unmarked config.md files. That was the old failure mode: plugin documentation or unrelated project files could be mistaken for user config.
Before writing anything, validate the candidate legal root:
law/, practice/, matters/, memory/, or entities/.config.md, preserve optional overrides from it only if it appears to be user config. Do not preserve unrelated prose or plugin docs.Write {legal_root}/config.md in the current format:
# Counsel OS Configuration
counsel-os-config: true
config_version: 1
legal_root: {resolved legal root}
# Optional overrides (defaults shown — uncomment to customize):
# entities_path: entities
# matters_path: matters
# auto_apply_law_updates: false # true = update applies law content without per-area approval
# law_management: plugin # 'user' = you own ALL law content; update stops syncing it (/counsel-os:law-refresh maintains it)
# entity_properties:
# type_field: counsel-os-type
# values: [counterparty, vendor, customer, prospect, matter]
If the legacy config had explicit entities_path, matters_path, or entity_properties overrides that differ from defaults, carry them forward below legal_root:. Discard legacy discovery/index configuration; knowledge search is runtime-detected.
If home-directory writes are available, update the pointer:
mkdir -p ~/.counsel-os
printf '%s' "{resolved legal root}" > ~/.counsel-os/legal-root
Report:
Migrated Counsel OS config to the current marked format at {legal_root}/config.md.
Resolve {legal_root} via the Finding the Legal Root procedure in skills/counsel/SKILL.md.
Do not read unmarked legacy configs as a fallback. If no marked config is found, ask the user to run /counsel-os:setup or provide the legal root path so setup can write the current config format.
Plugin methodology means skills, primitives, scripts, templates, and shipped knowledge. How it updates depends on install mode:
First classify the loaded plugin:
{plugin_root} itself contains .git/.{plugin_root} is under ~/.claude/plugins/cache/{marketplace}/counsel-os/{loaded_version}/.Always report:
{plugin_root}/VERSION or {plugin_root}/.claude-plugin/plugin.jsonIf shell access is available and the plugin root is a git repo, run:
git -C "${CLAUDE_PLUGIN_ROOT}" fetch origin
git -C "${CLAUDE_PLUGIN_ROOT}" merge --ff-only origin/main
If the local clone has uncommitted changes or a non-fast-forward update is needed, stop and explain the situation. Do not merge through conflicts inside the update skill.
Do not try to edit the cache directory directly. The cache is a versioned snapshot, and the current session has already loaded these skill files into memory.
If shell access is available and the loaded path matches ~/.claude/plugins/cache/{marketplace}/counsel-os/{loaded_version}/:
Derive {marketplace} and {loaded_version} from the cache path.
Refresh Claude Code's marketplace catalog so it actually discovers the new version. A raw git pull of the clone updates files on disk but NOT Claude Code's catalog metadata, so /plugin install keeps reporting "already installed." If the claude CLI is available, run:
claude plugin marketplace update {marketplace}
Determine the now-available version (claude plugin list, or read ~/.claude/plugins/marketplaces/{marketplace}/.claude-plugin/marketplace.json) and compare it against {loaded_version}.
If a newer version is available, install it for the user — no manual /plugin typing needed:
claude plugin update counsel-os@{marketplace}
This may prompt for command permission. If claude plugin update is unavailable, fall back to claude plugin uninstall counsel-os@{marketplace} followed by claude plugin install counsel-os@{marketplace}.
Apply. New skill files load only after a reload — the one step the skill cannot perform itself. Tell the user to run /reload-plugins (or start a new conversation; a full Cmd-Q restart is the safe fallback), and report the version delta applied.
/reload-plugins may still be needed for the running session to pick up changed skill files.If the claude CLI or shell access is unavailable, tell the user to run, in order: /plugin marketplace update {marketplace} → /plugin uninstall counsel-os@{marketplace} → /plugin install counsel-os@{marketplace} → /reload-plugins, then fully restart if needed.
If the user is actively developing Counsel OS from a source checkout, recommend launching Claude Code with the source repo:
claude --plugin-dir /path/to/counsel-os
This bypasses marketplace and cache layers. A new conversation is still needed to reload changed skill files.
For Claude Desktop / Cowork marketplace installs, tell the user to update or reinstall the plugin through the plugin marketplace, then start a new conversation or restart the host.
After updating methodology, tell the user whether a restart is needed. In most plugin runtimes, changed skill files load reliably only in a new conversation or after restarting the host.
The browse daemon's compiled binary is built per cache directory, so a freshly installed version has no browse/dist/browse. browse/bin/find-browse self-heals on machines with network access — it downloads the prebuilt binary (and browser builds if missing) from the plugin's GitHub release on the next browse use — but a local build is faster to first use and required when downloads are disabled.
If the user uses /counsel-os:browse, shell access and bun are available, and the new version's plugin root lacks browse/dist/browse, rebuild there:
cd ~/.claude/plugins/cache/{marketplace}/counsel-os/{new_version}
bun install
bun run build
If bun is unavailable, no action needed — tell the user the first browse command after the update will download the prebuilt binary (one-time, ~1-2 minutes).
Notes:
bunx playwright install chromium only if it is missing.~/.counsel-os/browse/browse-server.json exists — or /tmp/browse-server.json for daemons from earlier releases), run browse/dist/browse restart from the new root so the next browse use runs the new build. For a /tmp-era daemon, kill the PID from its state file and delete the /tmp file instead — the new CLI doesn't read the old location.bun install && bun run build from the new plugin root before their next browse use.Skip silently if the user does not use browse.
Compare the plugin's shipped content to the user's vault.
Ownership check first. If {legal_root}/config.md sets law_management: user, skip the entire law comparison — the user owns their law library and maintains it with /counsel-os:law-refresh. Report that law sync was skipped and why.
Otherwise, compare knowledge/law/ in the plugin root against {legal_root}/law/:
content-version date. Same-day releases produce identical dates with different content — date comparison silently misses them. With shell access, diff -rq each plugin area directory against the vault copy. Without shell, compare content-version dates but warn that same-day changes may be missed.Law areas are plugin-managed by default, so updates are safe to apply after user approval — or automatically, when the user's {legal_root}/config.md sets auto_apply_law_updates: true. Exception: any vault law file whose frontmatter contains managed-by: user is permanently user-owned — never overwrite it, even under auto-apply. When applying an area that contains marked files, copy file-by-file, skip the marked ones, and report them ("skipped N user-owned law files").
Practice files are user-owned and diverge from the seed by design — positions filled in, methods customized, local notes added. A direct seed-vs-vault diff therefore flags nearly every file and is pure noise. Never present raw seed-vs-vault differences as "updated guidance," and never overwrite practice files blindly.
Detect genuine upstream changes by diffing the new seed against the PREVIOUSLY INSTALLED version's seed:
~/.claude/plugins/cache/{marketplace}/counsel-os/{prior_version}/knowledge/practice-seed/. For local clones, use git diff {prior_ref} -- knowledge/practice-seed/.diff -rq the prior seed against the new seed. Only files changed or added upstream are candidates — everything else is either already reconciled or user-customized, and is skipped.For each candidate file:
## Our Position section and local edits.Show a concise change list:
## Update Review
Plugin methodology:
- [current status]
Law updates:
- law/data-privacy/ — updated upstream
Practice suggestions:
- practice/standards/data-protection.md — updated guidance available; user position will be preserved
Unchanged:
- [N] files already current
Ask what to apply. Apply law updates only after approval — unless auto_apply_law_updates: true is set in {legal_root}/config.md, in which case apply them directly and report what changed. Practice suggestions ALWAYS require approval after showing exactly what will change, regardless of the flag.
For approved law updates:
{legal_root}/law/ — skipping any vault file marked managed-by: user (copy file-by-file when an area contains marked files).managed-by: user so future updates skip it automatically and /counsel-os:law-refresh maintains it.For approved practice updates:
## Our Position.patch, pass --no-backup-if-mismatch and clean up afterward: find {legal_root}/practice -name '*.orig' -delete -o -name '*.rej' -delete. patch drops .orig backups (and .rej rejects on failed hunks) next to the files it touches, and the Step 9 pathspec commit will happily sweep them into the vault history. A hunk that fails entirely means the vault file diverged too far for a textual merge — fall back to applying the upstream change by hand, don't commit the .rej.For new practice files:
knowledge/practice-seed/.After applying law updates, check whether any updated law constraints affect the user's standards in {legal_root}/practice/standards/.
Flag conflicts clearly:
Action needed: updated data-privacy law guidance affects practice/standards/data-protection.md. Review breach notification timing before the next DPA.
If a content index is connected (e.g. QMD) and law or practice files were written, refresh it so the new content is retrievable immediately:
qmd update
[ -d ~/.cache/qmd/models ] && qmd embed
The index does not watch the vault — without this step, knowledge-base searches keep returning pre-update content. Skip silently when no index tool is available.
Run qmd embed only behind the model-cache check shown above: the cache exists only if the user has already opted into semantic embeddings, and a bare qmd embed on a BM25-only install triggers a surprise ~940MB one-time model download — a consent violation (setup promises embeddings stay opt-in). BM25 (qmd update) keeps search working either way.
If {legal_root} is a git repo and changes were applied, offer to commit — scoped to what this update actually touched, never git add -A:
git -C {legal_root} status --short first. Vaults routinely carry unrelated in-progress work (staged matter files, profile edits, untracked notes); a blanket add -A — or a bare git commit against a pre-loaded index — sweeps it into the update commit. Merge-tool litter (*.orig, *.rej) inside the pathspec gets swept too — confirm Step 6's cleanup ran before staging.git -C {legal_root} add law/ practice/
git -C {legal_root} commit -m "Update Counsel OS law and practice content" -- law/ practice/
Narrow the pathspec to the directories actually written this run.
If it is not a git repo, mention that version control is available but do not push it. The user can ask /counsel-os:setup to configure it.
End with:
## Update Complete
Plugin methodology: [current/updated/restart needed]
Config migration: [not needed/migrated/user action needed]
Vault content: [N] law files updated, [N] practice files added/merged, [N] skipped
Next steps: [specific review items or "none"]