harden-code-paths
БесплатноБез исполняемых скриптовНе проверенUse when asked to proactively harden a specific code path by confirming and fixing plausible edge-case, boundary, failure-mode, or lifecycle bugs, or to fix a…
от narumiruna★ 19 звёзд на GitHubОб этом скилле
Hardening Code Paths
For check-only, review, or diagnosis requests, report findings without edits instead of running the fix loop.
For requested hardening or fixes, actively inspect the relevant code path, confirm plausible edge-case and failure-mode bugs, and fix or harden them.
Do not wait for the user to enumerate cases.
Accept confirmed security findings from security-audit; leave broad threat analysis and unverified alerts in that audit workflow rather than making speculative security changes.
Default Scope
When the user does not provide files, a commit, or a diff, inspect git status --short and start with relevant staged, unstaged, and untracked paths. For a branch or pull request, determine its target from repository or PR context and include paths from the merge-base diff, such as git diff --name-only <target>...HEAD; do not assume the target is main or master. If no changed path applies, inspect the files implied by the request; if no scope can be inferred, ask for one target.
Loop
- Infer intended behavior from the user request, code, tests, docs, and sibling flows; state assumptions, but only ask when the rule is ambiguous.
- Trace the real flow end to end, including callers, sibling routes, cleanup paths, stored state, and representation changes.
- Load the edge-case checklist and select only domains reachable in this flow.
- Build a bounded risk matrix across the few dimensions most likely to interact: representative inputs, operations, before/during/after states, lifecycle events, and representations. Prioritize security, data loss, corruption, hangs, and broken core behavior; avoid exhaustive Cartesian products and unsupported platform speculation.
- Establish that each candidate violates intended behavior, then add the smallest regression test or executable check that fails before the fix when practical. For a security finding, reproduce the original attack conditions without exposing secrets or targeting an external system. If the failure cannot be verified, report the risk as unverified instead of changing behavior.
- Fix or harden each confirmed bug at the shared root path, not only the reported symptom. Put security fixes at the shared trust boundary so equivalent callers cannot bypass them.
- Run the narrow check, then scan sibling callers/routes for the same pattern, including alternate encodings, identities, tenants, or objects implicated by a security finding.
- Perform one fresh pass over the resulting diff for opposite bounds, equivalent encodings, stale or cancelled state at asynchronous boundaries, cleanup, and whether the regression test would fail if the bug returned.
- Repeat only while the fix exposes a concrete adjacent case in the same failure class; stop before materially different behavior or scope.
- Run the repo's normal verification gate before final response.
Fix Rules
- Prefer one guard or normalization in the shared boundary over repeated caller patches.
- Preserve existing contracts unless the task explicitly changes them.
- If retained state is introduced, add the minimal eviction or cleanup path.
- If a timeout or cancellation can fire, close or clear the resource too.
- If input crosses a trust boundary, validate type and shape before use; keep authentication, authorization, and tenant or object ownership checks at the authoritative boundary.
- For confirmed security findings, cover the denied attack path and a permitted control path so the fix neither bypasses policy nor breaks authorized behavior.
- If a package/config points to code, prove the referenced file exists in the packaged/runtime form.
- Keep the sibling scan bounded to the same root cause and directly affected flow. Stop and report when the next candidate requires a new behavior decision or material scope expansion.
- Stop when checks pass and the sibling scan finds no same-pattern bug; report fixed cases, checks run, and any unverified risk plainly.
- Do not return only a checklist or plan unless the user explicitly asks for one.
Установить harden-code-paths в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл harden-code-paths?
Use when asked to proactively harden a specific code path by confirming and fixing plausible edge-case, boundary, failure-mode, or lifecycle bugs, or to fix a confirmed security finding. Use review-code for read-only regression checks and security-audit for broad threat analysis or unverified security alerts.
Как установить скилл harden-code-paths?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл harden-code-paths запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic