feat: implement multi-skill architecture for AI coding assistants and add AI Resources documentation#443
Conversation
Add a set of Agent Skills (agentskills.io spec) that teach AI tools how to build on CKB with the CCC SDK: - Hub skill: ckb-ccc-fundamentals (Cell model, package selection, address/amount handling, hallucination guard) - Spoke skills: ckb-ccc-signer-setup, ckb-ccc-transactions, ckb-ccc-udt, ckb-ccc-spore, ckb-ccc-playground, ckb-ccc-examples-finder Installable via `npx skills add ckb-devrel/ccc`. Includes a maintenance README documenting version bump discipline and update workflow.
- Remove packages/docs/public/skill.md (475 lines) - the old monolithic skill file - Add AI Resources section metadata (meta.json and meta.zh.json) - Update llms.txt route to reference skill.md as "Agent skills index" and add AI Resources link - Refactor playground guide Example 2 from UDT token issuance to Spore creation (both EN and ZH) - Update verify-llm.mjs script references This is part of the multi-skill architecture migration where the single skill.md is replaced by a hub skill (ckb-ccc-fundamentals) plus spoke skills for each task domain.
- Add /skill.md route (app/skill.md/route.ts) with hub/spoke skill table, dependencies, and npx skills CLI installation - Add AI Resources section with 4 pages (EN and ZH): - index: overview and navigation cards - set-up-ai-tools: npx skills add installation, keep-skills-up-to-date section - prompting-best-practices: skill-native vs web chat prompt templates, 7 task categories - verify-and-troubleshoot: canary questions, npx skills check/update troubleshooting - Update docs meta.json/meta.zh.json to include AI Resources section - Update introduction.zh.mdx to reference new skill.md endpoint This completes the multi-skill architecture migration by providing the new modular skill structure and comprehensive AI tooling documentation.
- Add XudtSusIssuer class that encapsulates the 3-step SUS flow: 1. Create seal cell (reserved until mint) 2. Create owner cell locked with SingleUseLock bound to seal 3. Consume seal + owner to mint xUDT + UniqueType metadata cells - Add issueXudtWithSUS() convenience function for playground usage - Includes progress callback for tracking each transaction step - Handles TypeId calculation for UniqueType after inputs are finalized
- Update package selection table to show import statement instead of Web Component tag - Clarifies that @ckb-ccc/connector uses standard import pattern like other packages
✅ Deploy Preview for docsccc ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for liveccc ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
✅ Deploy Preview for appccc ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for apiccc ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull request overview
This PR replaces the previous single, monolithic CCC agent skill doc with a hub-and-spoke “multi-skill” layout under skills/, adds a /skill.md index route that lists skill dependencies and raw URLs, and introduces a new “AI Resources” docs section (EN + ZH) to help developers install, prompt, and verify their AI tooling against CCC docs.
Changes:
- Added a modular Agent Skills set (
ckb-ccc-fundamentalshub + spoke skills for signer setup, transactions, UDT, Spore, playground, and example-finding), plus maintenance guidance inskills/README.md. - Added an on-site skills index (
/skill.md) and updated docs verification +llms.txtto reference the new structure. - Added “AI Resources” documentation pages (setup, prompting, troubleshooting) in both English and Chinese, and updated docs navigation to include them.
Reviewed changes
Copilot reviewed 29 out of 29 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| skills/README.md | Maintenance guidance for updating skills and versioning. |
| skills/ckb-ccc-fundamentals/SKILL.md | Hub skill covering CKB/CCC fundamentals and doc/API-grounding workflow. |
| skills/ckb-ccc-signer-setup/SKILL.md | Spoke skill for wallet connection + signer creation patterns. |
| skills/ckb-ccc-transactions/SKILL.md | Spoke skill for CCC transaction composition pipeline and chain querying. |
| skills/ckb-ccc-udt/SKILL.md | Spoke skill for UDT/xUDT issuance/transfer patterns (SUS issuance example). |
| skills/ckb-ccc-spore/SKILL.md | Spoke skill for Spore/DOB creation/transfer/melt and DOB conventions. |
| skills/ckb-ccc-playground/SKILL.md | Spoke skill for CCC Playground usage, sharing, and contribution workflow. |
| skills/ckb-ccc-examples-finder/SKILL.md | Spoke skill for locating existing example code by category. |
| packages/examples/src/issueUdtSus.ts | New runnable example implementing xUDT SUS issuance flow with progress callback. |
| packages/docs/scripts/verify-llm.mjs | Updates verification checks to validate the new /skill.md route content. |
| packages/docs/public/skill.md | Removes the old monolithic skill document. |
| packages/docs/app/skill.md/route.ts | Adds /skill.md route that renders the skills index table + summaries. |
| packages/docs/app/llms.txt/route.ts | Updates llms notes and adds AI Resources to the index. |
| packages/docs/content/docs/meta.json | Adds AI Resources pages to the English docs navigation. |
| packages/docs/content/docs/meta.zh.json | Adds AI Resources pages to the Chinese docs navigation. |
| packages/docs/content/docs/getting-started/introduction.mdx | Adds AI Resources entry card on the intro page. |
| packages/docs/content/docs/getting-started/introduction.zh.mdx | Adds AI Resources entry card on the intro page (ZH). |
| packages/docs/content/docs/guides/playground.mdx | Updates example #2 to “Create a Spore” (doc snippet). |
| packages/docs/content/docs/guides/playground.zh.mdx | Updates example #2 to “Create a Spore” (doc snippet, ZH). |
| packages/docs/content/docs/ai-resources/index.mdx | New AI Resources section landing page (EN). |
| packages/docs/content/docs/ai-resources/index.zh.mdx | New AI Resources section landing page (ZH). |
| packages/docs/content/docs/ai-resources/set-up-ai-tools.mdx | New page: installing CCC skills into AI tools (EN). |
| packages/docs/content/docs/ai-resources/set-up-ai-tools.zh.mdx | New page: installing CCC skills into AI tools (ZH). |
| packages/docs/content/docs/ai-resources/prompting-best-practices.mdx | New page: prompt templates and grounding workflow (EN). |
| packages/docs/content/docs/ai-resources/prompting-best-practices.zh.mdx | New page: prompt templates and grounding workflow (ZH). |
| packages/docs/content/docs/ai-resources/verify-and-troubleshoot.mdx | New page: canary questions + troubleshooting flow (EN). |
| packages/docs/content/docs/ai-resources/verify-and-troubleshoot.zh.mdx | New page: canary questions + troubleshooting flow (ZH). |
| packages/docs/content/docs/ai-resources/meta.json | New section metadata for AI Resources (EN). |
| packages/docs/content/docs/ai-resources/meta.zh.json | New section metadata for AI Resources (ZH). |
- Add `--all` flag to npx skills add command in skill.md route for non-interactive installation - Add console.log to display Spore ID after creation in playground example (both EN and ZH) - Fix Chinese playground example description from "发行代币" to "创建 Spore" for accuracy
- Change `dependsOn` to `depends-on` in skills/README.md to match the actual YAML frontmatter field name used in SKILL.md files - Add descriptive comment to issueUdtSus.ts example
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
There was a problem hiding this comment.
Actionable comments posted: 13
🧹 Nitpick comments (1)
skills/ckb-ccc-spore/SKILL.md (1)
42-44: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick winAvoid
Math.random()for minting DNA.If DNA controls visible traits or rarity,
Math.random()is predictable. Use a cryptographically secure RNG appropriate to the target runtime, and document that this helper is demo-only if predictability is intentional.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@skills/ckb-ccc-spore/SKILL.md` around lines 42 - 44, Update generateSimpleDNA to use a cryptographically secure random number generator supported by the target runtime instead of Math.random(), while preserving the requested hexadecimal DNA length. If this helper is intentionally demo-only and predictable output is acceptable, document that limitation directly with the helper.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/docs/content/docs/ai-resources/index.mdx`:
- Around line 15-34: Fix sibling-page links in
packages/docs/content/docs/ai-resources/index.mdx (lines 15-34) by removing the
redundant ai-resources/ prefix from all three list links, the Callout link, and
all three Card hrefs. Apply the same link corrections to the equivalent links in
packages/docs/content/docs/ai-resources/index.zh.mdx (lines 15-34), using bare
./xxx paths.
- Around line 15-21: Update all relative links in the ai-resources index page,
including the three list items, the Callout link, and the three Card hrefs, to
remove the redundant ai-resources/ path segment and use ./set-up-ai-tools,
./verify-and-troubleshoot, and ./prompting-best-practices.
In `@packages/docs/content/docs/ai-resources/index.zh.mdx`:
- Around line 15-21: Update the links in the Chinese AI resources index,
including the corresponding Callout link, to remove the duplicated
`ai-resources/` path segment. Preserve each link’s target page and use paths
relative to the index file’s location.
In `@packages/examples/src/issueUdtSus.ts`:
- Around line 268-275: Move the Playground invocation of issueXudtWithSUS and
its result logging out of module-level execution into a separately called
function or documentation-only snippet. Ensure importing the module does not
initiate signing or broadcasting, while preserving the existing invocation
behavior when explicitly called.
- Around line 70-75: Validate all mint inputs before any broadcast: update the
parameter validation near the issueUdtSus flow to require integer decimals in
0..255, precompute metadata, and validate supply as a non-negative uint128
before createSealCell or Step 1. Apply the same integer-decimal validation and
preflight metadata/supply checks in packages/examples/src/issueUdtSus.ts lines
70-75 and 125-147, and mirror both changes in skills/ckb-ccc-udt/SKILL.md lines
91-96 and 146-168.
- Around line 32-34: Make totalSupply use one explicit unit convention across
IssueXudtSusParams and its serialization path at issueUdtSus, either narrowing
the accepted representation or documenting bigint as already scaled while
preserving consistent ccc.fixedPointFrom behavior. Update
packages/examples/src/issueUdtSus.ts lines 32-34 and 208, and align
skills/ckb-ccc-udt/SKILL.md lines 53-55 and 360-362 so the checklist and
documentation state the same contract.
In `@skills/ckb-ccc-fundamentals/SKILL.md`:
- Line 177: Tag every affected fenced documentation block to satisfy
markdownlint MD040: use http for request examples at
skills/ckb-ccc-fundamentals/SKILL.md lines 177, 187, and 199 and
skills/ckb-ccc-examples-finder/SKILL.md lines 22-24; use text for URL-only
examples at skills/ckb-ccc-fundamentals/SKILL.md lines 221 and 227.
In `@skills/ckb-ccc-playground/SKILL.md`:
- Around line 94-97: Update the `?src=` documentation to explicitly warn that
fetched raw URLs contain untrusted executable code and run with the Playground’s
pre-connected signer. Recommend inspecting the source and pinning it to an
immutable Git commit before selecting Run, particularly when using mainnet,
while preserving the existing link-longevity guidance.
In `@skills/ckb-ccc-signer-setup/SKILL.md`:
- Line 68: Update the Verify step in SKILL.md to use an actual confirmation
wait, replacing the single getTransaction(txHash) polling description with await
client.waitTransaction(txHash, 1), or document an explicit retry loop that
checks confirmation status.
- Around line 63-76: Update the signer setup example around CKB_PRIVATE_KEY to
explicitly validate that process.env.CKB_PRIVATE_KEY is set before constructing
SignerCkbPrivateKey. Fail immediately with a clear error when it is missing,
then pass the validated value to the constructor instead of relying on the
non-null assertion.
In `@skills/ckb-ccc-spore/SKILL.md`:
- Around line 165-183: Make the Spore transfer example self-contained by adding
the required ccc import and showing initialization or definition of signer and
recipientAddr before they are used. Keep the existing createSpore and
transferSpore flow intact, and ensure ccc.Address.fromString receives the
initialized signer.client.
- Around line 60-68: Update both cluster-creation examples to capture the
transaction hash returned by signer.sendTransaction and await
signer.client.waitTransaction before invoking ccc.spore.createSpore. Preserve
the existing fee completion and minting flow, ensuring cluster indexing
completes before createSpore resolves the cluster via assertCluster.
In `@skills/ckb-ccc-transactions/SKILL.md`:
- Around line 70-72: The capacity guidance in the SKILL.md gotcha row and
checklist must describe output-dependent occupied capacity rather than a fixed
61 CKB minimum. Update both references to state that occupied capacity is
calculated from each output’s lock, type script, and data, while retaining the
instruction to use CCC helpers instead of manual calculation.
---
Nitpick comments:
In `@skills/ckb-ccc-spore/SKILL.md`:
- Around line 42-44: Update generateSimpleDNA to use a cryptographically secure
random number generator supported by the target runtime instead of
Math.random(), while preserving the requested hexadecimal DNA length. If this
helper is intentionally demo-only and predictable output is acceptable, document
that limitation directly with the helper.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 5085d320-2f18-4c6c-85dc-a24f02563818
📒 Files selected for processing (29)
packages/docs/app/llms.txt/route.tspackages/docs/app/skill.md/route.tspackages/docs/content/docs/ai-resources/index.mdxpackages/docs/content/docs/ai-resources/index.zh.mdxpackages/docs/content/docs/ai-resources/meta.jsonpackages/docs/content/docs/ai-resources/meta.zh.jsonpackages/docs/content/docs/ai-resources/prompting-best-practices.mdxpackages/docs/content/docs/ai-resources/prompting-best-practices.zh.mdxpackages/docs/content/docs/ai-resources/set-up-ai-tools.mdxpackages/docs/content/docs/ai-resources/set-up-ai-tools.zh.mdxpackages/docs/content/docs/ai-resources/verify-and-troubleshoot.mdxpackages/docs/content/docs/ai-resources/verify-and-troubleshoot.zh.mdxpackages/docs/content/docs/getting-started/introduction.mdxpackages/docs/content/docs/getting-started/introduction.zh.mdxpackages/docs/content/docs/guides/playground.mdxpackages/docs/content/docs/guides/playground.zh.mdxpackages/docs/content/docs/meta.jsonpackages/docs/content/docs/meta.zh.jsonpackages/docs/public/skill.mdpackages/docs/scripts/verify-llm.mjspackages/examples/src/issueUdtSus.tsskills/README.mdskills/ckb-ccc-examples-finder/SKILL.mdskills/ckb-ccc-fundamentals/SKILL.mdskills/ckb-ccc-playground/SKILL.mdskills/ckb-ccc-signer-setup/SKILL.mdskills/ckb-ccc-spore/SKILL.mdskills/ckb-ccc-transactions/SKILL.mdskills/ckb-ccc-udt/SKILL.md
💤 Files with no reviewable changes (1)
- packages/docs/public/skill.md
…kill Updated the checklist item to accurately reflect that totalSupply accepts human-readable numbers (e.g., 100_000_000) which are converted to on-chain integers via ccc.fixedPointFrom(totalSupply, decimals).
- Add integer check for decimals (0-255) in encodeTokenInfo - Precompute tokenInfo and supply in issue() before createSealCell - Validate supply is non-negative uint128 before any transaction - Pass precomputed values to mintToken instead of recomputing - Mirror changes in ckb-ccc-udt skill documentation This prevents broadcasting seal/owner transactions with invalid parameters that would only fail at the mint step.
- Add environment variable validation in signer-setup example - Use ccc.spore namespace consistently in spore skill - Clarify fee rate guidance and error messages in transactions - Recommend waitTransaction for confirmation checks - Improve Chinese documentation accuracy
Add parenthetical note in step 2 to remind readers to validate the environment variable exists before creating the signer, referencing the complete validation logic in the code example.
Remove Markdown backticks from module specifiers in the code example to fix compilation errors.
Add or language tags to fenced code blocks in ckb-ccc-fundamentals and ckb-ccc-examples-finder skills to satisfy markdownlint MD040 rule.

This PR introduces a modular multi-skill architecture for CCC's AI coding assistant support, replacing the previous monolithic
skill.mdwith a hub-and-spoke structure. It also adds comprehensive AI Resources documentation to help developers configure and use their AI tools effectively with CCC.Changes
Multi-Skill Architecture
AI Resources Documentation
Added a new documentation section with 4 pages (English and Chinese):
npx skills add ckb-devrel/ccc, keep-skills-up-to-date workflowNote: The current prompt templates include detailed constraints to ensure accuracy. We will be conducting deep testing to find the optimal balance between prompt conciseness and output accuracy, and will iterate on these templates based on real-world usage.
npx skills check/updateDocumentation Infrastructure
packages/docs/public/skill.md/skill.mdroute serving a Markdown table with skill dependencies and installation instructionsllms.txtroute to reference the new skill structureExamples
XudtSusIssuerclass for xUDT Single-Use-Seal pattern issuance