polkadot-apps CLAUDE.md

polkadot-apps CLAUDE.md is an instructions file for coding agents from paritytech/polkadot-apps. It costs 2,168 tokens per session, scanned A, original, Apache-2.0.

Repository instructions for Polkadot Apps, a TypeScript monorepo for Polkadot-related packages. A monorepo stores multiple packages in one repository, and these instructions cover testing, formatting, package boundaries, descriptors, and release changes.

In plain words
What is it for?
Use them when building, testing, formatting, documenting, or changing packages; generating chain descriptors; or preparing required changesets.
Why use it?
They explain the project’s package and tooling rules so changes fit the repository and published packages can be released correctly.

Instructions file

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/paritytech/polkadot-apps/claude-md
Clone the repo
git clone --depth 1 https://github.com/paritytech/polkadot-apps

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for polkadot-apps CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/paritytech/polkadot-apps/claude-md.svg)](https://agentmods.dev/instructions/paritytech/polkadot-apps/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/paritytech/polkadot-apps/claude-md"><img src="https://agentmods.dev/badge/instructions/paritytech/polkadot-apps/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 2,168 This file is loaded in full into every session.
When invoked 2,168 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.02168 $0.02168
Opus 5 $0.01084 $0.01084
Sonnet 5 $0.00434 $0.00434
Haiku 4.5 $0.00217 $0.00217

Measured 5d ago against content hash 14003df4a0c0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

polkadot-apps CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 110 lines

How it starts

The opening of the file, as written. The whole thing — 110 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CLAUDE.md

Follow the contributor guidelines in README.md.

Quick Reference

  • Build: pnpm build
  • Dev: pnpm dev
  • Clean: pnpm clean
  • Test: pnpm test
  • Test with coverage: pnpm test:coverage
  • Format: pnpm format
  • Format check: pnpm format:check
  • Generate descriptors: pnpm generate-descriptors
  • Generate docs: pnpm docs

Key Conventions

  • All packages live in packages/<name>/ and are scoped under @polkadot-apps/.
  • Use in-source testing (if (import.meta.vitest) blocks) for unit tests. Separate tests/*.test.ts files are for integration tests only.
  • Internal deps use "workspace:*", shared versions use "catalog:" from pnpm-workspace.yaml.
  • Packages must be framework-agnostic pure TypeScript. No React/Vue imports in core packages.
  • Biome handles formatting — do not use prettier or eslint.
  • Changesets are required for any change to published packages. Run pnpm changeset and include the generated file in your commit.

Descriptors

  • @polkadot-apps/descriptors provides per-chain subpath imports (e.g., @polkadot-apps/descriptors/bulletin). Each subpath is a separate papi build — no barrel import, no unnecessary chain metadata.
  • Each chain lives in packages/descriptors/chains/<name>/ with its own .papi/polkadot-api.json config. pnpm generate-descriptors fetches metadata and runs papi generate per chain.
  • Adding a new chain: (1) add papi add in scripts/generate.sh, (2) create chains/<name>/ with .papi/polkadot-api.json and package.json, (3) add chain to CHAINS in scripts/build.sh, (4) add subpath export in package.json.

Chain Client

  • @polkadot-apps/chain-client offers two ways to connect:
    • BYOD (createChainClient): bring your own descriptors and RPCs. Zero overhead from unused chains.
    • Preset (getChainAPI): zero-config with built-in descriptors and RPCs for known environments (paseo, polkadot, kusama).
  • Both return a ChainClient<T> with typed APIs per chain key, .raw for PolkadotClient access, and .destroy().
  • @polkadot-api/sdk-ink is not a dependency of chain-client. Consumers who need contracts create InkSdk themselves: createInkSdk(client.raw.assetHub, { atBest: true }).
  • isInsideContainerSync() is available from both @polkadot-apps/host and @polkadot-apps/chain-client for synchronous container detection in performance-critical code paths. The async isInsideContainer() (which uses product-sdk) remains the primary API.
  • Bulletin RPC endpoints are imported from @polkadot-apps/host's shared chain config (BULLETIN_RPCS), not hardcoded in presets.
  • Preset RPC endpoint lists in packages/chain-client/src/presets.ts are ordered live-first. @polkadot-api/ws-provider walks the array on connect and on unclean reconnects, so healthy providers belong at the top and recently-degraded ones at the bottom as fallbacks. Each dead entry at the top costs one "Unable to connect" log line per cold start; rotate rather than remove when a provider is transiently unhealthy so failover redundancy is preserved when it recovers.

Read the full file on GitHub · 110 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 110 lines · 2,168 tokens per session scan A 14003df4a0c0

Subscribe to this mod's changes

polkadot-apps CLAUDE.md is an instructions file published in the GitHub repository paritytech/polkadot-apps (2 stars, last pushed 26d ago), licensed Apache-2.0. It adds 2,168 tokens to every session, about $0.0108 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.