Token导航 LogoToken导航

Agent Skill · 研究检索

invariant-ace(不变的王牌)

invariant-ace 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

invariant-ace 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 47,767。

总安装 720周安装 30GitHub Stars 53下载 240核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:invariant-ace(不变的王牌)
来源仓库:https://github.com/tkersey/dotfiles
仓库路径:skills/invariant-ace
安装命令:
npx skills add https://github.com/tkersey/dotfiles --skill invariant-ace
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/tkersey/dotfiles --skill invariant-ace

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

用于查找、检索和筛选相关信息。invariant-ace 属于研究检索类 Skill,可作为该场景下的辅助能力补充。适合根据关键词或任务场景快速定位候选结果。可在 Codex、Claude、Cursor 等宿主环境中使用。通过 GitHub 安装,具体用法请参考原始 README。

安装前建议确认权限范围和维护状态,避免触发联网或文件操作。

来源仓库内路径:skills/invariant-ace

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/tkersey/dotfiles --skill invariant-ace;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

invariant-ace 怎么安装?

在终端执行 npx skills add https://github.com/tkersey/dotfiles --skill invariant-ace。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

invariant-ace 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

invariant-ace 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

invariant-ace 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

invariant-ace 用的人多吗?

公开数据是累计安装 720 次,近一周安装 30 次,下载 240 次,GitHub 53 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

invariant-ace 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
invariant-ace

不变的王牌 · 本页

72053需要联网未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Invariant Ace

Mission

Turn "should never happen" into "cannot happen" with minimal, high-leverage changes: pick owned, inductive invariants; enforce them at the strongest cheap boundary; prove via a concrete counterexample trace and a verification signal.

Use When (Signals)

  • Null/shape surprises, runtime validation sprawl, or input decoding scattered across the codebase.
  • Redundant stored facts drift (cache/index/denormalized columns) or "fix-up" code runs often.
  • Flags/states explode; impossible combinations appear; "unreachable" is reachable.
  • Races, duplicate/out-of-order events, retries, partial failures, or "exactly once" assumptions.
  • Idempotency keys, monotonic version/epoch checks, stale writes, or linearization questions are central.
  • Loop/algorithm correctness depends on comments or intuition; tricky indexing/arithmetic/termination.
  • "Should never happen" branches show up in logs or error trackers.

Routing Priority

  • If a task has invariant/protocol cues and also asks for broad implementation ($tk, $work), run this skill first to lock invariants, then execute edits.
  • If you cannot name state owner + transitions, switch to clarification/discovery before implementation.

Core Model (Fast Definitions)

  • Invariant: predicate P(state) intended to hold for all reachable states in a scope.
  • Inductive: true initially AND preserved by every allowed transition in that scope.
  • Owner: the single module/type/transaction/lock/actor that controls all mutations needed to preserve P.
  • Precondition/postcondition: caller obligation vs operation guarantee; do not mislabel these as invariants.
  • Derived property: recomputable fact; avoid storing it as "must match" unless you centralize updates.
  • Safety vs liveness: invariants are safety ("nothing bad"); keep progress ("eventually") separate.

Immediate Scan

  • State owner: where does the truth live (type/module/service/table)?
  • State boundary: where does raw data enter (API/DB/file/queue)?
  • Allowed transitions: list operations/events that mutate the state (including retries and concurrency).
  • Failure today: one concrete trace (inputs + transitions + schedule) that reaches a bad state.
  • Protection level: hope -> runtime -> construction-time -> type/compile-time -> persistence/protocol/atomicity.
  • Pain tag(s): data | concurrency/protocol | algorithm/loop (often multiple).

Protection Ladder

Choose the cheapest strong layer that makes the violation hard or impossible.

  • Hope-based: comments, assumptions, "unreachable".
  • Runtime: scattered guards/validators near use sites.
  • Construction-time: parse/validate once at boundaries; core code only handles refined values.
  • Type/compile-time: illegal states are unrepresentable (ADTs, typestates, opaque wrappers).
  • Persistence: schema/constraints/transactions enforce invariants at rest.
  • Concurrency boundary: locks/actors/CAS/txns define where invariants must hold (under lock, at commit, at linearization).

Protocol (Counterexample-Driven)

  1. Declare scope + owner.

- Write "P holds when/where": always | after construction | under lock | at txn commit | after message apply. - If you cannot name an owner, the invariant will drift; pick a choke point first.

  1. List transitions and try to break P.

- For each transition (and retry/out-of-order variants), attempt a counterexample trace. - If P fails, decide: bug vs wrong scope vs missing state vs wrong owner.

  1. Make P inductive (or downgrade it).

- Weaken P, move it to pre/postconditions, or add auxiliary state (version/epoch/status/idempotency key) until it closes under transitions.

  1. Run a coordination check (concurrency/distributed).

- Ask: can two individually-valid concurrent transitions merge into a P-violating state? - If yes, you need coordination (lock/txn/consensus) OR you must redesign the invariant/operation (partition, escrow, monotone merges, idempotency).

  1. Encode enforcement at the strongest cheap boundary.

- Prefer: parser/decoder + smart constructors + narrow/opaque types + centralized mutation. - Avoid: N scattered validators, duplicated truths without a single writer, and "fix-up" routines on every read.

  1. Add observability if full enforcement must be staged.

- Add cheap tripwires (assert/log/metric) and quarantine paths (reject/dead-letter/compensate). - Record replayable context (transition name, IDs, versions), not raw secrets.

  1. Verify with the right harness.

- Data: fuzz/property tests on parsers/constructors. - State machines: stateful/model-based tests (sequences). - Concurrency: stress + schedule perturbation; assert at quiescent points. - Protocols: small model checking/simulation for drops/dupes/reorder. - Algorithms: invariant assertions in loops + differential tests vs reference.

