Skip to content

[KLC-2172] Add SKILL.md with progressive disclosure sub-files#27

Merged
fbsobreira merged 3 commits intodevelopfrom
feature/KLC-2172-skill-md
Feb 19, 2026
Merged

[KLC-2172] Add SKILL.md with progressive disclosure sub-files#27
fbsobreira merged 3 commits intodevelopfrom
feature/KLC-2172-skill-md

Conversation

@fbsobreira
Copy link
Copy Markdown
Member

@fbsobreira fbsobreira commented Feb 15, 2026

Summary

  • Add docs/SKILL.md — LLM-optimized reference for Klever blockchain development with YAML frontmatter for IDE skill registry discovery
  • Add 9 progressive disclosure sub-files in docs/skills/ covering smart contracts, storage, tokens, events, modules, deployment, API reference, security, and troubleshooting
  • Document SKILL.md location in CLAUDE.md

SKILL.md highlights

  • Role & activation triggers — when to use, task decision tree
  • Quick Reference — KLV/KFI/KDA decimals, address format, crate names, ports, koperator syntax
  • Common Mistakes — 6 WRONG/CORRECT patterns (decimals, --values vs --value, positional args, event params, BigUint underflow, missing #[upgrade])
  • Quick Start — Cargo.toml, minimal contract, build/deploy/invoke/query commands
  • Argument types, networks table, MCP server setup

Sub-files

  1. Smart Contracts — structure, annotations, custom structs, error handling
  2. Storage — mapper types, namespaces, atomic updates
  3. Tokens & Payments — KLV/KDA, payable endpoints, sending tokens
  4. Events — ONE-DATA rule, struct workaround, naming
  5. Modules — Admin, Pause, combining modules
  6. Deployment — ksc, koperator, arguments, payments, queries
  7. API Reference — Swagger links, Node API (8080), Indexer API (9090)
  8. Security — underflow, caller identity, reentrancy, best practices
  9. Troubleshooting — 8 common errors with fixes, debugging tips

Test plan

  • Verify docs/SKILL.md YAML frontmatter parses correctly
  • Verify all 9 sub-file links resolve from SKILL.md
  • Verify code examples compile (Rust snippets use correct klever_sc imports)
  • Verify Swagger URLs are accessible
  • Verify no hardcoded stale versions (crate versions use 0.45.0 with "use latest" comment)

Copilot AI review requested due to automatic review settings February 15, 2026 13:06
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds comprehensive LLM-optimized reference documentation for Klever blockchain development. The documentation is structured with a main SKILL.md file that serves as a hub with YAML frontmatter for IDE skill registry discovery, plus 9 progressive disclosure sub-files that provide detailed coverage of smart contract development, deployment, and best practices.

Changes:

  • Added docs/SKILL.md with YAML frontmatter, quick reference guide, common mistakes, and decision tree for routing to appropriate sub-guides
  • Added 9 detailed sub-files covering smart contracts, storage mappers, tokens/payments, events, modules, deployment, API reference, security, and troubleshooting
  • Updated CLAUDE.md to document the new SKILL.md location and structure

Reviewed changes

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

Show a summary per file
File Description
docs/SKILL.md Main hub document with quick reference, common mistakes, task decision tree, and links to 9 sub-guides
docs/skills/01-smart-contracts.md Contract structure, annotations, custom structs, error handling, and optional parameters
docs/skills/02-storage.md Storage mapper types, declaration patterns, namespaces, atomic updates, and view functions
docs/skills/03-tokens.md KLV/KFI/KDA token handling, receiving payments, sending tokens, and token identifiers
docs/skills/04-events.md Event definitions, the ONE-DATA rule for non-indexed parameters, and naming conventions
docs/skills/05-modules.md Built-in Admin and Pause modules with usage examples and combining modules pattern
docs/skills/06-deployment.md SDK tools (ksc/koperator), build/deploy/upgrade commands, invocation, and queries
docs/skills/07-api-reference.md Node API (8080) and API Proxy (9090) endpoints with usage recommendations
docs/skills/08-security.md Critical security rules including validation, reentrancy prevention, and best practices
docs/skills/09-troubleshooting.md Common errors with fixes and debugging tips
CLAUDE.md Added documentation section describing SKILL.md location and structure

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

nickgs1337
nickgs1337 previously approved these changes Feb 19, 2026
RomuloSiebra
RomuloSiebra previously approved these changes Feb 19, 2026
LLM-optimized reference for Klever blockchain development.
Main file covers quick reference, common mistakes, and task
routing. Nine sub-files provide detailed guides for smart
contracts, storage, tokens, events, modules, deployment,
API reference, security, and troubleshooting.
- Remove non-existent on-chain tools from MCP Server section, list all
  actual tools from server.ts
- Add #![no_std], imports, #[init], #[upgrade] to Pause and Combining
  Modules examples for self-contained snippets
- Add balance storage mapper declaration to Pause module example
- Add require!(balance > 0) guard and balance.clear() before external
  call in emergency_withdraw examples (checks-effects-interactions)
- Add users storage mapper declaration to View Functions example
Copilot AI review requested due to automatic review settings February 19, 2026 14:03
@fbsobreira fbsobreira dismissed stale reviews from RomuloSiebra and nickgs1337 via cfcce21 February 19, 2026 14:03
@fbsobreira fbsobreira force-pushed the feature/KLC-2172-skill-md branch from e3ba45c to cfcce21 Compare February 19, 2026 14:03
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Add npm "version" lifecycle script to automatically update server.json
when running npm version. Also fixes server.json from stale 1.1.1 to
current 1.2.3.
@fbsobreira fbsobreira merged commit ec21fcd into develop Feb 19, 2026
3 checks passed
@nickgs1337 nickgs1337 deleted the feature/KLC-2172-skill-md branch February 19, 2026 23:17
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.

4 participants