Add Metaplex skill and official Core fetch flow#3
Conversation
📝 WalkthroughWalkthroughAdds extensive Metaplex CLI and SDK reference documentation covering concepts, command-line tools, and Umi SDK integration. Refactors asset URI handling in devnet scripts to use Metaplex client abstraction. Improves type safety in the doom-nft-program's mint instruction by enforcing Core collection account type validation. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 15
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.agents/memory/todo.md:
- Around line 233-239: Update the review note in .agents/memory/todo.md to
reflect that the PR now vendors a local Metaplex skill and therefore the
previous conclusion ("no local skill installation was applied" and "only
upstream fixes remain") is stale: mention that the PR adds a vendored skill at
.agents/skills/metaplex/ and includes skills-lock.json, remove or amend the
bullet claiming installation failed, and add a short recommendation (if any)
about whether upstream fixes are still needed or can be deferred now that the
local skill is vendored.
In @.agents/skills/metaplex/references/cli-bubblegum.md:
- Around line 111-114: The fenced code block containing the Program IDs lines
"Bubblegum V1: BGUMAp9SX3uS4efGcFjPjkAQZ4cUNZhtHaMq64nrGf9D" and "Bubblegum V2:
BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY" is missing a language label;
update that fenced block in .agents/skills/metaplex/references/cli-bubblegum.md
to use a language tag (use "text") so the block becomes ```text ... ``` to
satisfy markdownlint.
In @.agents/skills/metaplex/references/cli-candy-machine.md:
- Around line 60-79: The example command mplx core collection create is missing
required arguments; update the snippet so the Core collection creation uses the
required flags (e.g., mplx core collection create --name "<COLLECTION_NAME>"
--uri "<COLLECTION_URI>") or otherwise reference the full syntax in cli-core.md;
specifically change the mplx core collection create line in this doc so it
includes the --name and --uri placeholders (or a short note linking to the
cli-core.md example) so users won't hit the CLI error when running mplx core
collection create in the flow.
In @.agents/skills/metaplex/references/cli.md:
- Around line 178-194: The fenced block under "Core assets/collections" is
unlabeled and the following blockquote contains a blank line which triggers
markdownlint; update the fenced code block to include a language hint (e.g.,
```text) and remove the empty line inside the blockquote so the two lines about
IMPORTANT and Localnet note are separate valid blockquote paragraphs or move the
Localnet note outside the blockquote; edit the section around the "Core
assets/collections" fenced block and the blockquote beginning with ">
**IMPORTANT**" in .agents/skills/metaplex/references/cli.md to apply these
changes.
- Around line 17-29: Add a "Genesis" entry to the Quick Command Index table
linking to `./cli-genesis.md` (same style as other rows) and update the Topics
header to include `genesis` alongside `config`, `toolbox`, `core`, `tm`, `cm`,
`bg`; confirm the `genesis` topic matches the skill routing in SKILL.md that
points token-launch to `./cli-genesis.md`. Locate the Topics line containing
"Topics: `config`, `toolbox`, `core`, `tm`, `cm`, `bg`" and the Quick Command
Index table, then append the `genesis` token in the header list and add a table
row: "Genesis | `./cli-genesis.md`".
In @.agents/skills/metaplex/references/concepts.md:
- Around line 33-64: The fenced diagrams for "Metadata Account", "MasterEdition
Account", "TokenRecord Account" and the later "Asset Account (Single Account)"
blocks are missing language tags; update each opening fence from ``` to ```text
so the diagrams are marked as plain text (e.g., the triple-backtick fence that
precedes the "Metadata Account" block and the one before "Asset Account (Single
Account)" and their corresponding closing fences).
In @.agents/skills/metaplex/references/sdk-bubblegum.md:
- Around line 178-207: Add an import for getAssetWithProof to both TypeScript
example fences so the examples are copy-pastable; specifically, in the blocks
that call getAssetWithProof alongside freezeV2/thawV2 and thawAndRevokeV2, add
an import for getAssetWithProof from the Metaplex Bubblegum package (the same
package supplying freezeV2/thawV2/thawAndRevokeV2) at the top of each fence.
In @.agents/skills/metaplex/references/sdk-core.md:
- Around line 5-10: The blockquote in sdk-core.md is broken by blank lines which
triggers markdownlint MD028; make the blockquote contiguous by either removing
the empty lines between the quoted paragraphs or prefixing those separator lines
with '>' so the four paragraphs ("Prerequisites", "Docs", "Important",
"Fetch-first pattern") remain a single continuous blockquote; update the same
block that contains the helper function names (create, createCollection,
addPlugin, addCollectionPlugin, updatePlugin, removePlugin and the raw functions
like createV1) to ensure every line in that block starts with '>' so MD028 is
satisfied.
- Around line 228-253: Move all import statements to the top of the example and
add the missing import for ruleSet so the examples compile: ensure updatePlugin
and updateCollectionPlugin imports (used with umi, assetAddress,
collectionAddress) are declared before any await calls and also import ruleSet
from the appropriate Metaplex package (e.g., the mpl-core export that provides
ruleSet) so the calls to ruleSet('None') compile and run.
In @.agents/skills/metaplex/references/sdk-genesis.md:
- Line 35: Replace the incorrect phrase "first-come-first-serve" with the
correct past-participle form "first-come-first-served" in the Presale
description table cell (the row containing "| **Presale** | Fixed price token
sale, ... |"), updating the user-facing documentation string accordingly so the
table reads "Fixed price token sale, first-come-first-served".
In @.agents/skills/metaplex/references/sdk-token-metadata-kit.md:
- Around line 104-120: The example imports getCreateV1Instruction,
findMetadataPda, and findMasterEditionPda but uses TokenStandard.NonFungible,
causing a type error; update the import from
'@metaplex-foundation/mpl-token-metadata-kit' to also include TokenStandard so
TokenStandard is available alongside getCreateV1Instruction, findMetadataPda,
and findMasterEditionPda.
- Around line 45-82: The examples reuse const names in the same top-level scope
causing TypeScript redeclaration errors; split each example into its own
isolated code block or mark as pseudo-code so declarations don't collide (e.g.
separate the Regular NFT, pNFT, and Fungible examples for
createNft/createProgrammableNft/createFungible), or alternatively rename local
variables per example (e.g. createIx1/createIx2, mintIx1/mintIx2) and do the
same for the duplicate transferIx occurrences so createIx, mintIx, and
transferIx are unique per example and no longer redeclared in the same scope.
In @.agents/skills/metaplex/SKILL.md:
- Around line 74-81: The fenced code block containing the Program IDs (look for
lines starting with "Token Metadata:
metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s" and entries like "Bubblegum V2:
BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY" and "Genesis:
GNS1S5J5AspKXgpjz6SvKL66kPaKWAhaGRhCqPRxii2B") needs a fence language to satisfy
markdownlint; fix it by changing the opening triple backticks to include the
language identifier (e.g., ```text) so the block is fenced as text.
In `@scripts/devnet/mint.ts`:
- Line 66: The mint flow uses getConnection()/main() (which reads
ANCHOR_PROVIDER_URL) while createAssetUriFetcher()/createMetaplexClient()
prefers SOLANA_RPC_URL, causing mismatched endpoints; update
createAssetUriFetcher/createMetaplexClient to accept the Connection or an
explicit RPC URL parameter (or change its precedence to mirror getConnection()),
then wire the same Connection or URL from main() into
fetchAssetUri(asset.publicKey.toBase58()) so both mint and asset-fetch use
identical RPC endpoint selection; reference functions: main, getConnection,
createAssetUriFetcher, createMetaplexClient, and fetchAssetUri.
In `@skills-lock.json`:
- Around line 1-10: This lockfile (skills-lock.json) is unused; either remove it
or enforce its computedHash when loading skills: if you choose removal, delete
skills-lock.json and remove any vestigial references to "skills" or
"computedHash"; if you choose integration, extend your skill loader (e.g.,
loadSkills or validateSkill) to read skills-lock.json, lookup the "metaplex"
entry under "skills" and verify the computedHash field before accepting the
skill artifact, failing the load with a clear error when the hash mismatches.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 62b9d419-62af-42e1-9163-0ee611087096
📒 Files selected for processing (20)
.agents/memory/todo.md.agents/skills/metaplex/SKILL.md.agents/skills/metaplex/references/cli-bubblegum.md.agents/skills/metaplex/references/cli-candy-machine.md.agents/skills/metaplex/references/cli-core.md.agents/skills/metaplex/references/cli-genesis.md.agents/skills/metaplex/references/cli-token-metadata.md.agents/skills/metaplex/references/cli.md.agents/skills/metaplex/references/concepts.md.agents/skills/metaplex/references/sdk-bubblegum.md.agents/skills/metaplex/references/sdk-core.md.agents/skills/metaplex/references/sdk-genesis.md.agents/skills/metaplex/references/sdk-token-metadata-kit.md.agents/skills/metaplex/references/sdk-token-metadata.md.agents/skills/metaplex/references/sdk-umi.md.vscode/settings.jsonprograms/doom-nft-program/src/instructions/mint_doom_index_nft.rsscripts/devnet/mint.test.tsscripts/devnet/mint.tsskills-lock.json
💤 Files with no reviewable changes (1)
- .vscode/settings.json
| # Review: Install Metaplex Skill (2026-03-12) | ||
|
|
||
| - Confirmed the requested source `https://github.com/metaplex-foundation/metaplex-skill.git` is not publicly reachable on March 12, 2026. `git ls-remote` returns `repository not found`, and GitHub responds with HTTP `404`. | ||
| - The `npx skills add metaplex-foundation/metaplex-skill` error message is therefore misleading: it surfaces as an authentication problem, but the underlying issue is that the referenced repo path is not available to this environment. | ||
| - Found a public SkillMD page for the same skill at `https://skillmd.ai/how-to-build/metaplex/`, with a ZIP download at `https://skillmd.ai/skills/metaplex/download/`. | ||
| - Verified that the ZIP download succeeds, but the archive is not a valid Codex skill package as-is: it contains support files under `docs/`, `examples/`, `resources/`, and `templates/`, but no `SKILL.md`. | ||
| - Because both verified installation paths are incomplete or invalid, no local skill installation was applied. The actionable next step is to get the correct upstream source from the skill author: either a reachable GitHub repo/path or a fixed ZIP bundle that includes `SKILL.md`. |
There was a problem hiding this comment.
Update this review note to match the current PR state.
These bullets still say no local skill installation was applied and only upstream fixes remain, but this PR now vendors a local Metaplex skill under .agents/skills/metaplex/ and adds skills-lock.json. Leaving the old conclusion here will give future agents stale memory.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.agents/memory/todo.md around lines 233 - 239, Update the review note in
.agents/memory/todo.md to reflect that the PR now vendors a local Metaplex skill
and therefore the previous conclusion ("no local skill installation was applied"
and "only upstream fixes remain") is stale: mention that the PR adds a vendored
skill at .agents/skills/metaplex/ and includes skills-lock.json, remove or amend
the bullet claiming installation failed, and add a short recommendation (if any)
about whether upstream fixes are still needed or can be deferred now that the
local skill is vendored.
| ``` | ||
| Bubblegum V1: BGUMAp9SX3uS4efGcFjPjkAQZ4cUNZhtHaMq64nrGf9D | ||
| Bubblegum V2: BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY | ||
| ``` |
There was a problem hiding this comment.
Add a language to this fenced block.
The Program IDs block is unlabeled, so it fails the current markdownlint configuration. text would keep it simple.
🧰 Tools
🪛 markdownlint-cli2 (0.21.0)
[warning] 111-111: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.agents/skills/metaplex/references/cli-bubblegum.md around lines 111 - 114,
The fenced code block containing the Program IDs lines "Bubblegum V1:
BGUMAp9SX3uS4efGcFjPjkAQZ4cUNZhtHaMq64nrGf9D" and "Bubblegum V2:
BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY" is missing a language label;
update that fenced block in .agents/skills/metaplex/references/cli-bubblegum.md
to use a language tag (use "text") so the block becomes ```text ... ``` to
satisfy markdownlint.
| # 3. Create a Core collection for the candy machine | ||
| mplx core collection create | ||
|
|
||
| # 4. Edit cm-config.json: add the collection address, configure guards, etc. | ||
| # The "collection" field MUST contain a valid Core collection address. | ||
|
|
||
| # 5. Upload assets to storage | ||
| mplx cm upload | ||
|
|
||
| # 6. Create candy machine (reads cm-config.json) | ||
| mplx cm create | ||
|
|
||
| # 7. Insert items into candy machine | ||
| mplx cm insert | ||
|
|
||
| # 8. Validate (optional but recommended) | ||
| mplx cm validate --onchain | ||
| ``` | ||
|
|
||
| > **Note:** You MUST create a Core collection first (e.g. with `mplx core collection create`) and add its address to the `"collection"` field in `cm-config.json` before running `mplx cm create`. The CLI does NOT create the collection automatically — it will error if no collection address is provided. |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
# Check if the file exists and read the specific lines
ls -la .agents/skills/metaplex/references/cli-candy-machine.md 2>&1 || echo "File not found in expected location"Repository: doom-protocol/doom-nft-program
Length of output: 179
🏁 Script executed:
# Search for the file in the repository
find . -name "cli-candy-machine.md" -o -name "cli-core.md" 2>/dev/nullRepository: doom-protocol/doom-nft-program
Length of output: 180
🏁 Script executed:
# Get the structure of the .agents directory
find .agents -type f -name "*.md" | head -20Repository: doom-protocol/doom-nft-program
Length of output: 859
🏁 Script executed:
# Read the specific lines from the file to verify content
sed -n '60,79p' .agents/skills/metaplex/references/cli-candy-machine.mdRepository: doom-protocol/doom-nft-program
Length of output: 847
🏁 Script executed:
# Read full cli-core.md to check documentation for collection create
cat -n .agents/skills/metaplex/references/cli-core.md | head -100Repository: doom-protocol/doom-nft-program
Length of output: 3991
🏁 Script executed:
# Check context around the command in cli-candy-machine.md to better understand the intent
sed -n '55,85p' .agents/skills/metaplex/references/cli-candy-machine.mdRepository: doom-protocol/doom-nft-program
Length of output: 1035
🏁 Script executed:
# Check if there are any other sections in cli-core.md that might be referenced
wc -l .agents/skills/metaplex/references/cli-core.mdRepository: doom-protocol/doom-nft-program
Length of output: 124
Add required arguments to the collection-creation command.
mplx core collection create on line 62 is shown without the required --name and --uri arguments. Users following this workflow step-by-step will encounter a CLI error. Add placeholders like mplx core collection create --name "<COLLECTION_NAME>" --uri "<COLLECTION_URI>" or reference the complete syntax and example in cli-core.md (lines 26–27, 66–69).
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.agents/skills/metaplex/references/cli-candy-machine.md around lines 60 -
79, The example command mplx core collection create is missing required
arguments; update the snippet so the Core collection creation uses the required
flags (e.g., mplx core collection create --name "<COLLECTION_NAME>" --uri
"<COLLECTION_URI>") or otherwise reference the full syntax in cli-core.md;
specifically change the mplx core collection create line in this doc so it
includes the --name and --uri placeholders (or a short note linking to the
cli-core.md example) so users won't hit the CLI error when running mplx core
collection create in the flow.
| Topics: `config`, `toolbox`, `core`, `tm`, `cm`, `bg` | ||
|
|
||
| --- | ||
|
|
||
| ## Quick Command Index | ||
|
|
||
| | Topic | Detail File | | ||
| |-------|-------------| | ||
| | Core Assets/Collections | `./cli-core.md` | | ||
| | Token Metadata NFTs/pNFTs | `./cli-token-metadata.md` | | ||
| | Bubblegum (compressed NFTs) | `./cli-bubblegum.md` | | ||
| | Candy Machine (NFT drops) | `./cli-candy-machine.md` | | ||
| | Config, Storage, SOL, Tokens | Below | |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
# First, let's explore the directory structure
find .agents/skills/metaplex -type f -name "*.md" | head -20Repository: doom-protocol/doom-nft-program
Length of output: 770
🏁 Script executed:
# Check if cli-genesis.md exists
find .agents/skills/metaplex -name "*genesis*"Repository: doom-protocol/doom-nft-program
Length of output: 173
🏁 Script executed:
# Examine the SKILL.md file to see the routing mentioned
cat -n .agents/skills/metaplex/SKILL.md | grep -A 5 -B 5 "token-launch\|genesis"Repository: doom-protocol/doom-nft-program
Length of output: 2632
🏁 Script executed:
# Check the cli.md file around lines 17-29 and beyond
cat -n .agents/skills/metaplex/references/cli.md | head -50Repository: doom-protocol/doom-nft-program
Length of output: 1736
🏁 Script executed:
# Check for any markdown lint issues at lines 178 and 193
cat -n .agents/skills/metaplex/references/cli.md | sed -n '170,200p'Repository: doom-protocol/doom-nft-program
Length of output: 1396
Add Genesis to the CLI index and topic list.
The skill routes token-launch work to ./cli-genesis.md (SKILL.md line 43), but it's missing from this file's quick index and topic list. Add an entry for Genesis in the quick command index (lines 23–29) and verify whether the genesis topic should be appended to line 17's topic list alongside the other abbreviations.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.agents/skills/metaplex/references/cli.md around lines 17 - 29, Add a
"Genesis" entry to the Quick Command Index table linking to `./cli-genesis.md`
(same style as other rows) and update the Topics header to include `genesis`
alongside `config`, `toolbox`, `core`, `tm`, `cm`, `bg`; confirm the `genesis`
topic matches the skill routing in SKILL.md that points token-launch to
`./cli-genesis.md`. Locate the Topics line containing "Topics: `config`,
`toolbox`, `core`, `tm`, `cm`, `bg`" and the Quick Command Index table, then
append the `genesis` token in the header list and add a table row: "Genesis |
`./cli-genesis.md`".
| ``` | ||
| # Core assets/collections | ||
| https://core.metaplex.com/explorer/<ADDRESS>?env=devnet # Devnet | ||
| https://core.metaplex.com/explorer/<ADDRESS> # Mainnet | ||
|
|
||
| # Token Metadata NFTs / Tokens | ||
| https://explorer.solana.com/address/<MINT_ADDRESS>?cluster=devnet # Devnet | ||
| https://explorer.solana.com/address/<MINT_ADDRESS> # Mainnet | ||
|
|
||
| # Transactions | ||
| https://explorer.solana.com/tx/<SIGNATURE>?cluster=devnet # Devnet | ||
| https://explorer.solana.com/tx/<SIGNATURE> # Mainnet | ||
| ``` | ||
|
|
||
| > **IMPORTANT**: Always add `?env=devnet` or `?cluster=devnet` when on devnet. | ||
|
|
||
| > **Localnet note**: The CLI generates devnet explorer links even when connected to localhost. For localnet, use Solana Explorer with a custom cluster URL: `https://explorer.solana.com/address/<ADDRESS>?cluster=custom&customUrl=http://localhost:8899` |
There was a problem hiding this comment.
Fix the markdownlint issues in Explorer Links.
This section has an unlabeled fenced block and a blank line inside a blockquote. Both are already flagged by the current lint config.
🧰 Tools
🪛 markdownlint-cli2 (0.21.0)
[warning] 178-178: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
[warning] 193-193: Blank line inside blockquote
(MD028, no-blanks-blockquote)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.agents/skills/metaplex/references/cli.md around lines 178 - 194, The fenced
block under "Core assets/collections" is unlabeled and the following blockquote
contains a blank line which triggers markdownlint; update the fenced code block
to include a language hint (e.g., ```text) and remove the empty line inside the
blockquote so the two lines about IMPORTANT and Localnet note are separate valid
blockquote paragraphs or move the Localnet note outside the blockquote; edit the
section around the "Core assets/collections" fenced block and the blockquote
beginning with "> **IMPORTANT**" in .agents/skills/metaplex/references/cli.md to
apply these changes.
| ```typescript | ||
| import { createNft, createProgrammableNft, createFungible } from '@metaplex-foundation/mpl-token-metadata-kit'; | ||
| import { generateKeyPairSigner } from '@solana/signers'; | ||
|
|
||
| const mint = await generateKeyPairSigner(); | ||
| const authority = await generateKeyPairSigner(); | ||
|
|
||
| // Regular NFT — returns [createIx, mintIx] | ||
| const [createIx, mintIx] = await createNft({ | ||
| mint, | ||
| authority, | ||
| payer: authority, | ||
| name: 'My NFT', | ||
| uri: 'https://example.com/nft.json', | ||
| sellerFeeBasisPoints: 550, // 5.5% | ||
| }); | ||
|
|
||
| // pNFT — returns [createIx, mintIx] | ||
| const [createIx, mintIx] = await createProgrammableNft({ | ||
| mint, | ||
| authority, | ||
| payer: authority, | ||
| name: 'My pNFT', | ||
| uri: 'https://example.com/pnft.json', | ||
| sellerFeeBasisPoints: 500, | ||
| }); | ||
|
|
||
| // Fungible — returns createIx only | ||
| const createIx = await createFungible({ | ||
| mint, | ||
| payer: authority, | ||
| name: 'My Token', | ||
| symbol: 'MTK', | ||
| uri: 'https://arweave.net/xxx', | ||
| sellerFeeBasisPoints: 0, | ||
| decimals: 9, | ||
| }); | ||
| ``` |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
for range in 45,82 127,149; do
start="${range%,*}"
end="${range#*,}"
echo "== lines ${start}-${end} =="
snippet="$(sed -n "${start},${end}p" .agents/skills/metaplex/references/sdk-token-metadata-kit.md)"
printf '%s\n' "$snippet"
echo
echo "const declarations:"
printf '%s\n' "$snippet" | rg -o 'const\s+[A-Za-z_][A-Za-z0-9_]*' | sort | uniq -c
echo
doneRepository: doom-protocol/doom-nft-program
Length of output: 1866
Separate these alternative examples into different code blocks.
Both code fences contain duplicate const declarations in a single scope, which will cause TypeScript errors when copy-pasted:
- Lines 45-82:
createIxis declared three times (lines 54, 65, 76) andmintIxis declared twice (lines 54, 65) - Lines 127-149:
transferIxis declared twice
Wrap each example (Regular NFT, pNFT, Fungible / Regular NFT, pNFT) in its own code block or mark them as pseudo-code.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.agents/skills/metaplex/references/sdk-token-metadata-kit.md around lines 45
- 82, The examples reuse const names in the same top-level scope causing
TypeScript redeclaration errors; split each example into its own isolated code
block or mark as pseudo-code so declarations don't collide (e.g. separate the
Regular NFT, pNFT, and Fungible examples for
createNft/createProgrammableNft/createFungible), or alternatively rename local
variables per example (e.g. createIx1/createIx2, mintIx1/mintIx2) and do the
same for the duplicate transferIx occurrences so createIx, mintIx, and
transferIx are unique per example and no longer redeclared in the same scope.
| ```typescript | ||
| import { getCreateV1Instruction, findMetadataPda, findMasterEditionPda } from '@metaplex-foundation/mpl-token-metadata-kit'; | ||
|
|
||
| const metadataPda = await findMetadataPda({ mint: mint.address }); | ||
| const editionPda = await findMasterEditionPda({ mint: mint.address }); | ||
|
|
||
| const createIx = getCreateV1Instruction({ | ||
| metadata: metadataPda, | ||
| masterEdition: editionPda, | ||
| mint, | ||
| authority, | ||
| payer: authority, | ||
| name: 'My NFT', | ||
| uri: 'https://example.com/nft.json', | ||
| sellerFeeBasisPoints: 550, | ||
| tokenStandard: TokenStandard.NonFungible, | ||
| }); |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
snippet="$(sed -n '104,120p' .agents/skills/metaplex/references/sdk-token-metadata-kit.md)"
printf '%s\n' "$snippet"
echo
echo "Imports:"
printf '%s\n' "$snippet" | rg -n '^import'
echo
echo "TokenStandard usages:"
printf '%s\n' "$snippet" | rg -n 'TokenStandard'Repository: doom-protocol/doom-nft-program
Length of output: 832
Import TokenStandard in the example.
Line 119 uses TokenStandard.NonFungible, but the import statement only includes getCreateV1Instruction, findMetadataPda, and findMasterEditionPda. Add TokenStandard to the import from @metaplex-foundation/mpl-token-metadata-kit to resolve the type-checking error.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.agents/skills/metaplex/references/sdk-token-metadata-kit.md around lines
104 - 120, The example imports getCreateV1Instruction, findMetadataPda, and
findMasterEditionPda but uses TokenStandard.NonFungible, causing a type error;
update the import from '@metaplex-foundation/mpl-token-metadata-kit' to also
include TokenStandard so TokenStandard is available alongside
getCreateV1Instruction, findMetadataPda, and findMasterEditionPda.
| ``` | ||
| Token Metadata: metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s | ||
| Core: CoREENxT6tW1HoK8ypY1SxRMZTcVPm7R94rH4PZNhX7d | ||
| Bubblegum V1: BGUMAp9SX3uS4efGcFjPjkAQZ4cUNZhtHaMq64nrGf9D | ||
| Bubblegum V2: BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY | ||
| Core Candy: CMACYFENjoBMHzapRXyo1JZkVS6EtaDDzkjMrmQLvr4J | ||
| Genesis: GNS1S5J5AspKXgpjz6SvKL66kPaKWAhaGRhCqPRxii2B | ||
| ``` |
There was a problem hiding this comment.
Add a language to this fenced block.
The Program IDs block is missing a fence language, which trips the current markdownlint rule set. text is enough here.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.agents/skills/metaplex/SKILL.md around lines 74 - 81, The fenced code block
containing the Program IDs (look for lines starting with "Token Metadata:
metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s" and entries like "Bubblegum V2:
BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY" and "Genesis:
GNS1S5J5AspKXgpjz6SvKL66kPaKWAhaGRhCqPRxii2B") needs a fence language to satisfy
markdownlint; fix it by changing the opening triple backticks to include the
language identifier (e.g., ```text) so the block is fenced as text.
| } | ||
|
|
||
| const metadataUri = decodeAssetUri(assetAccount.data); | ||
| const metadataUri = await fetchAssetUri(asset.publicKey.toBase58()); |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
echo "== scripts/devnet/common.ts =="
rg -n -C4 '\bgetConnection\b|RPC|cluster|endpoint|api\.devnet|api\.mainnet|process\.env' scripts/devnet/common.ts
echo
echo "== scripts/metaplex/common.ts =="
rg -n -C4 '\bcreateMetaplexClient\b|RPC|cluster|endpoint|api\.devnet|api\.mainnet|process\.env' scripts/metaplex/common.tsRepository: doom-protocol/doom-nft-program
Length of output: 4551
🏁 Script executed:
#!/bin/bash
echo "=== mint.ts around line 66 ==="
sed -n '60,75p' scripts/devnet/mint.ts
echo
echo "=== mint.ts around lines 95-100 ==="
sed -n '90,105p' scripts/devnet/mint.ts
echo
echo "=== Full mint.ts for context ==="
wc -l scripts/devnet/mint.tsRepository: doom-protocol/doom-nft-program
Length of output: 1211
🏁 Script executed:
#!/bin/bash
echo "=== Full mint.ts to find fetchAssetUri definition/import ==="
cat -n scripts/devnet/mint.tsRepository: doom-protocol/doom-nft-program
Length of output: 4057
Consolidate RPC endpoint configuration between mint and asset fetch flows.
main() uses getConnection() which reads ANCHOR_PROVIDER_URL (or defaults to devnet), but createAssetUriFetcher() creates a separate createMetaplexClient() that prioritizes SOLANA_RPC_URL over ANCHOR_PROVIDER_URL. If SOLANA_RPC_URL is set independently, the post-mint asset fetch will target a different RPC endpoint than the minting transaction, causing intermittent fetch failures. Both should use the same environment variable precedence or accept the connection/RPC URL as a shared parameter.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@scripts/devnet/mint.ts` at line 66, The mint flow uses getConnection()/main()
(which reads ANCHOR_PROVIDER_URL) while
createAssetUriFetcher()/createMetaplexClient() prefers SOLANA_RPC_URL, causing
mismatched endpoints; update createAssetUriFetcher/createMetaplexClient to
accept the Connection or an explicit RPC URL parameter (or change its precedence
to mirror getConnection()), then wire the same Connection or URL from main()
into fetchAssetUri(asset.publicKey.toBase58()) so both mint and asset-fetch use
identical RPC endpoint selection; reference functions: main, getConnection,
createAssetUriFetcher, createMetaplexClient, and fetchAssetUri.
| { | ||
| "version": 1, | ||
| "skills": { | ||
| "metaplex": { | ||
| "source": "metaplex-foundation/skill", | ||
| "sourceType": "github", | ||
| "computedHash": "fd3f4ebfb0f30964cb4661744b1ee8250b5495dc4fb9da83b5b063a563a80948" | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "Searching for skills-lock.json references and skill-manifest style config..."
rg -n -C2 'skills-lock\.json|"skills"\s*:|\.agents/skills|skill-installer|npx skills|skills add' .Repository: doom-protocol/doom-nft-program
Length of output: 350
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "=== Checking package.json for skill-related scripts ==="
if [ -f package.json ]; then
jq '.scripts' package.json 2>/dev/null || cat package.json | grep -A20 '"scripts"' | head -25
fi
echo -e "\n=== Listing .agents directory structure ==="
if [ -d .agents ]; then
find .agents -type f -name "*.json" -o -name "*.js" -o -name "*.ts" -o -name "*.md" | head -20
else
echo ".agents directory not found"
fi
echo -e "\n=== Searching for JSON config loading in code files ==="
rg -l '\.(json|JSON)' --type=js --type=ts --type=tsx . 2>/dev/null | head -10 | while read f; do
echo "File: $f"
rg 'require.*json|import.*json|fs.*readFile.*json|skills|lock' "$f" | head -3 || true
done
echo -e "\n=== Check root directory for config files ==="
ls -la | grep -E '\.(json|config|yaml|yml)$'Repository: doom-protocol/doom-nft-program
Length of output: 2391
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "=== Checking .agents root for config/manifest files ==="
ls -la .agents/ | grep -E '\.(json|yaml|yml|config)$'
echo -e "\n=== Searching for skill manifest or index patterns ==="
rg -n 'manifest|index|skills.*lock|computedHash' .agents/ || true
echo -e "\n=== Full contents of .agents directory (files only) ==="
find .agents -maxdepth 1 -type f
echo -e "\n=== Checking if skills-lock.json is referenced in any .agents files ==="
grep -r 'skills-lock' .agents/ 2>/dev/null || echo "No references found"
echo -e "\n=== Check git status to see if skills-lock.json is new in this PR ==="
git status --short skills-lock.json 2>/dev/null || echo "Not in git status output or git not available"Repository: doom-protocol/doom-nft-program
Length of output: 129
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "=== Look for any README or docs about skills ==="
find . -maxdepth 2 -name "README*" -o -name "*SKILLS*" -o -name "*skills*config*" 2>/dev/null | head -10
echo -e "\n=== Check if there's a .agents/README or similar ==="
cat .agents/README.md 2>/dev/null || echo "No README in .agents"
echo -e "\n=== Verify skills-lock.json is the only new skills-related file ==="
git ls-files | grep -i skill || trueRepository: doom-protocol/doom-nft-program
Length of output: 2073
Remove or integrate skills-lock.json with tooling.
This lockfile currently has no references in the codebase. No scripts, tools, or configuration files consume it, so the computedHash pinning is not enforced. Either integrate this file with a proper skill-loading mechanism or remove it if it's not yet needed.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@skills-lock.json` around lines 1 - 10, This lockfile (skills-lock.json) is
unused; either remove it or enforce its computedHash when loading skills: if you
choose removal, delete skills-lock.json and remove any vestigial references to
"skills" or "computedHash"; if you choose integration, extend your skill loader
(e.g., loadSkills or validateSkill) to read skills-lock.json, lookup the
"metaplex" entry under "skills" and verify the computedHash field before
accepting the skill artifact, failing the load with a clear error when the hash
mismatches.
Summary
skills-lock.jsonfetchAsset()instead of handwritten asset decodingtarget/visible again in the VS Code ExplorerVerification
bun test scripts/devnet/mint.test.tsbun run typecheckcargo test -p tests --lib mint_with_valid_reservation_creates_core_asset -- --nocapturecargo clippy -p doom-nft-program --all-features --all-targets -- -D warningsSummary by CodeRabbit
Release Notes
Documentation
Improvements