Skip to content

Data skill#5

Merged
mike-diamond merged 10 commits into
mainfrom
data-skill
Jun 10, 2026
Merged

Data skill#5
mike-diamond merged 10 commits into
mainfrom
data-skill

Conversation

@mike-diamond

Copy link
Copy Markdown
Contributor

No description provided.

Signed-off-by: MikeDiam <info@mdiamond.ru>
Signed-off-by: MikeDiam <info@mdiamond.ru>
Signed-off-by: MikeDiam <info@mdiamond.ru>
Signed-off-by: MikeDiam <info@mdiamond.ru>
Copilot AI review requested due to automatic review settings May 12, 2026 11:53

Copilot AI left a comment

Copy link
Copy Markdown

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 a new “stakewise-data-query” markdown-based skill (plus reference docs and schema snapshot), introduces a daily drift/health-check pipeline for endpoints/queries/schema, and refactors/extends the MCP server packaging and utilities to support a local HTTP server + MCP tools.

Changes:

  • Add data-skill/ skill content (SKILL.md, references, schema snapshot, plugin metadata) and marketplace manifest.
  • Add maintenance scripts + CI workflows for query verification, schema drift detection, and skill frontmatter linting.
  • Reorganize MCP server entrypoints/utilities and update package metadata to point at mcp-server/*.

Reviewed changes

Copilot reviewed 20 out of 60 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
scripts/verify-queries.sh Adds a curl/jq-based probe suite for subgraph/backend/RPC health and query shape verification.
scripts/snapshot-subgraph-schema.sh Adds schema drift detection against upstream stakewise/v3-subgraph and optional snapshot update mode.
scripts/lint-skill-frontmatter.mjs Adds validation for SKILL.md frontmatter and cross-checks with plugin.json + schema snapshot header.
scripts/build-llm-context.mjs Builds a single bundled markdown context file from SKILL.md + ordered references.
README.md Documents the “two paths” (skill vs MCP server), setup, layout, and maintenance pipeline.
pnpm-lock.yaml Adds globals dependency lock entries.
package.json Updates entrypoints/paths for MCP server, adds skill/drift scripts, and adds globals.
mcp-server/utils/types.d.ts Introduces shared runtime/response typing for server/methods.
mcp-server/utils/state.ts Adds shared in-memory runtime state (host/port/subgraph URL/address).
mcp-server/utils/server.ts Implements the local HTTP server and lifecycle helpers.
mcp-server/utils/methods/saveAddress.ts Adds endpoint handler to persist a user address in runtime state.
mcp-server/utils/methods/index.ts Exports HTTP handlers as a single module.
mcp-server/utils/methods/helpers/shortenAddress.ts Adds address-shortening helper.
mcp-server/utils/methods/helpers/parseDays.ts Adds bounded parsing for days query parameter.
mcp-server/utils/methods/helpers/isValidVaultAddress.ts Adds vault-address validation helper.
mcp-server/utils/methods/helpers/isValidUserAddress.ts Adds “saved address exists” validation helper.
mcp-server/utils/methods/helpers/index.ts Aggregates helper exports.
mcp-server/utils/methods/helpers/getStakeByVault.ts Adds SDK-based per-(user,vault) stake/osToken/boost aggregation.
mcp-server/utils/methods/helpers/getSDK.ts Creates the StakeWise SDK instance (mainnet config).
mcp-server/utils/methods/helpers/getBoostApyText.ts Formats APY/boost APY display text.
mcp-server/utils/methods/helpers/formatTokenValue.ts Adds token amount formatting for ETH/osETH-style values.
mcp-server/utils/methods/helpers/formatStakeText.ts Renders a markdown summary for a user’s position in a vault.
mcp-server/utils/methods/helpers/formatNumberTokenValue.ts Formats JS numbers as token amounts via parseEther + formatter.
mcp-server/utils/methods/helpers/formatApy.ts Adds APY string formatting helper.
mcp-server/utils/methods/helpers/fetchSubgraph.ts Adds a simple POST GraphQL fetch helper to the subgraph URL.
mcp-server/utils/methods/helpers/date.ts Centralizes dayjs setup (utc + duration).
mcp-server/utils/methods/helpers/addNumberSeparator.ts Adds a basic thousands-separator helper.
mcp-server/utils/methods/getVaultWhitelist.ts Adds endpoint handler to fetch and render a vault’s whitelist.
mcp-server/utils/methods/getVaultsWithStake.ts Adds endpoint handler to list all vaults a user interacted with + per-vault stats.
mcp-server/utils/methods/getVaultStats.ts Adds endpoint handler for historical vault stats over N days.
mcp-server/utils/methods/getVaultsList.ts Adds endpoint handler for listing all vaults sorted by APY (with caching).
mcp-server/utils/methods/getVaultQueue.ts Adds endpoint handler for unstake/unboost queue status.
mcp-server/utils/methods/getVaultData.ts Adds endpoint handler for public vault details.
mcp-server/utils/methods/getVaultBalance.ts Adds endpoint handler for a user’s position in a specific vault.
mcp-server/utils/methods/getUserStats.ts Adds endpoint handler for historical user stats in a vault over N days.
mcp-server/utils/methods/getCreatedVaults.ts Adds endpoint handler for listing vaults administered by the saved address.
mcp-server/utils/index.ts Re-exports server/state/methods types and helpers.
mcp-server/skills/stakewise-llm-tools/SKILL.md Adds/updates the MCP-server skill documentation and usage instructions.
mcp-server/openclaw.plugin.json Adds OpenClaw plugin manifest for the MCP server.
mcp-server/mcp.ts Adds the MCP stdio server entrypoint with tool registration.
mcp-server/index.ts Adds OpenClaw plugin entrypoint (starts server, registers reset command).
mcp-server/debug-server.ts Adds a debug proxy to print formatted responses from the local HTTP server.
mcp-server/.mcp.json Adds an example MCP client config (stdio via tsx).
mcp-server/.cursor/mcp.json Adds Cursor MCP config example.
mcp-server/.codex/config.toml Adds Codex MCP config example.
eslint.config.js Adds node globals for scripts linting via globals.
data-skill/SKILL.md Adds the new markdown-only “stakewise-data-query” skill definition and instructions.
data-skill/references/units-and-gotchas.md Adds numeric unit rules, address casing rules, and other pitfalls.
data-skill/references/schema-snapshot.graphql Adds pinned upstream schema snapshot for reference/verification.
data-skill/references/rpc-fallback.md Documents public RPC fallback strategy and verified selectors.
data-skill/references/entities.md Adds a use-case grouped schema digest for building correct queries.
data-skill/references/endpoints.md Documents public subgraph/backend/RPC endpoints + rotation rules.
data-skill/.claude-plugin/plugin.json Adds plugin metadata including pinned schema commit/date.
CODEOWNERS Adds code owner assignments.
.npmignore Excludes skill/docs/scripts/CI config from the published npm package.
.github/workflows/verify-queries.yml Adds daily advisory drift checks that open issues on failures.
.github/workflows/lint-skills.yml Adds advisory PR workflow for skill lint + mainnet smoke check.
.claude-plugin/marketplace.json Adds Claude Code marketplace manifest for the data-skill plugin.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

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

Comment thread scripts/build-llm-context.mjs Outdated
Signed-off-by: MikeDiam <info@mdiamond.ru>
Signed-off-by: MikeDiam <info@mdiamond.ru>
Signed-off-by: MikeDiam <info@mdiamond.ru>
Signed-off-by: MikeDiam <info@mdiamond.ru>
Signed-off-by: MikeDiam <info@mdiamond.ru>
@mike-diamond mike-diamond requested review from Cast0001 and dfkadyr June 9, 2026 13:39
Cast0001
Cast0001 previously approved these changes Jun 9, 2026

@Cast0001 Cast0001 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍

Comment thread data-skill/references/endpoints.md Outdated
Comment thread data-skill/references/endpoints.md Outdated
Signed-off-by: MikeDiam <info@mdiamond.ru>
@mike-diamond mike-diamond merged commit 476811d into main Jun 10, 2026
@mike-diamond mike-diamond deleted the data-skill branch June 10, 2026 06:36
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