Agent skill

Add Pointer Mapping

by txpipe in txpipe/dolos

Add a missing pointer address mapping to hacks.rs by looking up the stake credential in DBSync

Apache-2.0Auto-check passedDevelopment

Install Add Pointer Mapping

skills CLI
$ npx skills add txpipe/dolos --skill add-pointer-mapping -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install txpipe/dolos add-pointer-mapping --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/txpipe/dolos.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/add-pointer-mapping .claude/skills/add-pointer-mapping && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
add-pointer-mapping
GitHub stars
138
Token cost
~840 tokens
SKILL.md length
341 words
Files
1
Skills in repo
7
Repo updated
First seen
Licence
Apache-2.0

At a glance

Add a missing pointer address mapping to hacks.rs by looking up the stake credential in DBSync

  • Works in 5 steps: Get the pointer coordinates → Query DBSync for the stake credential → Determine the network → …
  • Development work in your project
  • SKILL.md covers Step 1: Get the pointer…, Step 2: Query DBSync for the…, Step 3: Determine the network and Step 4: Add the mapping to…, plus 3 more sections
  • Calls cargo

What it does

Add Pointer Mapping is an agent skill from txpipe/dolos. Add a missing pointer address mapping to hacks.rs by looking up the stake credential in DBSync

Its SKILL.md is about 840 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development. The licence is Apache-2.0.

When your agent uses it

  • Development work in your project

Example prompts

  • “/add-pointer-mapping”

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Get the pointer coordinates
  2. Query DBSync for the stake credential
  3. Determine the network
  4. Add the mapping to hacks.rs
  5. Verify

What it can do on your machine

Read from SKILL.md and the folder at commit 7e973ea. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • cargo

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Add Pointer Mapping loads about 840 tokens when it runs. Until then it costs about 29 tokens; SKILL.md has 341 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~29
When it runs · the whole SKILL.md, loaded when a task matches
~840

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from txpipe/dolos at commit 7e973ea, republished under its Apache-2.0 licence (© txpipe). 341 words, ~840 tokens.

