MCPcopy Create free account

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

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

↓ 111 callersFunctiondebug_log
Append debug message to log file with timestamp.
plugins/security-guidance/hooks/_base.py:56
↓ 40 callersFunctionemit_metrics
Write a SyncHookJSONOutput line to stdout for Claude Code to pick up. For asyncRewake (Stop) hooks, CC scans stdout for the first {-prefixed
plugins/security-guidance/hooks/security_reminder_hook.py:194
↓ 22 callersFunctionline
(...a)
plugins/session-report/skills/session-report/analyze-sessions.mjs:752
↓ 17 callersFunctionwith_locked_state
Execute callback with exclusive access to the state file. The callback receives the state dict and can modify it in place. State is saved
plugins/security-guidance/hooks/session_state.py:118
↓ 14 callersFunctionfmt
(n)
plugins/session-report/skills/session-report/analyze-sessions.mjs:603
↓ 10 callersFunction_skip
(reason, restore=False, **extra)
plugins/security-guidance/hooks/security_reminder_hook.py:1881
↓ 8 callersFunctionhandleInbound
( ctx: Context, text: string, downloadImage: (() => Promise<string | undefined>) | undefined, attachme
external_plugins/telegram/server.ts:900
↓ 7 callersFunctiontotalIn
(s)
plugins/session-report/skills/session-report/analyze-sessions.mjs:837
↓ 6 callersFunction_format_vulns_guidance
Render a vuln list into the user-facing guidance block. Shared by analyze_code_security, agentic_review, and the late-dedup paths in the Stop
plugins/security-guidance/hooks/llm.py:679
↓ 6 callersFunction_git_toplevel
Absolute repo root for `cwd`, or None if not in a work tree.
plugins/security-guidance/hooks/gitutil.py:168
↓ 6 callersFunction_record_http_error
Record an HTTP error from an LLM API call. `status` is the HTTP status code (integer 400–599) or -1 for network/timeout errors. Stored in `_US
plugins/security-guidance/hooks/_base.py:180
↓ 6 callersFunctionanalyze_code_security
Use Haiku to perform a security review of code. files: list of (file_path, content_or_diff) tuples is_diff: if True, the content is a uni
plugins/security-guidance/hooks/llm.py:789
↓ 6 callersFunctionbumpSkill
(s, name)
plugins/session-report/skills/session-report/analyze-sessions.mjs:514
↓ 6 callersMethodevaluate_rules
Evaluate all rules and return combined results. Checks all rules and accumulates matches. Blocking rules take priority over warning r
plugins/hookify/core/rule_engine.py:35
↓ 6 callersFunctionhr
()
plugins/session-report/skills/session-report/analyze-sessions.mjs:753
↓ 6 callersFunctionloadAccess
()
external_plugins/telegram/server.ts:189
↓ 5 callersFunctionfence
plugins/code-modernization/workflows/extract-rules.js:51
↓ 5 callersFunctionfetchAllowedChannel
(id: string)
external_plugins/discord/server.ts:405
↓ 5 callersFunctionloadAccess
()
external_plugins/discord/server.ts:191
↓ 5 callersFunctionsendText
(chatGuid: string, text: string)
external_plugins/imessage/server.ts:459
↓ 4 callersFunction_call_claude
Call the configured LLM model with extended thinking and structured outputs. Model defaults to Sonnet 4.6 but can be overridden via SECURITY_
plugins/security-guidance/hooks/llm.py:448
↓ 4 callersFunction_finding_keys
(findings: List[Dict[str, Any]])
plugins/security-guidance/hooks/llm.py:759
↓ 4 callersFunction_norm
(s: str)
plugins/security-guidance/hooks/llm.py:1465
↓ 4 callersFunction_norm
(s: str)
plugins/security-guidance/hooks/review_api.py:317
↓ 4 callersFunctionflag
(name, dflt)
plugins/session-report/skills/session-report/analyze-sessions.mjs:39
↓ 4 callersFunctiongenerate_html
Generate HTML report from loop output data. If auto_refresh is True, adds a meta refresh tag.
plugins/skill-creator/skills/skill-creator/scripts/generate_report.py:16
↓ 4 callersFunctionhrs
(ms)
plugins/session-report/skills/session-report/analyze-sessions.mjs:612
↓ 4 callersFunctionload_rules
Load all hookify rules from .claude directory. Args: event: Optional event filter ("bash", "file", "stop", etc.) Returns: Li
plugins/hookify/core/config_loader.py:198
↓ 4 callersFunctionnewStats
()
plugins/session-report/skills/session-report/analyze-sessions.mjs:66
↓ 4 callersFunctionparse_skill_md
Parse a SKILL.md file, returning (name, description, full_content).
plugins/skill-creator/skills/skill-creator/scripts/utils.py:7
↓ 4 callersFunctionprintBlock
(title, s, indent = '')
plugins/session-report/skills/session-report/analyze-sessions.mjs:841
↓ 4 callersFunctionsafeName
(s: string | undefined)
external_plugins/telegram/server.ts:896
↓ 4 callersFunctionsaveAccess
(a: Access)
external_plugins/telegram/server.ts:202
↓ 4 callersFunctionsummarize
(s)
plugins/session-report/skills/session-report/analyze-sessions.mjs:616
↓ 3 callersFunction_append_reviewed_shas
Record that `shas` were reviewed. Best-effort; never raises. Uses fcntl.flock for the read-gc-write; appends are O_APPEND-atomic but GC needs
plugins/security-guidance/hooks/diffstate.py:282
↓ 3 callersFunction_cap_files_for_prompt
Cap per-file and total content bytes before they're packed into the review prompt. Returns the capped (path, content) list. Sets module-level
plugins/security-guidance/hooks/llm.py:225
↓ 3 callersFunction_dedup_against_state
Drop vulns that a CONCURRENT asyncRewake hook wrote to previous_findings while this hook's LLM was running. `prompted` is the (filePath, cate
plugins/security-guidance/hooks/llm.py:764
↓ 3 callersFunction_format_vulns_summary
One-liner for the user-facing task-notification summary. The full guidance goes to the model via stderr; this is the line the user actually s
plugins/security-guidance/hooks/llm.py:718
↓ 3 callersFunction_prioritize_diff_files
When `diff_files` exceeds `cap`, return the top-`cap` by security relevance plus the count dropped. Otherwise return (diff_files, 0). Score =
plugins/security-guidance/hooks/gitutil.py:582
↓ 3 callersFunction_record_usage
Accumulate one API response's token usage. `usage` is the Anthropic `usage` dict (HTTP) or the SDK ResultMessage.usage dict — both use the sam
plugins/security-guidance/hooks/_base.py:147
↓ 3 callersFunction_run
(system: str, prompt: str, *, schema: Dict[str, Any] )
plugins/security-guidance/hooks/llm.py:1360
↓ 3 callersFunction_scrub
(s: object)
plugins/security-guidance/hooks/llm.py:1408
↓ 3 callersFunctionassertAllowedChat
(chat_id: string)
external_plugins/telegram/server.ts:195
↓ 3 callersFunctioncalculate_stats
Calculate mean, stddev, min, max for a list of values.
plugins/skill-creator/skills/skill-creator/scripts/aggregate_benchmark.py:45
↓ 3 callersFunctioncheck_patterns
Check if file path or content matches any security patterns. Returns ALL matches.
plugins/security-guidance/hooks/security_reminder_hook.py:452
↓ 3 callersFunctiondedupKey
plugins/code-modernization/workflows/extract-rules.js:182
↓ 3 callersFunctiondmCommandGate
(ctx: Context)
external_plugins/telegram/server.ts:288
↓ 3 callersFunctionfetch
(req, server)
external_plugins/fakechat/server.ts:153
↓ 3 callersFunctionfind_runs
Recursively find directories that contain an outputs/ subdirectory.
plugins/skill-creator/skills/skill-creator/eval-viewer/generate_review.py:60
↓ 3 callersFunctionloadAccess
()
external_plugins/imessage/server.ts:278
↓ 3 callersFunctionparse_diff_into_files
Parse unified diff output into a list of (file_path, diff_content) tuples. Only includes files with source code extensions.
plugins/security-guidance/hooks/gitutil.py:685
↓ 3 callersFunctionpromptTotal
(r)
plugins/session-report/skills/session-report/analyze-sessions.mjs:722
↓ 3 callersFunctionsaveAccess
(a: Access)
external_plugins/discord/server.ts:195
↓ 3 callersFunctionsaveAccess
(a: Access)
external_plugins/imessage/server.ts:282
↓ 2 callersFunction_agentic_commit_review_enabled
Agentic commit review gate. Enabled by default. SG_AGENTIC_COMMIT_REVIEW (=1/on or =0/off) remains as an explicit per-user override for opt-o
plugins/security-guidance/hooks/llm.py:1061
↓ 2 callersFunction_agentic_review_with_race
Race the agentic reviewer against a delayed single-shot fallback. Agentic starts at t=0. After SG_AGENTIC_RACE_DELAY_S (default 180s), the si
plugins/security-guidance/hooks/security_reminder_hook.py:935
↓ 2 callersFunction_agentic_spawn_env
opts.env for the SDK-spawned inner `claude` CLI. Always neutralizes the fd-passing vars (a stale/closed fd makes the inner CLI runaway-alloca
plugins/security-guidance/hooks/llm.py:1091
↓ 2 callersFunction_anthropic_base_url
Resolve the Anthropic-protocol endpoint base URL. Honors ANTHROPIC_BASE_URL (the convention the Anthropic SDK and CC itself use) so customers
plugins/security-guidance/hooks/llm.py:157
↓ 2 callersFunction_arun
()
plugins/security-guidance/hooks/llm.py:388
↓ 2 callersFunction_build_auth_headers
(use_token)
plugins/security-guidance/hooks/llm.py:258
↓ 2 callersFunction_call_claude
Run `claude -p` with the prompt on stdin and return the text response. Prompt goes over stdin (not argv) because it embeds the full SKILL.md
plugins/skill-creator/skills/skill-creator/scripts/improve_description.py:20
↓ 2 callersFunction_call_claude_dual_or
Run prompt through the model 2× in parallel and OR-merge the results. The second look samples the model again on the same prompt — independent
plugins/security-guidance/hooks/llm.py:600
↓ 2 callersFunction_config_paths
Existing config file paths, lowest precedence first (so concat reads in precedence order user → project → project-local). Truncation is done on
plugins/security-guidance/hooks/extensibility.py:92
↓ 2 callersFunction_encode_err_kind
Map err_kind string to its telemetry integer code, or 0 if unset. Direct hits use the static map; "exc:<X>" and "other:<tail>" both collapse t
plugins/security-guidance/hooks/ensure_agent_sdk.py:174
↓ 2 callersFunction_git_dir
Absolute shared `.git` directory for repo_root. Uses `rev-parse --git-common-dir` so linked worktrees resolve to the SHARED gitdir, not the p
plugins/security-guidance/hooks/gitutil.py:186
↓ 2 callersFunction_git_name_only
Return the set of repo-root-relative paths that differ from `base`, or None if git failed (unresolvable ref, not a repo, timeout). Callers mus
plugins/security-guidance/hooks/gitutil.py:353
↓ 2 callersFunction_git_rev_parse_head
Return the current HEAD SHA, or None if not a git repo / no commits.
plugins/security-guidance/hooks/gitutil.py:43
↓ 2 callersFunction_hit
(globs: Tuple[str, ...])
plugins/security-guidance/hooks/extensibility.py:251
↓ 2 callersFunction_inject_agent_sdk_venv_into_syspath
Prepend the agent-SDK venv's site-packages to sys.path so the SDK import below picks it up when the user's system Python doesn't have it. Cal
plugins/security-guidance/hooks/llm.py:34
↓ 2 callersFunction_is_reviewable_source
(file_path)
plugins/security-guidance/hooks/gitutil.py:620
↓ 2 callersFunction_is_signal_kill
A subprocess killed by a signal rather than a clean non-zero exit. subprocess.run (no shell, as used here) reports negative rc = -signum (SIGK
plugins/security-guidance/hooks/ensure_agent_sdk.py:208
↓ 2 callersFunction_item
(v)
plugins/security-guidance/hooks/llm.py:733
↓ 2 callersFunction_load_reviewed_shas
Set of full 40-hex shas previously reviewed in this clone.
plugins/security-guidance/hooks/diffstate.py:265
↓ 2 callersFunction_once
()
plugins/security-guidance/hooks/llm.py:407
↓ 2 callersFunction_probe_anthropic
(timeout: float = 5.0)
plugins/security-guidance/hooks/llm.py:169
↓ 2 callersFunction_push_section
Return the slice of `bash_output` that contains the push's range lines. `_PUSH_RANGE_RE` is not push-specific — `git fetch` and `git pull` print
plugins/security-guidance/hooks/security_reminder_hook.py:835
↓ 2 callersFunction_render
(items)
plugins/security-guidance/hooks/llm.py:740
↓ 2 callersFunction_reviewed_shas_path
(repo_root)
plugins/security-guidance/hooks/diffstate.py:260
↓ 2 callersFunction_run
(env)
plugins/security-guidance/hooks/gitutil.py:365
↓ 2 callersFunction_state_key
(session_id)
plugins/security-guidance/hooks/session_state.py:25
↓ 2 callersFunction_target_dir
(state_dir)
plugins/security-guidance/hooks/ensure_agent_sdk.py:355
↓ 2 callersFunction_temp_index
Yield an env dict pointing GIT_INDEX_FILE at a throwaway copy of the repo's index with `git add --intent-to-add` applied, so untracked files s
plugins/security-guidance/hooks/gitutil.py:112
↓ 2 callersFunction_write_cooldown
Start/refresh the signal-kill cooldown so we stop re-attempting a build that keeps getting killed every session. Best-effort.
plugins/security-guidance/hooks/ensure_agent_sdk.py:230
↓ 2 callersFunctionagentic_review
Two-stage Agent-SDK review: investigate (Read/Grep/Glob over the repo) then a self-refute filter pass. Returns (guidance_or_None, vulns, metri
plugins/security-guidance/hooks/llm.py:1138
↓ 2 callersFunctionaggregate_runs
(results: list[dict])
plugins/skill-creator/skills/skill-creator/scripts/generate_report.py:227
↓ 2 callersFunctionallowedChatGuids
()
external_plugins/imessage/server.ts:292
↓ 2 callersFunctionappleDate
(ns: number)
external_plugins/imessage/server.ts:78
↓ 2 callersFunctionatomic_check_rate_limit
Rolling-window rate limit: allow at most `max_per_window` calls per `window_s` seconds, per (session_id, key). Returns (allowed: bool, count_
plugins/security-guidance/hooks/security_reminder_hook.py:337
↓ 2 callersFunctionbirthtime
(p)
plugins/session-report/skills/session-report/analyze-sessions.mjs:519
↓ 2 callersFunctionbroadcast
(m: Wire)
external_plugins/fakechat/server.ts:45
↓ 2 callersFunctionbuildContext
(pk)
plugins/session-report/skills/session-report/analyze-sessions.mjs:494
↓ 2 callersFunctionconversationHeader
(guid: string)
external_plugins/imessage/server.ts:504
↓ 2 callersFunctiondefaultAccess
()
external_plugins/telegram/server.ts:119
↓ 2 callersFunctiondefaultAccess
()
external_plugins/discord/server.ts:123
↓ 2 callersFunctiondefaultAccess
()
external_plugins/imessage/server.ts:218
↓ 2 callersFunctiondeliver
(id: string, text: string, file?: { path: string; name: string })
external_plugins/fakechat/server.ts:135
↓ 2 callersFunctionechoKey
(raw: string)
external_plugins/imessage/server.ts:434
↓ 2 callersFunctionensure_anthropic_reachable
Run once. Under a remote/proxied environment, probe api.anthropic.com; if blackholed, scrub NO_PROXY and re-probe. Returns True if reachable (
plugins/security-guidance/hooks/llm.py:189
↓ 2 callersFunctionextract_frontmatter
Extract YAML frontmatter and message body from markdown. Returns (frontmatter_dict, message_body). Supports multi-line dictionary items in l
plugins/hookify/core/config_loader.py:87
↓ 2 callersFunctionfencedSpec
plugins/code-modernization/workflows/extract-rules.js:54
next →1–100 of 313, ranked by callers