跳到正文
cccskills
免费在 GitHub 公开

superior-logic

Implement or review application behavior, APIs, state transitions, data flow, and business rules with explicit contracts and failure handling. Use for logic-bearing changes across frontend or backend systems. Do not use for visual-only or copy-only work.

中文简介正在准备中。当前显示原文说明。

KodekaTeam/superior-skills星标 23(GitHub 23 + cccskills 0)

实测评分 未实测

查看安装方法

包含的文件(2)

  • SKILL.md6.8 KB
  • references/contract-evolution-and-workflows.md3.4 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Superior Logic

Keep correctness visible from input to observable outcome. Fit the solution to the repository's existing architecture and update every affected side of a contract together.

Use superior-code-review instead when the primary outcome is findings on a diff, commit, branch, pull request, or working tree. Use this skill for a focused domain-logic review or for implementing confirmed behavioral changes.

Model the behavior

Before choosing code, identify:

  • trusted and untrusted inputs;
  • outputs and observable side effects;
  • invariants and authorization rules;
  • consumers and compatibility constraints;
  • expected failure, retry, duplication, ordering, and concurrency conditions.

State a material assumption only when code and documentation cannot establish it. Ask the user when competing answers would change the product contract.

Read references/contract-evolution-and-workflows.md when changing a shared API, event, file format, client/server contract, state machine, or multi-step workflow that can span versions, retries, or partial deployment.

Load superior-architecture when designing or assessing project structure, module ownership, dependency boundaries, or structural refactoring is a primary concern. Keep routine feature placement and domain contracts in this skill.

Place responsibility

  • Inspect the framework's discovery conventions and the repository's existing feature and module owners before choosing a location. For a new project or feature without an established owner, group code by real responsibility and create folders only when they improve navigation or enforce a useful boundary.
  • Keep domain decisions separate from rendering, transport, and persistence when the existing architecture supports that boundary.
  • Validate at the point data crosses into a trusted system. Client validation improves experience but does not enforce server correctness.
  • Maintain one authoritative owner for a state transition; derive dependent state instead of synchronizing copies.
  • Use shared schemas and types when they are the repository's source of truth.
  • Change producers, consumers, validation, tests, and documentation together when a shared contract changes.

Protect state and side effects

  • Make related writes atomic when partial completion violates an invariant; otherwise define a recoverable partial state or compensation.
  • Make repeatable operations idempotent where retries or duplicate delivery could double-create, double-charge, or corrupt data.
  • Define ordering and concurrency behavior where work can race. Arbitrary delay is not synchronization.
  • Use timeouts, cancellation, and bounded retries for remote work according to established project patterns; retry transient conditions only.
  • Preserve user input and useful recovery options after expected failures when safe.

Load superior-database when schema design, query shape, indexes, transaction isolation, migrations, backfills, or datastore rollout safety becomes a primary part of the request. Keep routine persistence orchestration here when the underlying data contract is unchanged.

Load superior-performance when latency, throughput, resource use, capacity, or scalability is a primary concern requiring measurement and profiling. Ordinary boundedness and avoiding obviously unnecessary work remain part of this skill.

Load superior-reliability when service objectives, failure isolation, graceful degradation, failover, or operational recovery is primary. Load superior-delivery when the task owns pipeline, artifact, environment promotion, rollout, or rollback behavior.

Enforce security at trusted boundaries

  • Authentication identifies a caller; authorization still governs each resource and action.
  • Scope reads and writes to the authorized subject where possible.
  • Treat route parameters, headers, hidden fields, filenames, client state, webhooks, and external payloads as untrusted.
  • Use maintained libraries for credentials and cryptography. Never design custom token, encryption, signature, or secret-storage schemes.
  • Keep secrets, sensitive personal data, and payment details out of logs and user-visible errors.

Load superior-api-security when API hardening, rate limiting, token security, abuse prevention, SSRF, or a dedicated security review is part of the request. Keep superior-logic responsible for domain contracts and invariants; use the security skill for threat-driven controls and negative verification.

Diagnose uncertain failures

Load superior-debugging when a concrete failure exists but its cause is uncertain, environment-specific, intermittent, or requires causal tracing. Once the cause is established, use this skill for any in-scope repair to domain rules, state, persistence, or API behavior. A straightforward implementation defect with an already-proven cause does not require the dedicated debugging workflow.

Keep failure observable

  • Handle an error at the layer that can recover, translate, or add useful context.
  • Preserve the original cause when wrapping errors.
  • Never convert an unknown failure into success or swallow it solely to keep a flow moving.
  • Give users safe, actionable messages and send diagnostic detail through the project's established observability path.
  • Bound data-dependent loops, queues, result sets, recursion, retries, and in-memory accumulation.

Verify the contract

Test observable behavior rather than private steps. Cover the normal path and the material boundary, invalid-input, authorization, partial-failure, duplication, retry, or concurrency cases affected by the change. Reproduce a bug with a focused failing test when practical.

Load superior-testing when test design, level selection, fixtures, doubles, flaky behavior, or suite reliability is a primary part of the request. Ordinary implementation verification remains part of this skill and does not require loading the dedicated testing workflow.

Load superior-ux when domain behavior must be shaped around a multi-step user journey, information architecture, feedback, or recovery experience. Keep enforceable state transitions, invariants, APIs, and persistence in this skill.

Use existing test conventions and run the narrowest relevant lint, type, test, and build checks. Report unverified conditions and compatibility risk explicitly.

Report the final contract, affected producers and consumers, failure behavior, compatibility or rollout assumptions, and checks actually performed. Do not describe a workflow as atomic or exactly-once unless the implementation and underlying systems prove that guarantee.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Review or implement interface accessibility for semantics, keyboard operation, focus, contrast, status communication, zoom, and assistive technology. Use when accessibility is explicitly requested, required by the product contract, or a changed interaction creates substantial accessibility risk. Do not activate for every visual edit or use it as a generic design audit.

中文简介正在准备中。当前显示原文说明。

KodekaTeam/superior-skills232026年10月29日 更新

Implement, harden, or review defensive security controls for REST APIs, including authentication and authorization boundaries, validation, rate limiting, abuse prevention, resource limits, SSRF defenses, safe errors, logging, and security tests. Use when API security, endpoint hardening, threat review, rate limiting, token handling, or sensitive business-flow protection is an explicit concern. Do not use for ordinary endpoint logic without meaningful security scope or for offensive exploitation.

中文简介正在准备中。当前显示原文说明。

KodekaTeam/superior-skills232026年10月29日 更新

Design, implement, or assess project structure, module ownership, dependency boundaries, and safe file or folder organization. Use when project architecture, feature placement, separation of responsibilities, or architectural refactoring is a primary concern, including new framework projects. For a read-only assessment, do not modify files unless the user also requests changes; do not activate merely because ordinary feature work adds a file.

中文简介正在准备中。当前显示原文说明。

KodekaTeam/superior-skills232026年10月29日 更新

Review a code change, diff, commit, branch, or pull request for actionable defects, regressions, security risks, compatibility breaks, and missing verification. Use when code review is the primary requested outcome. Keep the review read-only unless the user explicitly asks to implement fixes; do not use as a substitute for implementation or a specialized visual audit.

中文简介正在准备中。当前显示原文说明。

KodekaTeam/superior-skills232026年10月29日 更新

Add, revise, or remove source-code comments while preserving executable behavior. Use for comment-only cleanup, documentation comments, TODO quality, and reducing narration. Do not use when the requested change modifies logic.

中文简介正在准备中。当前显示原文说明。

KodekaTeam/superior-skills232026年10月29日 更新

Write or revise user-facing product and marketing copy with a specific voice, verifiable claims, natural rhythm, and useful actions. Use for interface labels, onboarding, landing pages, help text, and product messaging. Do not use for code comments or neutral technical documentation unless tone editing is requested.

中文简介正在准备中。当前显示原文说明。

KodekaTeam/superior-skills232026年10月29日 更新

查看 KodekaTeam 的全部技能

报告此技能的问题