MCPcopy Create free account

hub / github.com/anthropics/claude-plugins-official / functions

Functions313 in github.com/anthropics/claude-plugins-official

↓ 2 callersFunctionfetchTextChannel
(id: string)
external_plugins/discord/server.ts:394
↓ 2 callersFunctionfind_project_root
Find the project root by walking up from cwd looking for .claude/. Mimics how Claude Code discovers its project root, so the command file we
plugins/skill-creator/skills/skill-creator/scripts/run_eval.py:22
↓ 2 callersMethodfrom_dict
Create Rule from frontmatter dict and message body.
plugins/hookify/core/config_loader.py:45
↓ 2 callersFunctiongenerate_html
Generate the complete standalone HTML page with embedded data.
plugins/skill-creator/skills/skill-creator/eval-viewer/generate_review.py:250
↓ 2 callersFunctionget_git_diff
Get the git diff between the baseline SHA and the current working tree, including untracked (new) files. Uses a temporary copy of the gi
plugins/security-guidance/hooks/gitutil.py:460
↓ 2 callersFunctionget_state_file
Get session-specific state file path.
plugins/security-guidance/hooks/session_state.py:37
↓ 2 callersFunctionimprove_description
Call Claude to improve the description based on eval results.
plugins/skill-creator/skills/skill-creator/scripts/improve_description.py:50
↓ 2 callersFunctionjudge
(finding, stance, label)
plugins/code-modernization/workflows/harden-scan.js:135
↓ 2 callersFunctionload_state
Load the full state dict from file.
plugins/security-guidance/hooks/session_state.py:88
↓ 2 callersFunctionmessageText
(r: Row)
external_plugins/imessage/server.ts:498
↓ 2 callersFunctionpct
(a, b)
plugins/session-report/skills/session-report/analyze-sessions.mjs:609
↓ 2 callersFunctionprint_eval_stats
(label, results, elapsed)
plugins/skill-creator/skills/skill-creator/scripts/run_loop.py:154
↓ 2 callersFunctionpruneExpired
(a: Access)
external_plugins/telegram/server.ts:210
↓ 2 callersFunctionreadAccessFile
()
external_plugins/telegram/server.ts:147
↓ 2 callersFunctionreadAccessFile
()
external_plugins/discord/server.ts:151
↓ 2 callersFunctionreadAccessFile
()
external_plugins/imessage/server.ts:241
↓ 2 callersFunctionrestore_unreviewed_stop_state
Put consumed touched_paths back so the next Stop reviews them. consume_stop_state cleared touched_paths on disk; if Stop then exits early for
plugins/security-guidance/hooks/diffstate.py:116
↓ 2 callersFunctionrule_names_to_mask
Pack a set of rule names into a bitmask. Bit N set means RuleId(N) matched. User-defined patterns (rule_name starting with "user:") have no static
plugins/security-guidance/hooks/patterns.py:352
↓ 2 callersFunctionrun_eval
Run the full eval set and return results.
plugins/skill-creator/skills/skill-creator/scripts/run_eval.py:184
↓ 2 callersFunctionsafeAttName
(att: Attachment)
external_plugins/discord/server.ts:436
↓ 2 callersFunctionsave_state
Save the full state dict to file.
plugins/security-guidance/hooks/session_state.py:104
↓ 2 callersFunctionscore_class
(correct: int, total: int)
plugins/skill-creator/skills/skill-creator/scripts/generate_report.py:244
↓ 2 callersFunctionsites
plugins/code-modernization/workflows/uplift-deltas.js:196
↓ 2 callersFunctiontopPrompts
(n)
plugins/session-report/skills/session-report/analyze-sessions.mjs:728
↓ 2 callersFunctiontrackEcho
(chatGuid: string, key: string)
external_plugins/imessage/server.ts:445
↓ 2 callersFunctionvalidate_skill
Basic validation of a skill
plugins/skill-creator/skills/skill-creator/scripts/quick_validate.py:12
↓ 1 callersFunction_bootstrap_pywin32
Manually replicate the pywin32 `.pth` bootstrap so a venv added via `sys.path.insert()` (not site.py) can still import `pywintypes`. No-op whe
plugins/security-guidance/hooks/llm.py:76
↓ 1 callersFunction_build_via_target
Fallback install when `python -m venv` can't bootstrap pip (ensurepip missing — Debian python3-venv absent, or a python.org/pyenv build without
plugins/security-guidance/hooks/ensure_agent_sdk.py:379
↓ 1 callersFunction_call_claude_via_sdk
Single-turn SDK call as a substitute for the HTTP _call_claude path on 3P providers. Uses the same `output_format` JSON-schema contract so the
plugins/security-guidance/hooks/llm.py:341
↓ 1 callersMethod_check_condition
Check if a single condition matches. Args: condition: Condition to check tool_name: Tool being used tool_
plugins/hookify/core/rule_engine.py:144
↓ 1 callersFunction_claim_bash_hook_once
De-dupe across hooks.json `if` matchers firing for the same Bash call. `git commit -m x && git push` matches both `Bash(git commit:*)` and `B
plugins/security-guidance/hooks/security_reminder_hook.py:742
↓ 1 callersFunction_compute_push_sweep_base
Advance the diff base past the contiguous reviewed prefix. Spec: review `git diff B..HEAD` where `B` is the newest commit such that `prev_ups
plugins/security-guidance/hooks/security_reminder_hook.py:813
↓ 1 callersFunction_cooldown_remaining
Seconds left in the signal-kill cooldown (0 if none/expired). Reads the marker's mtime; a missing/unreadable marker means not in cooldown.
plugins/security-guidance/hooks/ensure_agent_sdk.py:219
↓ 1 callersFunction_detect_main_branch
(repo_root)
plugins/security-guidance/hooks/gitutil.py:251
↓ 1 callersFunction_detect_prev_upstream
Where the remote was BEFORE this push. Preference order: 1. Parse `abc..def` from push stdout — authoritative, exact. 2. `<branch>@{u
plugins/security-guidance/hooks/security_reminder_hook.py:872
↓ 1 callersFunction_diff_pathspec
Convert absolute touched-paths to repo-relative pathspec args for git diff. Paths outside cwd (e.g. ~/.claude/…) are dropped. Returns the list
plugins/security-guidance/hooks/gitutil.py:90
↓ 1 callersFunction_dual_or_enabled
Gate for the two-call dual_or review path. Default OFF — the second call roughly doubles API spend for the review. For users paying their own
plugins/security-guidance/hooks/llm.py:589
↓ 1 callersFunction_encode_errno
Extract the OS errno from an "exc:<TypeName>:<errno>" err_kind. OSError-family exceptions embed their errno (ENOENT=2, EACCES=13, ENOSPC=28, …
plugins/security-guidance/hooks/ensure_agent_sdk.py:286
↓ 1 callersFunction_encode_exc_kind
Map an "exc:<TypeName>[:errno]" err_kind to its exception-type code (SDK_BOOTSTRAP_EXC_CODES). Returns 0 for non-exc err_kinds (so the sdk_boo
plugins/security-guidance/hooks/ensure_agent_sdk.py:272
↓ 1 callersFunction_encode_phase
Map err_phase string to its telemetry integer code, or 0 if unset. Empty/None → 0 lets `if encoded:` cleanly skip emission. Per SDK_BOOTSTRAP_
plugins/security-guidance/hooks/ensure_agent_sdk.py:167
↓ 1 callersFunction_encode_rc
Extract the subprocess returncode embedded in a 'signal_killed:<rc>' err_kind (e.g. -11 SIGSEGV / -9 SIGKILL / 139 shell-wrapped). Emitted as
plugins/security-guidance/hooks/ensure_agent_sdk.py:195
↓ 1 callersFunction_encode_stderr_sig
Bounded integer hash of the stderr tail captured in "other:<tail>" err_kinds. Lets us distinguish patterns INSIDE the _uncategorized (code 99)
plugins/security-guidance/hooks/ensure_agent_sdk.py:241
↓ 1 callersMethod_extract_field
Extract field value from tool input or hook input data. Args: field: Field name like "command", "new_text", "file_path", "reason"
plugins/hookify/core/rule_engine.py:182
↓ 1 callersFunction_find_git_index
Find the real index file for a git repo. Handles worktrees where .git is a file pointing to the main repo's gitdir. Returns the absolute
plugins/security-guidance/hooks/gitutil.py:64
↓ 1 callersFunction_find_runs_recursive
(root: Path, current: Path, runs: list[dict])
plugins/skill-creator/skills/skill-creator/eval-viewer/generate_review.py:68
↓ 1 callersFunction_git_diff_range
`git diff -p base head` as text on success, None on error. Distinguishing failure from success-with-empty-diff matters: the push-sweep caller
plugins/security-guidance/hooks/gitutil.py:227
↓ 1 callersFunction_git_reflog_recent_commits
Return (fresh_commit_shas, stale_count) from the HEAD reflog. Scans the last `max_n` reflog entries and returns the SHAs whose action is `com
plugins/security-guidance/hooks/gitutil.py:267
↓ 1 callersFunction_git_rev_list_range
Shas in `base..head`, oldest→newest. Empty list on error.
plugins/security-guidance/hooks/gitutil.py:211
↓ 1 callersFunction_git_status_porcelain
One `git status --porcelain=v1 -z` → (tracked_dirty, untracked) sets of repo-root-relative paths, or (None, None) on error. Replaces the `_tem
plugins/security-guidance/hooks/gitutil.py:389
↓ 1 callersFunction_glob_match
Match a path against include/exclude globs. ``**`` matches any depth.
plugins/security-guidance/hooks/extensibility.py:247
↓ 1 callersFunction_has_redos_structure
Heuristic catastrophic-backtracking check. Not a proof. Catches: - nested quantifiers ((a+)*, (a*b)+) - wildcard groups under repetition (
plugins/security-guidance/hooks/extensibility.py:272
↓ 1 callersFunction_intersects
(cand: dict[str, Any])
plugins/security-guidance/hooks/review_api.py:323
↓ 1 callersFunction_intersects_diff
(cand: Dict[str, Any])
plugins/security-guidance/hooks/llm.py:1471
↓ 1 callersFunction_is_3p_provider
True iff a 3P provider env var is set to a truthy value. Mirrors how the CC harness itself decides 1P vs 3P at startup. Cheap to call — no ne
plugins/security-guidance/hooks/llm.py:328
↓ 1 callersFunction_is_ancestor
True if `maybe_ancestor` is reachable from `descendant` (i.e. HEAD moved forward via commit/merge, not sideways via checkout).
plugins/security-guidance/hooks/gitutil.py:443
↓ 1 callersFunction_kill_port
Kill any process listening on the given port.
plugins/skill-creator/skills/skill-creator/eval-viewer/generate_review.py:288
↓ 1 callersFunction_list_untracked
Repo-root-relative untracked (and not-ignored) path → mtime_ns, or {} on error. Used at UPS to snapshot the pre-turn untracked set so the Stop
plugins/security-guidance/hooks/diffstate.py:334
↓ 1 callersFunction_load_guidance
(cwd: Optional[str])
plugins/security-guidance/hooks/extensibility.py:105
↓ 1 callersFunction_load_user_patterns
(cwd: Optional[str])
plugins/security-guidance/hooks/extensibility.py:147
↓ 1 callersMethod_matches_tool
Check if tool_name matches the matcher pattern. Args: matcher: Pattern like "Bash", "Edit|Write", "*" tool_name: Actu
plugins/hookify/core/rule_engine.py:127
↓ 1 callersFunction_maybe_bootstrap_agent_sdk_async
Fire-and-forget SDK bootstrap, for remote-pod environments. Under CLAUDE_CODE_SYNC_PLUGIN_INSTALL=true (CCR-style remote pods), plugins are s
plugins/security-guidance/hooks/security_reminder_hook.py:2112
↓ 1 callersFunction_maybe_emit_user_notice
Return a one-time user-visible notice when the agentic reviewer is in a persistent broken state on this machine, or None if we've already show
plugins/security-guidance/hooks/ensure_agent_sdk.py:675
↓ 1 callersFunction_model_supports_adaptive_thinking
True for models that reject the budget_tokens thinking form (4.6+).
plugins/security-guidance/hooks/llm.py:293
↓ 1 callersFunction_pip_err_from_stderr
Categorize a pip-install stderr into a known err_kind (the pip subset of SDK_BOOTSTRAP_ERR_CODES). Used by the --target fallback; mirrors the
plugins/security-guidance/hooks/ensure_agent_sdk.py:321
↓ 1 callersFunction_plugin_version_int
()
plugins/security-guidance/hooks/ensure_agent_sdk.py:426
↓ 1 callersFunction_probe_has_pip
True iff the current interpreter can run pip (`-m pip --version`). Probed only on the venv_ensurepip_fail path (see __main__), NOT on the hap
plugins/security-guidance/hooks/ensure_agent_sdk.py:302
↓ 1 callersFunction_read_config
Read a YAML or JSON config file. Returns None on missing/malformed.
plugins/security-guidance/hooks/extensibility.py:171
↓ 1 callersFunction_read_plugin_version_int
Encode plugin.json version "M.m.p" as M*10000 + m*100 + p so it fits the bool|number metrics constraint. Returns 0 if unreadable.
plugins/security-guidance/hooks/_base.py:97
↓ 1 callersMethod_regex_match
Check if pattern matches text using regex. Args: pattern: Regex pattern text: Text to match against Returns:
plugins/hookify/core/rule_engine.py:256
↓ 1 callersFunction_resolve_amend_pre_sha
For a `git commit --amend` we just ran, return the pre-amend SHA via reflog, or None if it can't be safely determined. expected_post_sha: the
plugins/security-guidance/hooks/security_reminder_hook.py:587
↓ 1 callersMethod_rule_matches
Check if rule matches input data. Args: rule: Rule to evaluate input_data: Hook input data Returns:
plugins/hookify/core/rule_engine.py:96
↓ 1 callersFunction_sdk_on_syspath
()
plugins/security-guidance/hooks/ensure_agent_sdk.py:416
↓ 1 callersFunction_strip_anthropic_from_no_proxy
()
plugins/security-guidance/hooks/llm.py:180
↓ 1 callersFunction_target_sdk_importable
True iff the --target libs dir has an importable claude_agent_sdk, probed with THIS interpreter (the one llm.py will import it from) and the t
plugins/security-guidance/hooks/ensure_agent_sdk.py:359
↓ 1 callersFunction_unchanged_since_baseline
(p)
plugins/security-guidance/hooks/diffstate.py:423
↓ 1 callersFunction_usage_metrics
Snapshot the accumulator as metric keys. Returns {} when no API calls AND no HTTP errors were made so skip-path emits don't burn key budget. c
plugins/security-guidance/hooks/_base.py:204
↓ 1 callersFunction_validate_pattern
Validate one user pattern entry. Returns a rule dict in the same shape as the built-in SECURITY_PATTERNS, or None if invalid (logged).
plugins/security-guidance/hooks/extensibility.py:199
↓ 1 callersFunction_wrap_guidance
(guidance: str)
plugins/security-guidance/hooks/extensibility.py:128
↓ 1 callersFunctionaddUsage
(s, u)
plugins/session-report/skills/session-report/analyze-sessions.mjs:86
↓ 1 callersFunctionaggregate_results
Aggregate run results into summary statistics. Returns run_summary with stats for each configuration and delta.
plugins/skill-creator/skills/skill-creator/scripts/aggregate_benchmark.py:176
↓ 1 callersFunctionassertSendable
(f: string)
external_plugins/telegram/server.ts:135
↓ 1 callersFunctionassertSendable
(f: string)
external_plugins/discord/server.ts:139
↓ 1 callersFunctionassertSendable
(f: string)
external_plugins/imessage/server.ts:230
↓ 1 callersFunctionatomic_check_and_mark_warning
Atomically check if a warning has been shown and mark it as shown if not. Returns True if this is the first time seeing this warning (should
plugins/security-guidance/hooks/security_reminder_hook.py:303
↓ 1 callersFunctionbuildByDay
()
plugins/session-report/skills/session-report/analyze-sessions.mjs:681
↓ 1 callersFunctionbuild_run
Build a run dict with prompt, outputs, and grading data.
plugins/skill-creator/skills/skill-creator/eval-viewer/generate_review.py:85
↓ 1 callersFunctioncap_diff_for_prompt
Cap per-file and total diff bytes; return (capped_files, bytes_dropped). Truncation markers are written inside the content so the reviewer kn
plugins/security-guidance/hooks/review_api.py:31
↓ 1 callersFunctioncapture_git_baseline
Capture a git ref representing the current working tree state. Uses `git stash create` which creates a commit object for the current state
plugins/security-guidance/hooks/diffstate.py:173
↓ 1 callersFunctionchunk
(text: string, limit: number, mode: 'length' | 'newline')
external_plugins/telegram/server.ts:357
↓ 1 callersFunctionchunk
(text: string, limit: number, mode: 'length' | 'newline')
external_plugins/discord/server.ts:373
↓ 1 callersFunctionchunk
(text: string, limit: number, mode: 'length' | 'newline')
external_plugins/imessage/server.ts:479
↓ 1 callersFunctionclassifyFile
(p)
plugins/session-report/skills/session-report/analyze-sessions.mjs:111
↓ 1 callersFunctioncleanup_old_state_files
Remove state files and lock files older than 30 days.
plugins/security-guidance/hooks/session_state.py:49
↓ 1 callersFunctioncompile_regex
Compile regex pattern with caching. Args: pattern: Regex pattern string Returns: Compiled regex pattern
plugins/hookify/core/rule_engine.py:15
↓ 1 callersFunctioncompute_v2_review_set
v2 diff strategy: derive the review set from git state alone. review_set = (files dirty vs current HEAD, plus files committed this turn when
plugins/security-guidance/hooks/diffstate.py:386
↓ 1 callersFunctionconsumeEcho
(chatGuid: string, key: string)
external_plugins/imessage/server.ts:451
↓ 1 callersFunctionconsume_stop_state
Atomically snapshot all state the Stop hook needs and clear touched_paths. The Stop hook is asyncRewake — it runs in the background after Claude'
plugins/security-guidance/hooks/diffstate.py:74
↓ 1 callersFunctiondownloadAttachment
(att: Attachment)
external_plugins/discord/server.ts:418
↓ 1 callersFunctionembed_file
Read a file and return an embedded representation.
plugins/skill-creator/skills/skill-creator/eval-viewer/generate_review.py:149
↓ 1 callersFunctionexpandTilde
(p: string)
external_plugins/imessage/server.ts:773
← previousnext →101–200 of 313, ranked by callers