Compact Mode (Fast Path)

Use this when the task is small or time-boxed.

  1. Counterexample: one concrete failing trace (<=5 transitions).
  2. Invariants: 1-2 predicates with explicit owner + scope.
  3. Enforcement Boundary: one chosen choke point (parse/construct/API/DB/lock/txn).
  4. Verification: one signal tied to one predicate.

Escalate to full protocol if any of the above is ambiguous or non-inductive.

Invariant Record (Use This Format)

  • Predicate: P(state) (precise, checkable)
  • Owner: module/type/service/table/lock/txn
  • Holds: always | after construction | under lock | at commit | after apply
  • Maintained by: transitions that must preserve P
  • Enforced at: parse/construct/API/DB/lock/txn/protocol
  • Counterexample to avoid: minimal trace that breaks it today
  • Verification: property/stateful/stress/model/differential

Patterns by Pain

Data Modeling & Input Validity

  • Boundary refinement: raw -> parsed -> validated; only validated enters core.
  • Canonicalization: normalize early (case/whitespace/timezone/ID format) so equality and caching are stable.
  • Explicit absence: model optionality explicitly; avoid "sometimes null" in the core.
  • Cross-field coupling: combine coupled fields into one value to prevent illegal combinations.
  • Denormalization discipline: if you store derived facts, centralize writes or make them recomputed.

Concurrency & Protocol Correctness

  • Lock/txn invariants: P holds under lock or at commit; define where the linearization point is.
  • Monotonic metadata: versions/epochs/counters only increase; reject stale writes.
  • Idempotency: retries and duplicates are safe (idempotency keys, dedupe tables, "apply once").
  • Explicit state machines: enumerate states + allowed transitions; persist enough metadata to reject out-of-order events.
  • Coordination decisions: if P depends on global uniqueness or non-negativity under concurrent debits, choose coordination or redesign (partition/escrow).

Algorithms & Loop-Heavy Code

  • Loop invariants: assert what is preserved each iteration (partitioned regions, sorted prefix, conservation laws).
  • Variant/termination: name a decreasing measure; if you cannot, expect non-termination edges.
  • Representation invariants: hide internal structure behind an API; add a rep-check for tests/debug.
  • Differential testing: compare to a simple, slow reference implementation to catch corner cases.

Before/After Sketches (Language-Agnostic)

Boundary Refinement (Data)

Before: functions accept RawInput and validate ad hoc
After:  parseRaw(...) -> ValidatedValue | Error
        core functions accept ValidatedValue only

Idempotency + Versioning (Concurrency/Protocol)

Before: handle(event) mutates state directly (retries duplicate side effects)
After:  if seen(event.id) return
        if event.version <= state.version return (or reject)
        apply(event) at a single atomic boundary (lock/txn/CAS)

Loop Invariant (Algorithm)

Before: comment says "array left side is partitioned"
After:  assert(invariant(state)) inside loop
        test: random arrays, shrink failing cases, compare to reference

Verification

Pick at least one signal and tie it to a specific invariant predicate.

  • Property/fuzz: parsers, constructors, normalization.
  • Stateful/model-based: sequences over operations; check invariants after each step.
  • Concurrency stress: N threads + jitter; assert invariants at quiescent points.
  • Protocol simulation: reorder/duplicate/drop + crash/restart; assert safety invariants.
  • Model checking (optional): small state + exhaustive exploration for protocols.
  • Differential/reference: algorithm output equals reference for randomized inputs.
  • Runtime tripwires: assertions/logging/metrics for staged rollout.

Research Anchors (Mental Models, Not Requirements)

  • Hoare/Floyd/Dijkstra: invariants as proof objects; weakest preconditions.
  • ADT/rep invariants (Liskov-style): abstraction function + local reasoning.
  • Abstract interpretation: over-approx reachable states; inferred invariants.
  • Dynamic invariant mining (Daikon-style): candidate generation; falsify with counterexamples.
  • Separation logic / framing: invariants tied to ownership; interference-aware reasoning.
  • Rely-guarantee & linearizability: concurrency invariants under schedules.
  • TLA+/Alloy mindset: protocols as transitions + invariants; counterexample traces.
  • Coordination avoidance / CRDT laws: when invariants require coordination vs merge-safe design.

Output Contract (Required Headings)

Use these exact headings in the final response for this skill:

  1. Counterexample
  2. Invariants
  3. Owner and Scope
  4. Enforcement Boundary
  5. Seam (Before -> After)
  6. Verification
  7. Observability (optional)

Deliverable Checklist

  1. Counterexample: minimal breaking trace (include schedule/retry if relevant).
  2. Invariants: 1-5 predicates with owner + scope ("holds when").
  3. Enforcement Boundary: boundary/type/API/DB/lock/txn/protocol choice + why.
  4. Seam (Before -> After): minimal structural change that makes violations hard.
  5. Verification: property/stateful/stress/model/differential tied to at least one predicate.
  6. Observability (optional): tripwires/quarantine/metrics if rollout must be staged.

Cross-Coordination

  • If broader failures emerge, lean on the Unsoundness checklist.
  • If stronger invariants dent ergonomics, reference the Footgun guardrails.

Measurement (seq)

Track adoption and compliance with seq:

seq skill-trend --root ~/.codex/sessions --skill invariant-ace --bucket week
seq skill-report --root ~/.codex/sessions --skill invariant-ace \
  --sections "Counterexample,Invariants,Owner and Scope,Enforcement Boundary,Seam (Before -> After),Verification,Observability (optional)" \
  --sample-missing 5

平台分布

Codex

36.95%
按下载量换算89

Claude

31.63%
按下载量换算76

Cursor

18.6%
按下载量换算45

Gemini CLI

9.06%
按下载量换算22

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills