跳到正文
cccskills
免费在 GitHub 公开

update-generated

Regenerate the checked-in OpenAPI specification, insta snapshots, and protocol schema in sequence. The workflow stops when a step fails and asks before copying a changed protocol schema into the tracked file.

中文简介正在准备中。当前显示英语简介。

原文查看原文说明

Regenerate the checked-in artifacts (OpenAPI spec, insta snapshots, protocol schema). Use when the user asks to update generated files, refresh snapshots, bump the OpenAPI spec, or fix a protocol-schema-check failure.

near/nearcore星标 2,621(GitHub 2,621 + cccskills 0)

实测评分 未实测

查看安装方法

适用场景

  • Refresh the checked-in OpenAPI specification
  • Accept updated insta test snapshots
  • Check and review generated protocol schema changes

包含的文件(1)

  • SKILL.md1.6 KB

SKILL.md(原文)

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

Update the generated artifacts tracked in this repo. Run each step from the repo root, in order. Stop and report on any failure.

1. OpenAPI spec

Generate into a tmp file first; only overwrite the tracked file if the generator succeeded.

tmp=$(mktemp)
cargo run -p near-jsonrpc-openapi-spec > "$tmp"
  • If cargo run exits non-zero, delete $tmp and stop with the error.
  • On success, move $tmp to chain/jsonrpc/openapi/openapi.json.

2. Insta snapshots

cargo insta test --accept -p near-parameters -p near-primitives

Stop on failure.

3. Protocol schema

Run the check and capture the exit code without aborting:

set +e
cargo run -p protocol-schema-check
schema_status=$?
set -e
  • 0 — schema is up-to-date, nothing to do.
  • 1 — schema drift. The regenerated schema is at ${CARGO_TARGET_DIR:-target}/protocol_schema.toml. Before copying:
    1. Show the user the diff against the tracked file:
      git diff --no-index tools/protocol-schema-check/res/protocol_schema.toml \
        "${CARGO_TARGET_DIR:-target}/protocol_schema.toml"
      
    2. Use AskUserQuestion with options "Accept and copy" / "Abort" to confirm.
    3. Only on confirmation, copy the regenerated file over tools/protocol-schema-check/res/protocol_schema.toml.
  • Any other code — report the failure and stop; do not copy.

评价

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

评论

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

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

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

0 / 1000 字

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

同一仓库的技能

Update NEAR Protocol’s minimum supported version by one and bundle the related feature and configuration cleanup into a single pull request. It also regenerates snapshots and API specifications and runs the prescribed checks.

中文简介正在准备中。当前显示英语简介。

  • Deprecating the next supported protocol version
  • Removing obsolete protocol feature gates
  • Bundling version cleanup into one pull request
near/nearcore26212026年10月29日 更新

Convert a pytest integration test into a deterministic test-loop test. The workflow documents scenarios and setup, studies existing test-loop patterns, plans the migration for confirmation, then writes and verifies the replacement and cleans up references.

中文简介正在准备中。当前显示英语简介。

  • Migrate a pytest integration test to test-loop
  • Document test scenarios before a migration
  • Replace an existing pytest with a deterministic test
near/nearcore26212026年10月29日 更新

pr

免费

Prepare a GitHub pull request from staged changes by generating a branch name, commit message, title, and description. It presents the details for confirmation first, then can create the PR as a draft by default.

中文简介正在准备中。当前显示英语简介。

  • Open a pull request for staged code changes
  • Send completed work to GitHub for review
  • Create a draft PR with a generated title and summary
near/nearcore26212026年10月29日 更新

pr-review

免费

Review a Rust pull request for merge-blocking problems in correctness, production safety, performance, security, Rust usage, and code comments. It checks surrounding project context and returns actionable findings with file and line references.

中文简介正在准备中。当前显示英语简介。

  • Review a Rust pull request before merging
  • Check a branch diff for blocking issues
  • Look for security and production risks in Rust changes
near/nearcore26212026年10月29日 更新

查看 near 的全部技能

报告此技能的问题