Skip to content

Align skills with the 500-line guidance and add evals - #84

Merged
kaankacar merged 7 commits into
mainfrom
42-align-skills-with-anthropics-500-line-guidance-and-add-evals
Aug 13, 2026
Merged

Align skills with the 500-line guidance and add evals#84
kaankacar merged 7 commits into
mainfrom
42-align-skills-with-anthropics-500-line-guidance-and-add-evals

Conversation

@kaankacar

@kaankacar kaankacar commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Refs #42 (deliberately not "Closes" — see the baselines note at the bottom).

Both gaps, in one PR: all four oversized skills split to Anthropic's sub-500-line router + companions layout (the #32 / smart-contracts pattern), and the full proposed eval set added.

Gap 1 — the splits

Skill Before After (router) Companions
standards 850 129 ecosystem.md (462), resources.md (265)
dapp 767 467 react.md (147), data-fetching.md (85), smart-accounts.md (83)
agentic-payments 652 116 x402.md (266), mpp.md (282)
data 553 407 horizon.md (151)

Per the issue's checklist:

  • Content moved verbatim — verified by line-multiset diff against HEAD; the only non-identical lines are the intentional glue (Part headings retitled, Quick Navigation → routing tables, cross-part references rewritten to file links, x402 runbook steps renumbered after the shared setup was hoisted).
  • Every router got a task-to-file routing table in the smart-contracts/SKILL.md style; agentic-payments' router additionally keeps the shared testnet setup (keypairs → friendbot → trustlines → Circle faucet) and the two-USDC-addresses reference that both protocols need.
  • References stay one level deep; a link checker with GitHub's actual anchor-slug algorithm resolves all 103 relative links/anchors across skills/ with zero broken.
  • site/src/data/skills.ts needed no source changes — cards keep pointing at each SKILL.md. Confirmed the scripts handle the new files: copy-skills.mjs copies whole skill directories (8/8 sources copied, companions present under public/skills/), and generate-llms-txt.mjs auto-indexes all 8 new companions as nested entries with their H1 titles. pnpm lint, lint:ts, and build green.
  • Frontmatter descriptions are byte-identical for all four skills (no split changed what a skill covers).

Gap 2 — evals

evals/scenarios/ carries the full proposed set: 3 scenarios × 7 skills + 3 cross-skill routing checks (including the off-topic negative control) = 24 files, in the proposal's {skills, query, expected_behavior} format plus an optional machine_checkable field so CI can find the tier-1 assertions. evals/README.md documents the format, the three grading tiers, how to run a scenario against an agent with the skills installed, the baseline process, and the CI guidance (tier 1 on PRs, tiers 2–3 manual). The root README links it, documents the 500-line router convention, and asks contributors to update the matching scenario when a skill's facts change.

One deliberate deviation from the July proposal, flagged rather than silently applied: three scenario expectations were written before #71/#72/#73 merged and would now punish the correct answer. They're updated to current reality — the Noir/UltraHonk scenario expects the on-chain path (Protocol 26+, rs-soroban-ultrahonk, maturity caveat) instead of "not possible today"; the high-frequency-agent scenario expects Session mode (Channel kept as the historical synonym); the historical-data scenario expects the provider-retention check (getHealth().oldestLedger) instead of unconditional getLedgers depth. SEP statuses cited in scenarios were re-verified against stellar-protocol preambles today (SEP-6/12/24 Active, SEP-50 Draft, SEP-57 Draft).

Review round

