Skip to content
cccskills
FreePublished on 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.

OriginalShow the original description

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/nearcore2,621 stars(GitHub 2,621 + cccskills 0)

Run score Not tested

See how to install

Good for

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

Files included (1)

  • SKILL.md1.6 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

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.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

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/nearcore2.6KUpdated Oct 29, 2026

migrate-pytest

FreeSummary

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/nearcore2.6KUpdated Oct 29, 2026

pr

FreeSummary

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/nearcore2.6KUpdated Oct 29, 2026

pr-review

FreeSummary

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/nearcore2.6KUpdated Oct 29, 2026

See all skills by near

Report a problem with this skill