Download SKILL.mdSave it as .claude/skills/add-pointer-mapping/SKILL.md (or your agent's skills folder).
name
add-pointer-mapping
description
Add a missing pointer address mapping to hacks.rs by looking up the stake credential in DBSync

Add Pointer Address Mapping

Cardano pointer addresses reference a stake credential by the location of its registration certificate: (slot, tx_idx, cert_idx). Dolos resolves these via a hardcoded lookup table in crates/cardano/src/hacks.rs (pointers::pointer_to_cred). When a new unmapped pointer is encountered, dolos panics with "missing pointer mapping".

Step 1: Get the pointer coordinates

The user provides or the panic log shows three values: slot, tx_idx, cert_idx.

Step 2: Query DBSync for the stake credential

Get the DBSync connection URL from xtask.toml ([dbsync] section), then run:

sql
SELECT sa.view,
       substring(encode(sa.hash_raw, 'hex') from 3) AS cred_hash
FROM stake_registration sr
JOIN tx t ON t.id = sr.tx_id
JOIN block b ON b.id = t.block_id
JOIN stake_address sa ON sa.id = sr.addr_id
WHERE b.slot_no = <SLOT> AND t.block_index = <TX_IDX> AND sr.cert_index = <CERT_IDX>;

Interpreting the result:

  • No rows returned: The pointer is invalid (no registration at that location). Map it to None.
  • stake1u... prefix (key hash): Use StakeCredential::AddrKeyhash("<cred_hash>").
  • stake1s... prefix (script hash): Use StakeCredential::ScriptHash("<cred_hash>").
  • The cred_hash column strips the 1-byte header (e0/e1/f0/f1) from hash_raw, yielding the raw 28-byte credential hash.

Step 3: Determine the network

Use the slot number to figure out which network section to place the entry near:

  • Preview: small slot numbers, or check if it matches preview DBSync
  • Preprod: medium slot numbers
  • Mainnet: large slot numbers (slots > ~4M are post-Byron mainnet)

The entries in hacks.rs are loosely grouped by network with comments.

Step 4: Add the mapping to hacks.rs

Edit crates/cardano/src/hacks.rs, function pointer_to_cred. Insert the new arm before the catch-all panic at the bottom.

For a valid credential (has a row in DBSync):

rust
(SLOT, TX_IDX, CERT_IDX) => Some(StakeCredential::AddrKeyhash(
    "CRED_HASH"
        .parse()
        .unwrap(),
)),

For an invalid/garbage pointer (no row in DBSync):

rust
(SLOT, TX_IDX, CERT_IDX) => None,

Step 5: Verify

bash
cargo check -p dolos-cardano

Reference: How pointer addresses work

A pointer address encodes (slot, tx_idx, cert_idx) as variable-length integers in the address bytes. This triple uniquely identifies a stake registration certificate on-chain. The Cardano node resolves the pointer to the stake credential registered at that location.

Some pointers are intentionally invalid (garbage values like (12, 12, 12)) — these appear in on-chain addresses but point to nonexistent registrations. They map to None, meaning the address has no stake rights.

Reference: DBSync tables

TableJoinPurpose
stake_registrationprimaryCertificate registrations, has cert_index
txsr.tx_id = t.idTransaction, has block_index (= tx_idx within block)
blockt.block_id = b.idBlock, has slot_no
stake_addresssr.addr_id = sa.idStake address, has view (bech32) and hash_raw (with header byte)

© txpipe, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/add-pointer-mapping of txpipe/dolos.

Open the folder on GitHubat commit 7e973ea

Compare with similar skills

Add Pointer Mapping next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Add Pointer Mapping compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Add Pointer Mapping this skilltxpipe/dolos138—~840Automated safety check: PassApache-2.0
Vercel Composition Patternssupabase/supabase111k59 repos~726Automated safety check: PassMIT
Finishing a Development Branchobra/superpowers296k5 repos~1.9kAutomated safety check: PassMIT
Typescript Advanced Typesrolling-scopes/rsschool-app10k25 repos~4.2kAutomated safety check: PassMPL-2.0
PR Babysitteropeninterpreter/openinterpreter69k3 repos~4.2kAutomated safety check: PassApache-2.0
Code Review ChecklistshareAI-lab/learn-claude-code78k5 repos~1.1kAutomated safety check: PassMIT

Similar skills

  • Official

    React composition patterns that scale. An agent skill from supabase/supabase.

    111k GitHub starsUsed in 59 repos~726 tokens
    DevelopmentAuto-check passed
  • Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.

    296k GitHub starsUsed in 5 repos~1.9k tokens
    DevelopmentAuto-check passed
  • Typescript Advanced Types

    rolling-scopes/rsschool-app

    Master TypeScript's advanced type system including generics, conditional types, mapped types, template literals, and utility types for building type-safe applications.

    10k GitHub starsUsed in 25 repos~4.2k tokens
    DevelopmentAuto-check passed
  • PR Babysitter

    openinterpreter/openinterpreter

    Watches an open GitHub pull request until it merges, handling review comments, diagnosing CI failures and retrying flaky checks along the way.

    69k GitHub starsUsed in 3 repos~4.2k tokens
    DevelopmentAuto-check passed
  • Code Review Checklist

    shareAI-lab/learn-claude-code

    Reviews code against a five-part checklist covering security, correctness, performance, maintainability and testing, and reports findings in a fixed format.

    78k GitHub starsUsed in 5 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Greploop

    onyx-dot-app/onyx

    Iteratively improves a PR (GitHub), MR (GitLab), or shelved changelist (Perforce) until Greptile gives it a 5/5 confidence score with zero unresolved comments.

    32k GitHub starsUsed in 4 repos~3.3k tokens
    DevelopmentAuto-check passed

More from txpipe/dolos

  • Systematic workflow for debugging Cardano ledger epoch pots mismatches in Dolos.

    138 GitHub stars~2.6k tokensUpdated today
    Auto-check passed
  • Update Docs

    txpipe/dolos

    Reconcile the user-facing documentation under docs/content/ with the current source-of-truth in the codebase.

    138 GitHub stars~2.1k tokensUpdated today
    Auto-check passed
  • Add Epoch Test

    txpipe/dolos

    Set up a new epochpots integration test with ground truth fixtures from DBSync

    138 GitHub stars~1.6k tokensUpdated today
    Auto-check passed
  • Dolos Pipeline

    txpipe/dolos

    Architecture of the Dolos processing pipeline — WorkUnit lifecycle, executor modes, CardanoWorkUnit variants, WorkBuffer state machine, and sequencing.

    138 GitHub stars~2.2k tokensUpdated today
    Auto-check passed
  • Ledger Gotchas

    txpipe/dolos

    Reference of non-obvious Cardano ledger behaviors that have caused bugs in Dolos.

    138 GitHub stars~2.8k tokensUpdated today
    Auto-check passed
  • Update Proposals

    txpipe/dolos

    Update hardcoded Conway governance proposal mappings in hacks.rs by querying DBSync

    138 GitHub stars~1.6k tokensUpdated today
    Auto-check passed

Categories

Questions about Add Pointer Mapping

What does Add Pointer Mapping do?

Add a missing pointer address mapping to hacks.rs by looking up the stake credential in DBSync. Add Pointer Mapping is an agent skill from txpipe/dolos.

When should I use Add Pointer Mapping?

Add Pointer Mapping fits situations like: development work in your project.

How do I install Add Pointer Mapping in Claude Code?

Run `npx skills add txpipe/dolos --skill add-pointer-mapping -a claude-code`. Or copy the skill folder (skills/add-pointer-mapping in txpipe/dolos) into .claude/skills/add-pointer-mapping in your project. Claude Code loads it when a task matches its description.

How do I install Add Pointer Mapping in Codex?

Run `npx skills add txpipe/dolos --skill add-pointer-mapping -a codex`. Or copy the skill folder (skills/add-pointer-mapping in txpipe/dolos) into .agents/skills/add-pointer-mapping in your project. Codex loads it when a task matches its description.

Can I use Add Pointer Mapping in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add txpipe/dolos --skill add-pointer-mapping -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/add-pointer-mapping, .gemini/skills/add-pointer-mapping, .github/skills/add-pointer-mapping and .opencode/skills/add-pointer-mapping in your project.

What does Add Pointer Mapping need to run?

Going by SKILL.md and its folder, Add Pointer Mapping needs the command-line tools its instructions call (cargo).

Does Add Pointer Mapping access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Add Pointer Mapping safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Add Pointer Mapping use?

Add Pointer Mapping is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Add Pointer Mapping use?

About 840 tokens (SKILL.md is roughly 3.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Add Pointer Mapping?

Skills that share tags, products or a category with Add Pointer Mapping: Vercel Composition Patterns (supabase/supabase, 111k stars), Finishing a Development Branch (obra/superpowers, 296k stars), Typescript Advanced Types (rolling-scopes/rsschool-app, 10k stars) and PR Babysitter (openinterpreter/openinterpreter, 69k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Add Pointer Mapping?

txpipe (a GitHub organization) maintains it in txpipe/dolos, which has 138 GitHub stars. The repository holds 7 skills in this directory. The repository was last updated on October 8, 2026.

Source: txpipe/dolos on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.