Index of every page on this site: llms.txt
All skills
google avatar

/sync-contract

@de7de90
by googlegoogle/ax15k stars
798
Run it yourself

End-of-change pass that brings AGENTS.md and skills/ back in step with the code. Load after any code change, before declaring done; it is the last step of the Definition of done.

Use this Skill: https://skilld.dev/gh/google/ax/sync-contract

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈48 tokens for metadata: the name and description. ≈514 when used: this file.

Description uses 2.4% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈194 characters, or 2.4%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Sync the agent contract with the code

AGENTS.md and skills/*/SKILL.md quote facts about the tree: file paths, function names, versions, flag defaults, CI steps. Code changes silently invalidate them. Run this diff-driven procedure before declaring a task done.

1. Inspect what changed

git diff --name-only origin/main...HEAD      # or: git status --short for uncommitted work

2. Find which contract docs mention what you changed

  1. Search AGENTS.md and skills/ for the file paths, package names, CLI flags, or exported symbols touched in your diff.
  2. Check by area:
    • Package layout, CLI subcommands, CI steps (.github/workflows/go.yml), Makefile, go.mod, or CONTRIBUTING.md → check AGENTS.md.
    • Any domain listed in the AGENTS.md Skills table (for example, internal/substrate, internal/guest, internal/metadata, ate-system / atenet-router addresses, or E2E setup → skills/substrate/SKILL.md) → check that skill's SKILL.md.

3. Per-document checklist

For each document you opened:

  • Every path it names exists (ls it).
  • Every function/const/flag it names still exists under that name.
  • Every number it states (file counts, package counts, versions) is re-derived, not trusted.
  • Every "only place that…" / "no X exists" statement is re-checked across the tree, not just in the changed file.
  • Removed behaviour is removed from the doc; renamed behaviour is renamed.
  • New behaviour that a future agent would get wrong without being told is added — as a fact with its location, not as advice.
  • Prefer a pointer ("see go.mod") over copying a value that changes often.

4. Quick structural check

Run this one-liner whenever AGENTS.md or skills/ was touched:

# Verify symlinks and that every skills/<name>/SKILL.md is indexed in AGENTS.md
test -L CLAUDE.md && test -L GEMINI.md && \
for d in skills/*/; do
  s=$(basename "$d")
  test -f "$d/SKILL.md" && grep -q "\`/$s\`" AGENTS.md || echo "MISSING: $s"
done

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts5d3 checks · Risk SAFE
  • Gen Agent Trust Hub5d

    This skill provides a procedure for maintaining documentation consistency within a repository. It includes standard local command-line instructions to help ensure that architectural descriptions and skill definitions remain synchronized with the underlying code.

  • Socket5d

    No alerts

  • Snyk5d

    Risk: LOW · No issues

Signed by skilld at de7de90. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 20 hours ago.

Activeupdated 3 weeks ago

README badge

README badge for google/ax/sync-contract