Merged main in. One conflict, in standards/SKILL.md: main edited the K2 entry in Part 2 (#94's Soroban wording pass) while this branch moved Part 2 out to ecosystem.md. Kept the split and carried the edit across by hand — worth calling out, because the moved copy is a new file, so git would have taken the deletion and silently reverted #94 without ever reporting a conflict there.

Copilot's review found seven things; all seven are addressed — the five below, plus the baselines point covered at the end:

  • x402.md pointed at "Two USDC addresses" as if it were still below it. That section moved to the router, so it's now a link. This was the one genuine reference the split broke — every other "above"/"below" in the companions resolves within its own file.
  • The smart-accounts.md snippet declared result twice in one scope, so it wouldn't compile if copied. Renamed the first binding. (Pre-existing on main; the split just surfaced it.)
  • The Horizon streaming example restarted at "now" on every reconnect and only logged errors, which drops anything that arrived while the stream was down — and data/02-live-payments asserts exactly that behaviour. It now persists each paging token, resumes from it, and notes that resumed records replay.
  • Coverage claims in both READMEs said "every skill"; it's seven of eight, with cross-chain still uncovered.
  • Tier 3 checks which skill and companion files loaded, but the documented claude -p invocation captures only the final answer. Switched to --output-format stream-json --verbose.

On closing #42: the proposal's Process section asks for every scenario to be run without the skills first, with the failing baselines kept in the repo. That hasn't been done, and I'd rather not fabricate transcripts to fill the gap, so no scenario here has evidence it actually discriminates. evals/README.md now says so plainly and this PR is Refs #42 rather than Closes — the baselines and the cross-chain scenarios are what's left. Close the issue by hand if you'd rather track those separately.

One thing outside this PR's scope, noticed while checking the line counts: skills/assets/SKILL.md is now 515 lines after a recent change on main, so it's the next one over the 500-line guidance.

SKILL.md keeps the SEP/CAP routing map (129 lines) with a task-to-file
table; Part 2 moves verbatim to ecosystem.md, Part 3 to resources.md.
Cross-part references now link the companion files.
SKILL.md keeps SDK setup, wallet connection, and tx build/submit
(467 lines). React + Next.js patterns, client-side reads, and
passkeys/fee sponsorship move to companion files; Quick Navigation
becomes the task-to-file routing table.
SKILL.md keeps the decision table, the shared testnet account setup
(keypairs, funding, trustlines, Circle faucet), and the two-USDC-address
reference (116 lines). Part 1 becomes x402.md with the OZ-specific
runbook steps renumbered; Part 2 becomes mpp.md.
SKILL.md drops to 407 lines and gains the task-to-file routing table;
Horizon endpoints/operations/streaming/pagination move verbatim.
Three scenarios per skill plus cross-skill routing checks and an
off-topic negative control, in the {skills, query, expected_behavior}
format with optional machine_checkable assertions. evals/README.md
documents the tiers (compile checks, LLM-judged behavior, trigger
checks), the baseline process, and how to run a scenario; the root
README links it and documents the 500-line router convention.

Scenario expectations reflect current protocol reality rather than the
July proposal where they diverged: Noir/UltraHonk verifies on-chain
since Protocol 26 (#72), MPP Channel mode is now Session (#71), and
getLedgers depth is provider-retention dependent (#73).
Copilot AI balanced review requested due to automatic review settings August 11, 2026 00:21
@kaankacar kaankacar linked an issue Aug 11, 2026 that may be closed by this pull request
11 tasks
@github-actions

github-actions Bot commented Aug 11, 2026

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-08-13 18:30 UTC

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Splits oversized Stellar skills into progressive-disclosure routers and adds an evaluation framework.

Changes:

  • Split four skills into sub-500-line routers plus companion guides.
  • Added 24 scenarios across seven skills and cross-skill routing.
  • Documented evaluation and contribution workflows.

Reviewed changes

Copilot reviewed 38 out of 38 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
README.md Documents routers and evaluations.
skills/standards/SKILL.md Routes standards-related tasks.
skills/standards/ecosystem.md Houses ecosystem references.
skills/standards/resources.md Houses curated resources.
skills/data/SKILL.md Routes RPC and Horizon tasks.
skills/data/horizon.md Houses legacy Horizon guidance.
skills/dapp/SKILL.md Routes dapp development tasks.
skills/dapp/react.md Houses React and Next.js examples.
skills/dapp/data-fetching.md Houses client data-access examples.
skills/dapp/smart-accounts.md Houses passkey and sponsorship guidance.
skills/agentic-payments/SKILL.md Routes payment protocol tasks.
skills/agentic-payments/x402.md Houses the x402 playbook.
skills/agentic-payments/mpp.md Houses Charge and Session guidance.
evals/README.md Defines evaluation format and workflow.
evals/scenarios/assets/01-freezable-stablecoin.json Evaluates controlled asset issuance.
evals/scenarios/assets/02-op-no-trust.json Evaluates trustline troubleshooting.
evals/scenarios/assets/03-usdc-in-contract.json Evaluates USDC SAC usage.
evals/scenarios/agentic-payments/01-monetize-express.json Evaluates paid Express APIs.
evals/scenarios/agentic-payments/02-high-frequency-session.json Evaluates MPP Session selection.
evals/scenarios/agentic-payments/03-signer-throws.json Evaluates signer troubleshooting.
evals/scenarios/dapp/01-freighter-payment.json Evaluates Freighter payments.
evals/scenarios/dapp/02-contract-invoke.json Evaluates browser contract invocation.
evals/scenarios/dapp/03-network-config.json Evaluates network configuration.
evals/scenarios/data/01-historical-transactions.json Evaluates historical-data routing.
evals/scenarios/data/02-live-payments.json Evaluates payment streaming.
evals/scenarios/data/03-contract-storage-read.json Evaluates contract storage reads.
evals/scenarios/routing/01-dapp-plus-payments.json Evaluates multi-skill payment routing.
evals/scenarios/routing/02-rwa-compliance.json Evaluates asset/standards routing.
evals/scenarios/routing/03-negative-control-pdf.json Adds an off-topic control.
evals/scenarios/smart-contracts/01-token-admin-mint.json Evaluates secure token contracts.
evals/scenarios/smart-contracts/02-auth-tests.json Evaluates authorization tests.
evals/scenarios/smart-contracts/03-ttl-archival.json Evaluates TTL troubleshooting.
evals/scenarios/standards/01-fiat-onramp-kyc.json Evaluates SEP selection.
evals/scenarios/standards/02-nft-standard-status.json Evaluates SEP-50 status handling.
evals/scenarios/standards/03-contract-event-indexers.json Evaluates indexer discovery.
evals/scenarios/zk-proofs/01-circom-groth16.json Evaluates Groth16 guidance.
evals/scenarios/zk-proofs/02-noir-onchain.json Evaluates UltraHonk guidance.
evals/scenarios/zk-proofs/03-private-airdrop.json Evaluates private-airdrop design.
Suppressed comments (1)

evals/README.md:67

  • Tier 1 is only described here: no workflow or runner in the repository reads machine_checkable, extracts generated code, or executes these checks. The linked proposal requires Tier 1 in CI on every PR, so the claimed full eval set is not operational. Add an executable eval runner plus a workflow triggered by skill changes.
- Tier 1 (compile checks) is cheap and deterministic — run on every PR that touches `skills/`.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

await kit.connectWallet({ prompt: true });

// Sign and submit transactions
const result = await kit.signAndSubmit(transaction);
Comment thread skills/agentic-payments/x402.md Outdated
- `"$0.001"` — human-readable, auto-converts to 7-decimal USDC units
- `{ amount: "1000", asset: "ASSET_SAC_CONTRACT_ID" }` — explicit base units for non-USDC assets

**`payTo` is the recipient's classic Stellar account (`G...`), not the USDC SAC contract address.** Sending USDC lands in the classic balance of the `payTo` account, which is why that account also needs a USDC trustline. The SAC contract address is what the protocol invokes `transfer` on; see "Two USDC addresses" below.
Comment thread evals/README.md

## Baselines: prove each eval discriminates

Before trusting a scenario, run it **without** the skills installed and keep the failing transcript under `evals/baseline/<skill>/<scenario>.md`. That proves the eval discriminates (an unskilled model fails it), and tells us which evals to retire as base models improve — an eval every unskilled model passes measures nothing.
Comment thread evals/README.md Outdated

# 2. Run one scenario headlessly and capture the transcript
q=$(python3 -c "import json;print(json.load(open('evals/scenarios/dapp/01-freighter-payment.json'))['query'])")
claude -p "$q" > /tmp/eval-transcript.txt
Comment thread README.md Outdated

## Evaluations

[`evals/`](evals/README.md) holds ~3 task scenarios per skill (plus cross-skill routing checks and a negative control), each encoding a mistake agents actually make without the skill. Three grading tiers: machine-checkable compile checks, LLM-judged behavior assertions, and skill-trigger checks. See [evals/README.md](evals/README.md) for the format and how to run them.
Comment thread evals/README.md Outdated
@@ -0,0 +1,73 @@
# Skill Evaluations

Representative task scenarios for every skill in this repo, following [Anthropic's evaluation-driven skill authoring guidance](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/best-practices#evaluation-and-iteration). Each scenario encodes a mistake an agent actually makes *without* the skill — several come from real failure modes (the #41 compile bugs, documented pitfalls in agentic-payments, the ZK curve trap), not imagined ones. Run them before publishing skill changes so regressions get caught here instead of by users.
Comment thread skills/data/horizon.md Outdated
const closeHandler = server
.transactions()
.forAccount(publicKey)
.cursor("now")
@kaankacar

Copy link
Copy Markdown
Contributor Author

🤖 Automated message from Kaan's Automated Triage Bot.

Picked this up — assessing whether I can ship an airtight fix.

Conflict was standards/SKILL.md: main edited the K2 entry in Part 2 while
this branch moved Part 2 out to ecosystem.md. Kept the split and carried
main's edit across, since the moved copy is a new file and git had no way
to apply it there.
Fix the one cross-file reference the split broke: x402.md pointed at "Two
USDC addresses" as if it were still below, but it moved to the router.

The smart-accounts snippet declared `result` twice in one scope, so it
would not compile if copied. Renamed the first binding.

The Horizon streaming example restarted at "now" on every reconnect and
only logged errors, which silently drops anything that arrived while the
stream was down. It now persists each paging token, resumes from it, and
says that resumed records replay.

Make the eval docs match what is actually here: seven skills covered, not
eight, and no baseline transcripts committed yet, so the set is still
unvalidated. Tier 3 needs the tool events, so capture stream-json output
rather than the plain text answer.
@kaankacar
kaankacar merged commit 792c608 into main Aug 13, 2026
6 checks passed
@kaankacar
kaankacar deleted the 42-align-skills-with-anthropics-500-line-guidance-and-add-evals branch August 13, 2026 18:29
@kaankacar

Copy link
Copy Markdown
Contributor Author

🤖 Automated message from Kaan's Automated Triage Bot.

Merged as 792c608. All seven Copilot points are addressed — the broken x402.md cross-reference (the one reference the split actually broke), the result redeclaration, the Horizon stream restarting at "now", the "every skill" coverage claims, and the tier-3 stream-json capture. CI ran lint, lint:ts, and build green on the exact head I merged.

Worth flagging one thing I hit merging main in: main's K2 edit from #94 lived in the Part 2 block this branch moved to ecosystem.md. Git conflicts on the deletion but has no way to see the moved copy, so taking the split alone would have silently reverted #94. Carried it across by hand and re-checked the other three splits the same way — every line of the originals survives, and the only drops are the declared glue (Part headings, Quick Navigation, cross-part pointers).

I left this as Refs #42 rather than Closes: the proposal asks for baseline transcripts proving each scenario discriminates, and those don't exist, so I'd be closing it on unvalidated evals. evals/README.md now says so plainly. @kaankacar @ElliotFriend — closing #42 is your call, and skills/assets/SKILL.md is now 515 lines, so it's next over the 500-line guidance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Align skills with Anthropic's 500-line guidance and add evals

2 participants